Interface IEntityTrackEntry

All Known Implementing Classes:
EntityTrackEntryAgeable, EntityTrackEntryCreeper, EntityTrackEntryDrone, EntityTrackEntryHackable, EntityTrackEntryItemFrame, EntityTrackEntryLivingBase, EntityTrackEntryMinecart, EntityTrackEntryMob, EntityTrackEntryPainting, EntityTrackEntryPlayer, EntityTrackEntryPressurizable, EntityTrackEntrySlime, EntityTrackEntryTameable

public interface IEntityTrackEntry
Implement this class and register it with IClientArmorRegistry.registerEntityTrackEntry(java.util.function.Supplier). Your implementation must provide a no-parameter constructor.

An instance of this tracker is created for each entity for which the tracker is applicable.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addInfo(net.minecraft.world.entity.Entity entity, List<net.minecraft.network.chat.Component> curInfo, boolean isLookingAtTarget)
    Add info to the tab.
    boolean
    isApplicable(net.minecraft.world.entity.Entity entity)
    Return true if you want to add a tooltip for the given entity.
    default void
    render(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource buffer, net.minecraft.world.entity.Entity entity, float partialTicks)
    Called every render tick, this method can be used to render additional info.
    default void
    tick(net.minecraft.world.entity.Entity entity)
    Called every client tick; can be used to update something like a timer (e.g.
  • Method Details

    • isApplicable

      boolean isApplicable(net.minecraft.world.entity.Entity entity)
      Return true if you want to add a tooltip for the given entity.
      Parameters:
      entity - the candidate entity
      Returns:
      true if this tracker is applicable to the given entity
    • addInfo

      void addInfo(net.minecraft.world.entity.Entity entity, List<net.minecraft.network.chat.Component> curInfo, boolean isLookingAtTarget)
      Add info to the tab. This is only called when isApplicable returned true.
      Parameters:
      entity - the tracked entity
      curInfo - list of text component to append information to
      isLookingAtTarget - true if the player is focused on the tracked entity
    • tick

      default void tick(net.minecraft.world.entity.Entity entity)
      Called every client tick; can be used to update something like a timer (e.g. used for the Creeper explosion countdown).
      Parameters:
      entity - the tracked entity
    • render

      default void render(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource buffer, net.minecraft.world.entity.Entity entity, float partialTicks)
      Called every render tick, this method can be used to render additional info. Used for Drone AI visualisation, for example.
      Parameters:
      entity - the tracked entity
      partialTicks - partial ticks since last full ticks