Interface IAnimalDataView
- All Known Implementing Classes:
AnimalDataView
public interface IAnimalDataView
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeserialize(@NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) Deserialize the attributes and variables from transition.floatGets the combat cooldown of the animal.@Nullable net.minecraft.core.BlockPosGets the block position of the animal's home building.intgetId()Get the id of the animal.
-
Method Details
-
deserialize
void deserialize(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) Deserialize the attributes and variables from transition.- Parameters:
buf- Byte buffer to deserialize.
-
getId
int getId()Get the id of the animal.- Returns:
- the animal id.
-
getHomeBuilding
@Nullable @Nullable net.minecraft.core.BlockPos getHomeBuilding()Gets the block position of the animal's home building.- Returns:
- the block position of the home building, or null if the animal does not have a home building.
-
getCombatCooldown
float getCombatCooldown()Gets the combat cooldown of the animal.- Returns:
- the combat cooldown of the animal.
-