Class AbstractEvent

java.lang.Object
com.minecolonies.core.colony.eventhooks.AbstractEvent
All Implemented Interfaces:
IColonyEventDescription, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Direct Known Subclasses:
AbstractBuildingEvent, AbstractCitizenEvent

public abstract class AbstractEvent extends Object implements IColonyEventDescription
The abstract event handling building/upgrading huts.
  • Constructor Details

    • AbstractEvent

      public AbstractEvent()
      Creates a new building event.
    • AbstractEvent

      public AbstractEvent(boolean includeInSummary)
      Creates a new abstract event.
      Parameters:
      includeInSummary -
  • Method Details

    • serializeNBT

      public net.minecraft.nbt.CompoundTag serializeNBT()
      Specified by:
      serializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
    • deserializeNBT

      public void deserializeNBT(net.minecraft.nbt.CompoundTag compound)
      Specified by:
      deserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
    • serialize

      public void serialize(net.minecraft.network.FriendlyByteBuf buf)
      Description copied from interface: IColonyEventDescription
      Serializes this event to the given FriendlyByteBuf.
      Specified by:
      serialize in interface IColonyEventDescription
      Parameters:
      buf - the FriendlyByteBuf to serialize to.
    • deserialize

      public void deserialize(net.minecraft.network.FriendlyByteBuf buf)
      Description copied from interface: IColonyEventDescription
      Deserializes this event from the given FriendlyByteBuf.
      Specified by:
      deserialize in interface IColonyEventDescription
      Parameters:
      buf - the FriendlyByteBuf to deserialize from.
    • includeInSummary

      public boolean includeInSummary()
      Description copied from interface: IColonyEventDescription
      If the event should be included at the end of day summary.
      Specified by:
      includeInSummary in interface IColonyEventDescription
      Returns:
      true if so.
    • getDay

      public int getDay()
      Description copied from interface: IColonyEventDescription
      Get the day the event occured.
      Specified by:
      getDay in interface IColonyEventDescription
      Returns:
      true.
    • setDay

      public void setDay(int day)
      Description copied from interface: IColonyEventDescription
      Set the day it happened at.
      Specified by:
      setDay in interface IColonyEventDescription
      Parameters:
      day - the day.
    • toString

      public String toString()
      Overrides:
      toString in class Object