Interface IColonyEvent
- All Superinterfaces:
net.neoforged.neoforge.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.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Interface for all colony event types.
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationThe event type's idintgetID()Returns this events ID.Returns the events current statusdefault voidonFinish()Actions which are done on the finish/removal of the event.default voidCalled on night fall, to execute special day-based logic.default voidonStart()Actions which are done on the start of the event.default voidonTileEntityBreak(net.minecraft.world.level.block.entity.BlockEntity te) Called by tileentities relevant to the event on invalidation.default voidonUpdate()Onupdate function, called every 25s / 500 ticks.voidSets the colonyvoidsetStatus(EventStatus status) Sets the current event statusMethods inherited from interface net.neoforged.neoforge.common.util.INBTSerializable
deserializeNBT, serializeNBT
-
Method Details
-
getStatus
EventStatus getStatus()Returns the events current status- Returns:
- the status.
-
setStatus
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
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.
-