ServerboundPaddleBoatPacket .java

net.minecraft.network.protocol.game.ServerboundPaddleBoatPacket (class, 47 lines): members: getLeft, getRight, right, left, handle, STREAM_CODEC, type.

net.minecraft.network.protocol.gameclass47 linescommon1.3 KB

Implements

API Surface (4)

void handle(final ServerGamePacketListener listener)
PacketType<ServerboundPaddleBoatPacket> type()
boolean getLeft()
boolean getRight()

Fields & Constants (3)

STREAM_CODEC
left
right

Same Package (197)

Code Graph: Dependencies (5)

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

Full Source

ServerboundPaddleBoatPacket.java47 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.network.protocol.game;
2
3
import net.minecraft.network.FriendlyByteBuf;
4
import net.minecraft.network.codec.StreamCodec;
5
import net.minecraft.network.protocol.Packet;
6
import net.minecraft.network.protocol.PacketType;
7
8
public class ServerboundPaddleBoatPacket implements Packet<ServerGamePacketListener> {
9
	public static final StreamCodec<FriendlyByteBuf, ServerboundPaddleBoatPacket> STREAM_CODEC = Packet.codec(
10
		ServerboundPaddleBoatPacket::write, ServerboundPaddleBoatPacket::new
11
	);
12
	private final boolean left;
13
	private final boolean right;
14
15
	public ServerboundPaddleBoatPacket(final boolean left, final boolean right) {
16
		this.left = left;
17
		this.right = right;
18
	}
19
20
	private ServerboundPaddleBoatPacket(final FriendlyByteBuf input) {
21
		this.left = input.readBoolean();
22
		this.right = input.readBoolean();
23
	}
24
25
	private void write(final FriendlyByteBuf output) {
26
		output.writeBoolean(this.left);
27
		output.writeBoolean(this.right);
28
	}
29
30
	public void handle(final ServerGamePacketListener listener) {
31
		listener.handlePaddleBoat(this);
32
	}
33
34
	@Override
35
	public PacketType<ServerboundPaddleBoatPacket> type() {
36
		return GamePacketTypes.SERVERBOUND_PADDLE_BOAT;
37
	}
38
39
	public boolean getLeft() {
40
		return this.left;
41
	}
42
43
	public boolean getRight() {
44
		return this.right;
45
	}
46
}
47

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