Class AnimalDataView

java.lang.Object
com.minecolonies.core.colony.AnimalDataView
All Implemented Interfaces:
IAnimalDataView

public class AnimalDataView extends Object implements IAnimalDataView
  • Constructor Details

    • AnimalDataView

      public AnimalDataView(int id, ColonyView colonyView)
      Constructor
      Parameters:
      id -
      colonyView -
  • Method Details

    • deserialize

      public void deserialize(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buf)
      Deserialize the animal data view from a network buffer.
      Specified by:
      deserialize in interface IAnimalDataView
      Parameters:
      buf - the buffer to deserialize from
    • getId

      public int getId()
      Returns the id of the animal data view.
      Specified by:
      getId in interface IAnimalDataView
      Returns:
      the id of the animal data view
    • getHomeBuilding

      @Nullable public @Nullable net.minecraft.core.BlockPos getHomeBuilding()
      Gets the home building of the animal. This is the building that the animal considers to be its home.
      Specified by:
      getHomeBuilding in interface IAnimalDataView
      Returns:
      the home building of the animal, or null if the animal does not have a home building.
    • getCombatCooldown

      public float getCombatCooldown()
      Gets the combat cooldown of the animal.
      Specified by:
      getCombatCooldown in interface IAnimalDataView
      Returns:
      the combat cooldown of the animal