Interface IColonyEvent

All Superinterfaces:
net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
All Known Subinterfaces:
IColonyEntitySpawnEvent, IColonyRaidEvent, IColonySpawnEvent, IColonyStructureSpawnEvent
All Known Implementing Classes:
AbstractShipRaidEvent, AmazonRaidEvent, BarbarianRaidEvent, DrownedPirateRaidEvent, EgyptianRaidEvent, HordeRaidEvent, NorsemenRaidEvent, NorsemenShipRaidEvent, PirateGroundRaidEvent, PirateRaidEvent

public interface IColonyEvent extends net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Interface for all colony event types.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.resources.ResourceLocation
    The event type's id
    int
    Returns this events ID.
    Returns the events current status
    default void
    Actions which are done on the finish/removal of the event.
    default void
    Called on night fall, to execute special day-based logic.
    default void
    Actions which are done on the start of the event.
    default void
    onTileEntityBreak(net.minecraft.world.level.block.entity.BlockEntity te)
    Called by tileentities relevant to the event on invalidation.
    default void
    Onupdate function, called every 25s / 500 ticks.
    void
    setColony(@NotNull IColony colony)
    Sets the colony
    void
    Sets the current event status

    Methods inherited from interface net.minecraftforge.common.util.INBTSerializable

    deserializeNBT, serializeNBT
  • Method Details

    • getStatus

      EventStatus getStatus()
      Returns the events current status
      Returns:
      the status.
    • setStatus

      void setStatus(EventStatus status)
      Sets the current event status
      Parameters:
      status - the status to set.
    • getID

      int getID()
      Returns this events ID.
      Returns:
      the event id.
    • getEventTypeID

      net.minecraft.resources.ResourceLocation getEventTypeID()
      The event type's id
      Returns:
      the event type id.
    • setColony

      void setColony(@NotNull @NotNull IColony colony)
      Sets the colony
      Parameters:
      colony - the colony to set.
    • onUpdate

      default void onUpdate()
      Onupdate function, called every 25s / 500 ticks. Comes from colony then goes to the eventmanager and then to the event.
    • onStart

      default void onStart()
      Actions which are done on the start of the event.
    • onFinish

      default void onFinish()
      Actions which are done on the finish/removal of the event.
    • onTileEntityBreak

      default void onTileEntityBreak(net.minecraft.world.level.block.entity.BlockEntity te)
      Called by tileentities relevant to the event on invalidation.
      Parameters:
      te - the broken Tile entity.
    • onNightFall

      default void onNightFall()
      Called on night fall, to execute special day-based logic.