Class CitizenGrownUpEvent
java.lang.Object
com.minecolonies.core.colony.eventhooks.citizenEvents.AbstractCitizenEvent
com.minecolonies.core.colony.eventhooks.citizenEvents.CitizenGrownUpEvent
- All Implemented Interfaces:
ICitizenEventDescription,IColonyEventDescription,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
The event for handling a citizen growing up.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationThis events id, registry entries use res locations as ids. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new citizen grown up event.CitizenGrownUpEvent(net.minecraft.core.BlockPos eventPos, String citizenName) Creates a new citizen grown up event. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationGets this event types registry id.getName()Gets the name of this event type.static CitizenGrownUpEventloadFromFriendlyByteBuf(@NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) Loads the citizen grown up event from the given packet buffer.static CitizenGrownUpEventloadFromNBT(net.minecraft.core.HolderLookup.Provider provider, @NotNull net.minecraft.nbt.CompoundTag compound) Loads the citizen grown up event from the given nbt.Methods inherited from class com.minecolonies.core.colony.eventhooks.citizenEvents.AbstractCitizenEvent
deserialize, deserializeNBT, getCitizenName, getEventPos, serialize, serializeNBT, setCitizenName, setEventPos, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.colonyEvents.descriptions.ICitizenEventDescription
toDisplayString
-
Field Details
-
CITIZEN_GROWN_UP_EVENT_ID
public static final net.minecraft.resources.ResourceLocation CITIZEN_GROWN_UP_EVENT_IDThis events id, registry entries use res locations as ids.
-
-
Constructor Details
-
CitizenGrownUpEvent
public CitizenGrownUpEvent()Creates a new citizen grown up event. -
CitizenGrownUpEvent
Creates a new citizen grown up event.- Parameters:
eventPos- the position of the hut block of the building.citizenName- the name of the building.
-
-
Method Details
-
getEventTypeId
public net.minecraft.resources.ResourceLocation getEventTypeId()Description copied from interface:IColonyEventDescriptionGets this event types registry id.- Returns:
- this event types registry id.
-
getName
Description copied from interface:IColonyEventDescriptionGets the name of this event type.- Returns:
- the name of this event type.
-
loadFromNBT
public static CitizenGrownUpEvent loadFromNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, @NotNull @NotNull net.minecraft.nbt.CompoundTag compound) Loads the citizen grown up event from the given nbt.- Parameters:
compound- the NBT compound- Returns:
- the colony to load.
-
loadFromFriendlyByteBuf
public static CitizenGrownUpEvent loadFromFriendlyByteBuf(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) Loads the citizen grown up event from the given packet buffer.- Parameters:
buf- the packet buffer.- Returns:
- the colony to load.
-