Search in sources :

Example 1 with CustomPayloadC2SPacket

use of net.minecraft.server.network.packet.CustomPayloadC2SPacket in project ImmersivePortalsMod by qouteall.

the class MyNetworkClient method createCtsTeleport.

public static CustomPayloadC2SPacket createCtsTeleport(DimensionType dimensionBefore, Vec3d posBefore, UUID portalEntityId) {
    PacketByteBuf buf = new PacketByteBuf(Unpooled.buffer());
    buf.writeInt(dimensionBefore.getRawId());
    buf.writeDouble(posBefore.x);
    buf.writeDouble(posBefore.y);
    buf.writeDouble(posBefore.z);
    buf.writeUuid(portalEntityId);
    return new CustomPayloadC2SPacket(MyNetwork.id_ctsTeleport, buf);
}
Also used : PacketByteBuf(net.minecraft.util.PacketByteBuf) CustomPayloadC2SPacket(net.minecraft.server.network.packet.CustomPayloadC2SPacket)

Aggregations

CustomPayloadC2SPacket (net.minecraft.server.network.packet.CustomPayloadC2SPacket)1 PacketByteBuf (net.minecraft.util.PacketByteBuf)1