Interface IColonyEventDescription
- All Superinterfaces:
net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
- All Known Subinterfaces:
IBuildingEventDescription,ICitizenEventDescription
- All Known Implementing Classes:
AbstractBuildingEvent,AbstractCitizenEvent,AbstractEvent,BuildingBuiltEvent,BuildingDeconstructedEvent,BuildingRepairedEvent,BuildingUpgradedEvent,CitizenBornEvent,CitizenDiedEvent,CitizenGrownUpEvent,CitizenSpawnedEvent,VisitorSpawnedEvent
public interface IColonyEventDescription
extends net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Description for an event that happened in the colony.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeserialize(net.minecraft.network.FriendlyByteBuf buf) Deserializes this event from the givenFriendlyByteBuf.intgetDay()Get the day the event occured.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.default StringGet the summary translation key.booleanIf the event should be included at the end of day summary.voidserialize(net.minecraft.network.FriendlyByteBuf buf) Serializes this event to the givenFriendlyByteBuf.voidsetDay(int day) Set the day it happened at.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.minecraftforge.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.FriendlyByteBuf buf) Serializes this event to the givenFriendlyByteBuf.- Parameters:
buf- theFriendlyByteBufto serialize to.
-
deserialize
void deserialize(net.minecraft.network.FriendlyByteBuf buf) Deserializes this event from the givenFriendlyByteBuf.- Parameters:
buf- theFriendlyByteBufto deserialize from.
-
getDay
int getDay()Get the day the event occured.- Returns:
- true.
-
setDay
void setDay(int day) Set the day it happened at.- Parameters:
day- the day.
-
includeInSummary
boolean includeInSummary()If the event should be included at the end of day summary.- Returns:
- true if so.
-
getSummaryTranslationKey
Get the summary translation key.- Returns:
- the translation key.
-