Class EnchanterWorkerSetMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage<BuildingEnchanter>
com.minecolonies.core.network.messages.server.colony.building.enchanter.EnchanterWorkerSetMessage
- All Implemented Interfaces:
IMessage
Message to set add or remove a worker to gather from.
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor used when registering theEnchanterWorkerSetMessage(@NotNull IBuildingView building, net.minecraft.core.BlockPos worker, boolean add) Create the enchanter worker -
Method Summary
Modifier and TypeMethodDescriptionvoidfromBytesOverride(@NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation from a byteStream to the variables.protected voidonExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, BuildingEnchanter 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
-
EnchanterWorkerSetMessage
public EnchanterWorkerSetMessage()Empty constructor used when registering the -
EnchanterWorkerSetMessage
public EnchanterWorkerSetMessage(@NotNull @NotNull IBuildingView building, net.minecraft.core.BlockPos worker, boolean add) Create the enchanter worker- Parameters:
building- the building of the enchanter.worker- the worker to add/remove.add- true if add, else false
-
-
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
protected void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, BuildingEnchanter building) - Specified by:
onExecutein classAbstractBuildingServerMessage<BuildingEnchanter>
-