Interface IColonyEventDescription

All Superinterfaces:
net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
All Known Subinterfaces:
IBuildingEventDescription, ICitizenEventDescription
All Known Implementing Classes:
AbstractBuildingEvent, AbstractCitizenEvent, AbstractEvent, BuildingBuiltEvent, BuildingDeconstructedEvent, BuildingRepairedEvent, BuildingUpgradedEvent, CitizenBornEvent, CitizenDiedEvent, CitizenGrownUpEvent, CitizenSpawnedEvent, VisitorSpawnedEvent

public interface IColonyEventDescription extends net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Description for an event that happened in the colony.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deserialize(net.minecraft.network.FriendlyByteBuf buf)
    Deserializes this event from the given FriendlyByteBuf.
    int
    Get the day the event occured.
    net.minecraft.core.BlockPos
    Returns the position at which this event occurred.
    net.minecraft.resources.ResourceLocation
    Gets this event types registry id.
    Gets the name of this event type.
    default String
    Get the summary translation key.
    boolean
    If the event should be included at the end of day summary.
    void
    serialize(net.minecraft.network.FriendlyByteBuf buf)
    Serializes this event to the given FriendlyByteBuf.
    void
    setDay(int day)
    Set the day it happened at.
    void
    setEventPos(net.minecraft.core.BlockPos pos)
    Sets the position this event happened at.
    default String
    Builds the string to show in the colony events list.

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

    deserializeNBT, serializeNBT
  • Method Details

    • getEventTypeId

      net.minecraft.resources.ResourceLocation getEventTypeId()
      Gets this event types registry id.
      Returns:
      this event types registry id.
    • getName

      String getName()
      Gets the name of this event type.
      Returns:
      the name of this event type.
    • toDisplayString

      default String toDisplayString()
      Builds the string to show in the colony events list.
      Returns:
      the string to show in the colony events list.
    • getEventPos

      net.minecraft.core.BlockPos getEventPos()
      Returns the position at which this event occurred.
      Returns:
      the position at which this event occurred.
    • setEventPos

      void setEventPos(net.minecraft.core.BlockPos pos)
      Sets the position this event happened at.
      Parameters:
      pos - the position this event happened at.
    • serialize

      void serialize(net.minecraft.network.FriendlyByteBuf buf)
      Serializes this event to the given FriendlyByteBuf.
      Parameters:
      buf - the FriendlyByteBuf to serialize to.
    • deserialize

      void deserialize(net.minecraft.network.FriendlyByteBuf buf)
      Deserializes this event from the given FriendlyByteBuf.
      Parameters:
      buf - the FriendlyByteBuf to deserialize from.
    • getDay

      int getDay()
      Get the day the event occured.
      Returns:
      true.
    • setDay

      void setDay(int day)
      Set the day it happened at.
      Parameters:
      day - the day.
    • includeInSummary

      boolean includeInSummary()
      If the event should be included at the end of day summary.
      Returns:
      true if so.
    • getSummaryTranslationKey

      default String getSummaryTranslationKey()
      Get the summary translation key.
      Returns:
      the translation key.