Class AlterRestaurantMenuItemMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage<IBuilding>
com.minecolonies.core.network.messages.server.colony.building.AlterRestaurantMenuItemMessage
- All Implemented Interfaces:
IMessage
Alter a menu item message.
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor used when registering the -
Method Summary
Modifier and TypeMethodDescriptionaddMenuItem(IBuildingView building, net.minecraft.world.item.ItemStack itemStack, int runtimeID) Add a menu item to the building.voidfromBytesOverride(@NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation from a byteStream to the variables.voidonExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, IBuilding building) removeMenuItem(IBuildingView building, net.minecraft.world.item.ItemStack itemStack, int runtimeID) Remove a menu item to the building.voidtoBytesOverride(@NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation to a byteStream.Methods inherited from class com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage
errorIfCastFails, fromBytesAbstractOverride, onExecute, toBytesAbstractOverrideMethods inherited from class com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
fromBytes, getExecutionSide, onExecute, ownerOnly, permissionNeeded, toBytes
-
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:AbstractColonyServerMessageTransformation from a byteStream to the variables.- Specified by:
fromBytesOverridein classAbstractColonyServerMessage- Parameters:
buf- the used byteBuffer.
-
toBytesOverride
public void toBytesOverride(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) Description copied from class:AbstractColonyServerMessageTransformation to a byteStream.- Specified by:
toBytesOverridein classAbstractColonyServerMessage- Parameters:
buf- the used byteBuffer.
-
onExecute
public void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, IBuilding building) - Specified by:
onExecutein classAbstractBuildingServerMessage<IBuilding>
-