Class AssignFilterableItemMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage<AbstractBuilding>
com.minecolonies.core.network.messages.server.colony.building.AssignFilterableItemMessage
- All Implemented Interfaces:
IMessage
Message which handles the assignment of items to filterable item lists.
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty standard constructor.AssignFilterableItemMessage(IBuildingView building, int id, ItemStorage item, boolean assign) Creates the message to add an item. -
Method Summary
Modifier and TypeMethodDescriptionvoidfromBytesOverride(@NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation from a byteStream to the variables.voidonExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, AbstractBuilding 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
-
AssignFilterableItemMessage
public AssignFilterableItemMessage()Empty standard constructor. -
AssignFilterableItemMessage
public AssignFilterableItemMessage(IBuildingView building, int id, ItemStorage item, boolean assign) Creates the message to add an item.- Parameters:
id- the id of the list of filterables.assign- compost if true, dont if false.item- the item to assignbuilding- the building we're executing on.
-
-
Method Details
-
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, AbstractBuilding building) - Specified by:
onExecutein classAbstractBuildingServerMessage<AbstractBuilding>
-