Class BuildingBuiltEvent

All Implemented Interfaces:
IBuildingEventDescription, IColonyEventDescription, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>

public class BuildingBuiltEvent extends AbstractBuildingEvent
Event handling a new building being built.
  • Field Details

    • BUILDING_BUILT_EVENT_ID

      public static final net.minecraft.resources.ResourceLocation BUILDING_BUILT_EVENT_ID
      This events id, registry entries use res locations as ids.
  • Constructor Details

    • BuildingBuiltEvent

      public BuildingBuiltEvent()
      Creates a new building built event.
    • BuildingBuiltEvent

      public BuildingBuiltEvent(net.minecraft.core.BlockPos eventPos, String buildingName)
      Creates a new building built event.
      Parameters:
      eventPos - the position of the hut block of the building.
      buildingName - the name of the building.
  • Method Details

    • getEventTypeId

      public net.minecraft.resources.ResourceLocation getEventTypeId()
      Description copied from interface: IColonyEventDescription
      Gets this event types registry id.
      Returns:
      this event types registry id.
    • getName

      public String getName()
      Description copied from interface: IColonyEventDescription
      Gets the name of this event type.
      Returns:
      the name of this event type.
    • loadFromNBT

      public static BuildingBuiltEvent loadFromNBT(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound)
      Loads the citizen born event from the given nbt.
      Parameters:
      compound - the NBT compound
      Returns:
      the colony to load.
    • loadFromFriendlyByteBuf

      public static BuildingBuiltEvent loadFromFriendlyByteBuf(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf)
      Loads the citizen born event from the given packet buffer.
      Parameters:
      buf - the packet buffer.
      Returns:
      the colony to load.