Package com.minecolonies.core.colony
Class AnimalDataView
java.lang.Object
com.minecolonies.core.colony.AnimalDataView
- All Implemented Interfaces:
IAnimalDataView
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserialize(@NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) Deserialize the animal data view from a network buffer.floatGets the combat cooldown of the animal.@Nullable net.minecraft.core.BlockPosGets the home building of the animal.intgetId()Returns the id of the animal data view.
-
Constructor Details
-
AnimalDataView
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:
deserializein interfaceIAnimalDataView- Parameters:
buf- the buffer to deserialize from
-
getId
public int getId()Returns the id of the animal data view.- Specified by:
getIdin interfaceIAnimalDataView- 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:
getHomeBuildingin interfaceIAnimalDataView- 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:
getCombatCooldownin interfaceIAnimalDataView- Returns:
- the combat cooldown of the animal
-