Class GuardSetMinePosMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage<AbstractBuildingGuards>
com.minecolonies.core.network.messages.server.colony.building.guard.GuardSetMinePosMessage
- All Implemented Interfaces:
IMessage
Message to set the position of the mine a guard should patrol
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty standard constructorCreates an instance of the message to clear the positionGuardSetMinePosMessage(AbstractBuildingGuards.View building, net.minecraft.core.BlockPos minePos) Creates an instance of the message to set a new position -
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, AbstractBuildingGuards 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
-
GuardSetMinePosMessage
public GuardSetMinePosMessage()Empty standard constructor -
GuardSetMinePosMessage
public GuardSetMinePosMessage(@NotNull AbstractBuildingGuards.View building, net.minecraft.core.BlockPos minePos) Creates an instance of the message to set a new position- Parameters:
building- the building to apply the position change tominePos- the position of the mine
-
GuardSetMinePosMessage
Creates an instance of the message to clear the position- Parameters:
building- the building to apply the position change to
-
-
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, AbstractBuildingGuards building) - Specified by:
onExecutein classAbstractBuildingServerMessage<AbstractBuildingGuards>
-