Class ChangeFreeToInteractBlockMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.colony.ChangeFreeToInteractBlockMessage
- All Implemented Interfaces:
IMessage
Message to execute the renaiming of the townHall.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnums of modes this message exists.static enumEnums for Message Type for the freeBlock -
Constructor Summary
ConstructorsConstructorDescriptionEmpty public constructor.ChangeFreeToInteractBlockMessage(@NotNull IColonyView colony, @NotNull net.minecraft.core.BlockPos pos, @NotNull ChangeFreeToInteractBlockMessage.MessageType type) Message creation to add a new freely interactable position to the colony.ChangeFreeToInteractBlockMessage(@NotNull IColonyView colony, @NotNull net.minecraft.world.level.block.Block block, @NotNull ChangeFreeToInteractBlockMessage.MessageType type) Message creation to add a new freely interactable block to the colony. -
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) @Nullable ActionvoidtoBytesOverride(@NotNull 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, toBytes, toBytesAbstractOverride
-
Constructor Details
-
ChangeFreeToInteractBlockMessage
public ChangeFreeToInteractBlockMessage()Empty public constructor. -
ChangeFreeToInteractBlockMessage
public ChangeFreeToInteractBlockMessage(@NotNull @NotNull IColonyView colony, @NotNull @NotNull net.minecraft.world.level.block.Block block, @NotNull @NotNull ChangeFreeToInteractBlockMessage.MessageType type) Message creation to add a new freely interactable block to the colony.- Parameters:
colony- Colony the block can be interacted with in.block- the blockState.type- the type of
-
ChangeFreeToInteractBlockMessage
public ChangeFreeToInteractBlockMessage(@NotNull @NotNull IColonyView colony, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull ChangeFreeToInteractBlockMessage.MessageType type) Message creation to add a new freely interactable position to the colony.- Parameters:
colony- Colony the position can be interacted with in.pos- the position.type- the type of
-
-
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.
-
permissionNeeded
- Overrides:
permissionNeededin classAbstractColonyServerMessage
-
onExecute
protected void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony) - Specified by:
onExecutein classAbstractColonyServerMessage
-