Interface IColonyEventDescription
- All Superinterfaces:
net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
- All Known Subinterfaces:
IBuildingEventDescription,ICitizenEventDescription
- All Known Implementing Classes:
AbstractBuildingEvent,AbstractCitizenEvent,BuildingBuiltEvent,BuildingDeconstructedEvent,BuildingRepairedEvent,BuildingUpgradedEvent,CitizenBornEvent,CitizenDiedEvent,CitizenGrownUpEvent,CitizenSpawnedEvent,VisitorSpawnedEvent
public interface IColonyEventDescription
extends net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Description for an event that happened in the colony.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeserialize(net.minecraft.network.RegistryFriendlyByteBuf buf) Deserializes this event from the givenRegistryFriendlyByteBuf.net.minecraft.core.BlockPosReturns the position at which this event occurred.net.minecraft.resources.ResourceLocationGets this event types registry id.getName()Gets the name of this event type.voidserialize(net.minecraft.network.RegistryFriendlyByteBuf buf) Serializes this event to the givenRegistryFriendlyByteBuf.voidsetEventPos(net.minecraft.core.BlockPos pos) Sets the position this event happened at.default StringBuilds the string to show in the colony events list.Methods inherited from interface net.neoforged.neoforge.common.util.INBTSerializable
deserializeNBT, serializeNBT
-
Method Details
-
getEventTypeId
net.minecraft.resources.ResourceLocation getEventTypeId()Gets this event types registry id.- Returns:
- this event types registry id.
-
getName
String getName()Gets the name of this event type.- Returns:
- the name of this event type.
-
toDisplayString
Builds the string to show in the colony events list.- Returns:
- the string to show in the colony events list.
-
getEventPos
net.minecraft.core.BlockPos getEventPos()Returns the position at which this event occurred.- Returns:
- the position at which this event occurred.
-
setEventPos
void setEventPos(net.minecraft.core.BlockPos pos) Sets the position this event happened at.- Parameters:
pos- the position this event happened at.
-
serialize
void serialize(net.minecraft.network.RegistryFriendlyByteBuf buf) Serializes this event to the givenRegistryFriendlyByteBuf.- Parameters:
buf- theRegistryFriendlyByteBufto serialize to.
-
deserialize
void deserialize(net.minecraft.network.RegistryFriendlyByteBuf buf) Deserializes this event from the givenRegistryFriendlyByteBuf.- Parameters:
buf- theRegistryFriendlyByteBufto deserialize from.
-