Class TeleportToColonyMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.colony.TeleportToColonyMessage
- All Implemented Interfaces:
IMessage,IRangeRestrictedPacket
public class TeleportToColonyMessage
extends AbstractColonyServerMessage
implements IRangeRestrictedPacket
Message for trying to teleport to a friends colony.
-
Field Summary
Fields inherited from interface com.minecolonies.core.network.IRangeRestrictedPacket
DEFAULT_RANGE -
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, toBytesAbstractOverrideMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.core.network.IRangeRestrictedPacket
getMaxRange, isInRange
-
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.
-