Class FarmFieldUpdateSeedMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.colony.building.fields.FarmFieldUpdateSeedMessage
- All Implemented Interfaces:
IMessage
Message to change the farm field current plant.
-
Constructor Summary
ConstructorsConstructorDescriptionForge default constructorFarmFieldUpdateSeedMessage(@NotNull IColony colony, net.minecraft.world.item.ItemStack newSeed, net.minecraft.core.BlockPos position) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidfromBytesOverride(net.minecraft.network.FriendlyByteBuf buf) Transformation from a byteStream to the variables.protected voidonExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony) voidtoBytesOverride(net.minecraft.network.FriendlyByteBuf buf) Transformation to a byteStream.Methods inherited from class com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
fromBytes, fromBytesAbstractOverride, getExecutionSide, onExecute, ownerOnly, permissionNeeded, toBytes, toBytesAbstractOverride
-
Constructor Details
-
FarmFieldUpdateSeedMessage
public FarmFieldUpdateSeedMessage()Forge default constructor -
FarmFieldUpdateSeedMessage
public FarmFieldUpdateSeedMessage(@NotNull @NotNull IColony colony, net.minecraft.world.item.ItemStack newSeed, net.minecraft.core.BlockPos position) Default constructor.- Parameters:
colony- the colony where the field is in.newSeed- the new seed to assign to the field.position- the field position.
-
-
Method Details
-
onExecute
protected void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony) - Specified by:
onExecutein classAbstractColonyServerMessage
-
toBytesOverride
public void toBytesOverride(net.minecraft.network.FriendlyByteBuf buf) Description copied from class:AbstractColonyServerMessageTransformation to a byteStream.- Specified by:
toBytesOverridein classAbstractColonyServerMessage- Parameters:
buf- the used byteBuffer.
-
fromBytesOverride
public void fromBytesOverride(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.
-