Class AlterRestaurantMenuItemMessage

All Implemented Interfaces:
IMessage

public class AlterRestaurantMenuItemMessage extends AbstractBuildingServerMessage<IBuilding>
Alter a menu item message.
  • Constructor Details

    • AlterRestaurantMenuItemMessage

      public AlterRestaurantMenuItemMessage()
      Empty constructor used when registering the
  • Method Details

    • addMenuItem

      public static AlterRestaurantMenuItemMessage addMenuItem(IBuildingView building, net.minecraft.world.item.ItemStack itemStack, int runtimeID)
      Add a menu item to the building.
      Parameters:
      building - the building to add it to.
      itemStack - the stack to add.
      runtimeID - the id of the module.
      Returns:
      the message,
    • removeMenuItem

      public static AlterRestaurantMenuItemMessage removeMenuItem(IBuildingView building, net.minecraft.world.item.ItemStack itemStack, int runtimeID)
      Remove a menu item to the building.
      Parameters:
      building - the building to remove it from.
      itemStack - the stack to remove.
      runtimeID - the id of the module.
      Returns:
      the message,
    • fromBytesOverride

      public void fromBytesOverride(@NotNull @NotNull 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.
    • toBytesOverride

      public void toBytesOverride(@NotNull @NotNull 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.
    • onExecute

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