Interface WrappedEntity


public interface WrappedEntity
This interface is used for setting values of an entity, this controls how an entity is displayed. Setting values on the entity itself will have no impact on how journeymap displays it.

Values are reset each time Journeymap refreshes the entity cache.

  • Method Summary

    Modifier and Type
    Method
    Description
    If the entity is aggro toward the player
    net.minecraft.world.level.biome.Biome
    Gets the entity's biome.
    net.minecraft.core.BlockPos
    The chunk position of the entity.
    int
    Gets the color of the icon displayed on the map.
    net.minecraft.network.chat.Component
    The entity's custom name.
    net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>
    The dimension where the entity is located.
    net.minecraft.resources.Identifier
    The icon resource location.
    The entity id, typically a UUID string.
    WeakReference<net.minecraft.world.entity.Entity>
    This is a weak reference to the Entity, setting any values on this entity will not change how journeymap displays or interacts with the entity.
    List<net.minecraft.network.chat.Component>
    Gets the current entity tooltip
    double
    The heading of the entity.
    If the entity is hostile
    int
    Gets the label color of the icon displayed on the map.
    net.minecraft.world.entity.Entity
    The owner Entity if the Entity is tamed.
    The player's name if the entity is a player.
    net.minecraft.world.phys.Vec3
    The position of the entity.
    The profession of the npc.
    Is the entity is a player and underground
    boolean
    Is entity an ambient creature.
    boolean
    Is the entity disabled from being drawn on the map.
    boolean
    Is entity invisible to the current player.
    boolean
    Is entity an npc
    boolean
    Is entity a passive animal
    boolean
    Is entity sneaking
    void
    setColor(int color)
    Sets the icon color of the dot when the user has the display set to dots.
    void
    setCustomName(String customName)
    Sets the custom name of the entity.
    void
    setCustomName(net.minecraft.network.chat.Component customName)
    Sets the custom name of the entity.
    void
    setDisable(boolean disable)
    Disables the entity from being drawn on the map.
    void
    setDrawOutline(boolean drawOutline)
    When setting a custom image via `setEntityIconLocation` if you want to disable the outline when users have their entity icons drawing outlines.
    void
    setEntityIconLocation(net.minecraft.resources.Identifier entityIconLocation)
    Set the icon location for the entity.
    void
    setEntityToolTips(List<net.minecraft.network.chat.Component> entityToolTips)
    Sets the entity tooltip.
    void
    setLabelColor(int color)
    Sets the label color for the entity.
  • Method Details

    • getEntityRef

      WeakReference<net.minecraft.world.entity.Entity> getEntityRef()
      This is a weak reference to the Entity, setting any values on this entity will not change how journeymap displays or interacts with the entity.
      Returns:
      The entity reference.
    • getEntityId

      String getEntityId()
      The entity id, typically a UUID string.
      Returns:
      the entity id.
    • getEntityIconLocation

      @Nullable net.minecraft.resources.Identifier getEntityIconLocation()
      The icon resource location.
      Returns:
      - resource location.
    • getHostile

      Boolean getHostile()
      If the entity is hostile
      Returns:
      - the hostile boolean.
    • getAggro

      Boolean getAggro()
      If the entity is aggro toward the player
      Returns:
      - the aggro boolean.
    • getPosition

      net.minecraft.world.phys.Vec3 getPosition()
      The position of the entity.
      Returns:
      - the position vector.
    • getChunkPos

      net.minecraft.core.BlockPos getChunkPos()
      The chunk position of the entity. They y position is not the entity block Y. It is the Y slice.
      Returns:
      Block position of the entity's chunk.
    • getHeading

      double getHeading()
      The heading of the entity.
      Returns:
      - the heading.
    • getCustomName

      @Nullable net.minecraft.network.chat.Component getCustomName()
      The entity's custom name. This is a custom name that is set on an entity. It is not a the name of the pet.
      Returns:
      - the custom name.
    • getOwner

      @Nullable net.minecraft.world.entity.Entity getOwner()
      The owner Entity if the Entity is tamed.
      Returns:
      - the owner.
    • getProfession

      @Nullable String getProfession()
      The profession of the npc.
      Returns:
      - the profession.
    • getPlayerName

      @Nullable String getPlayerName()
      The player's name if the entity is a player.
      Returns:
      - the playername.
    • getBiome

      @Nullable net.minecraft.world.level.biome.Biome getBiome()
      Gets the entity's biome.
      Returns:
      - the Biome.
    • getDimension

      net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDimension()
      The dimension where the entity is located.
      Returns:
      - the dimension.
    • getUnderground

      @Nullable Boolean getUnderground()
      Is the entity is a player and underground
      Returns:
      - is underground.
    • isInvisible

      boolean isInvisible()
      Is entity invisible to the current player.
      Returns:
      - is invisible.
    • isSneaking

      boolean isSneaking()
      Is entity sneaking
      Returns:
      - is sneaking.
    • isPassiveAnimal

      boolean isPassiveAnimal()
      Is entity a passive animal
      Returns:
      - is a passive animal.
    • isAmbientCreature

      boolean isAmbientCreature()
      Is entity an ambient creature.
      Returns:
      is an ambient creature
    • isNpc

      boolean isNpc()
      Is entity an npc
      Returns:
      - is npc.
    • getColor

      int getColor()
      Gets the color of the icon displayed on the map.
      Returns:
      - the color
    • getLabelColor

      int getLabelColor()
      Gets the label color of the icon displayed on the map.
      Returns:
      - the color
    • isDisabled

      boolean isDisabled()
      Is the entity disabled from being drawn on the map.
      Returns:
      - is disabled.
    • getEntityToolTips

      @Nullable List<net.minecraft.network.chat.Component> getEntityToolTips()
      Gets the current entity tooltip
      Returns:
      - The tooltip list
    • setEntityToolTips

      void setEntityToolTips(@Nullable List<net.minecraft.network.chat.Component> entityToolTips)
      Sets the entity tooltip.
      Parameters:
      entityToolTips - - The tooltip list
    • setEntityIconLocation

      void setEntityIconLocation(net.minecraft.resources.Identifier entityIconLocation)
      Set the icon location for the entity. The icon is the image shown on the map if the player has display type set to icon.
      Parameters:
      entityIconLocation - - the resource location of the icon.
    • setCustomName

      void setCustomName(net.minecraft.network.chat.Component customName)
      Sets the custom name of the entity.
      Parameters:
      customName - - the custom name Component.
    • setCustomName

      void setCustomName(String customName)
      Sets the custom name of the entity.
      Parameters:
      customName - - the custom name value.
    • setLabelColor

      void setLabelColor(int color)
      Sets the label color for the entity. Avoid if setting the color in the component.
      Parameters:
      color - - the color.
    • setColor

      void setColor(int color)
      Sets the icon color of the dot when the user has the display set to dots.
      Parameters:
      color - - the color.
    • setDisable

      void setDisable(boolean disable)
      Disables the entity from being drawn on the map.
      Parameters:
      disable - - the disable.
    • setDrawOutline

      void setDrawOutline(boolean drawOutline)
      When setting a custom image via `setEntityIconLocation` if you want to disable the outline when users have their entity icons drawing outlines. Set to false, this is Default: true.
      Parameters:
      drawOutline - - to draw the icons outlines.