ClientboundMoveVehiclePacket .java

net.minecraft.network.protocol.game.ClientboundMoveVehiclePacket (record): members: movingTo, fromEntity, handle, STREAM_CODEC, type. imports: ByteBuf.

net.minecraft.network.protocol.gamerecord27 linescommon1023 B

Implements

API Surface (3)

ClientboundMoveVehiclePacket fromEntity(final Entity entity)
PacketType<ClientboundMoveVehiclePacket> type()
void handle(final ClientGamePacketListener listener)

Fields & Constants (1)

STREAM_CODEC

Same Package (197)

Code Graph: Dependencies (6)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

ClientboundMoveVehiclePacket.java27 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.network.protocol.game;
2
3
import io.netty.buffer.ByteBuf;
4
import net.minecraft.core.PositionAndRotation;
5
import net.minecraft.network.codec.StreamCodec;
6
import net.minecraft.network.protocol.Packet;
7
import net.minecraft.network.protocol.PacketType;
8
import net.minecraft.world.entity.Entity;
9
10
public record ClientboundMoveVehiclePacket(PositionAndRotation movingTo) implements Packet<ClientGamePacketListener> {
11
	public static final StreamCodec<ByteBuf, ClientboundMoveVehiclePacket> STREAM_CODEC = PositionAndRotation.STREAM_CODEC
12
		.map(ClientboundMoveVehiclePacket::new, ClientboundMoveVehiclePacket::movingTo);
13
14
	public static ClientboundMoveVehiclePacket fromEntity(final Entity entity) {
15
		return new ClientboundMoveVehiclePacket(entity.storePositionAndRotation());
16
	}
17
18
	@Override
19
	public PacketType<ClientboundMoveVehiclePacket> type() {
20
		return GamePacketTypes.CLIENTBOUND_MOVE_VEHICLE;
21
	}
22
23
	public void handle(final ClientGamePacketListener listener) {
24
		listener.handleMoveVehicle(this);
25
	}
26
}
27

Decompiled Minecraft 26.3 source of ClientboundMoveVehiclePacket (net/minecraft/network/protocol/game/ClientboundMoveVehiclePacket.java) with Mojang official mappings, stored verbatim on the site.