All Implemented Interfaces:
IMessage

public class SortBuildingMessage extends AbstractBuildingServerMessage<IBuilding>
Sort the specified building inventory if the building allows it.
  • Constructor Details

    • SortBuildingMessage

      public SortBuildingMessage()
      Empty constructor used when registering the message
    • SortBuildingMessage

      public SortBuildingMessage(IBuildingView building)
  • Method Details

    • toBytesOverride

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

      protected void fromBytesOverride(net.minecraft.network.FriendlyByteBuf buf)
      Description copied from class: AbstractColonyServerMessage
      Transformation from a byteStream to the variables.
      Specified by:
      fromBytesOverride in class AbstractColonyServerMessage
      Parameters:
      buf - the used byteBuffer.
    • onExecute

      protected void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, IBuilding building)
      Sort the building's inventory if it can be sorted.
      Specified by:
      onExecute in class AbstractBuildingServerMessage<IBuilding>
      Parameters:
      ctxIn - the context of the network event
      isLogicalServer - whether or not this is the logical server
      colony - the colony which the building is in
      building - the building to sort