All Implemented Interfaces:
IMessage

public class HireFireMessage extends AbstractBuildingServerMessage<IBuilding>
Message class which manages the messages hiring or firing of citizens.
  • Constructor Details

    • HireFireMessage

      public HireFireMessage()
      Empty public constructor.
    • HireFireMessage

      public HireFireMessage(@NotNull @NotNull IBuildingView building, boolean hire, int citizenID, int moduleId)
      Creates object for the player to hire or fire a citizen.
      Parameters:
      building - view of the building to read data from
      hire - hire or fire the citizens
      citizenID - the id of the citizen to fill the job.
  • Method Details

    • fromBytesOverride

      public void fromBytesOverride(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf)
      Transformation from a byteStream to the variables.
      Specified by:
      fromBytesOverride in class AbstractColonyServerMessage
      Parameters:
      buf - the used byteBuffer.
    • toBytesOverride

      public void toBytesOverride(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf)
      Transformation to a byteStream.
      Specified by:
      toBytesOverride in class AbstractColonyServerMessage
      Parameters:
      buf - the used byteBuffer.
    • onExecute

      protected void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, IBuilding building)
      Specified by:
      onExecute in class AbstractBuildingServerMessage<IBuilding>