Class TeleportToColonyMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.colony.TeleportToColonyMessage
- All Implemented Interfaces:
IMessage
Message for trying to teleport to a friends colony.
-
Constructor Summary
ConstructorsConstructorDescriptionTeleportToColonyMessage(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimensionId, int colonyId, net.minecraft.core.BlockPos pos, int originColonyId, int cost) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfromBytesOverride(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 Actionprotected 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, toBytes, toBytesAbstractOverride
-
Constructor Details
-
TeleportToColonyMessage
public TeleportToColonyMessage() -
TeleportToColonyMessage
public TeleportToColonyMessage(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimensionId, int colonyId, net.minecraft.core.BlockPos pos, int originColonyId, int cost)
-
-
Method Details
-
permissionNeeded
- Overrides:
permissionNeededin classAbstractColonyServerMessage
-
onExecute
protected void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony) - Specified by:
onExecutein classAbstractColonyServerMessage
-
toBytesOverride
protected 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
protected 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.
-