ServerboundPaddleBoatPacket.java
net.minecraft.network.protocol.game.ServerboundPaddleBoatPacket
信息
- 全限定名:net.minecraft.network.protocol.game.ServerboundPaddleBoatPacket
- 类型:public class
- 包:net.minecraft.network.protocol.game
- 源码路径:src/main/java/net/minecraft/network/protocol/game/ServerboundPaddleBoatPacket.java
- 起始行号:L8
- 实现:Packet
- 职责:
TODO
字段/常量
-
STREAM_CODEC- 类型:
StreamCodec<FriendlyByteBuf,ServerboundPaddleBoatPacket> - 修饰符:
public static final - 源码定位:
L9 - 说明:
TODO
- 类型:
-
left- 类型:
boolean - 修饰符:
private final - 源码定位:
L12 - 说明:
TODO
- 类型:
-
right- 类型:
boolean - 修饰符:
private final - 源码定位:
L13 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
public ServerboundPaddleBoatPacket(boolean left, boolean right) @ L15
- 构造器名:ServerboundPaddleBoatPacket
- 源码定位:L15
- 修饰符:public
参数:
- left: boolean
- right: boolean
说明:
TODO
private ServerboundPaddleBoatPacket(FriendlyByteBuf input) @ L20
- 构造器名:ServerboundPaddleBoatPacket
- 源码定位:L20
- 修饰符:private
参数:
- input: FriendlyByteBuf
说明:
TODO
方法
下面的方法块按源码顺序生成。
private void write(FriendlyByteBuf output) @ L25
- 方法名:write
- 源码定位:L25
- 返回类型:void
- 修饰符:private
参数:
- output: FriendlyByteBuf
说明:
TODO
public void handle(ServerGamePacketListener listener) @ L30
- 方法名:handle
- 源码定位:L30
- 返回类型:void
- 修饰符:public
参数:
- listener: ServerGamePacketListener
说明:
TODO
public PacketType<ServerboundPaddleBoatPacket> type() @ L34
- 方法名:type
- 源码定位:L34
- 返回类型:PacketType
- 修饰符:public
参数:
- 无
说明:
TODO
public boolean getLeft() @ L39
- 方法名:getLeft
- 源码定位:L39
- 返回类型:boolean
- 修饰符:public
参数:
- 无
说明:
TODO
public boolean getRight() @ L43
- 方法名:getRight
- 源码定位:L43
- 返回类型:boolean
- 修饰符:public
参数:
- 无
说明:
TODO
代码
public class ServerboundPaddleBoatPacket implements Packet<ServerGamePacketListener> {
public static final StreamCodec<FriendlyByteBuf, ServerboundPaddleBoatPacket> STREAM_CODEC = Packet.codec(
ServerboundPaddleBoatPacket::write, ServerboundPaddleBoatPacket::new
);
private final boolean left;
private final boolean right;
public ServerboundPaddleBoatPacket(boolean left, boolean right) {
this.left = left;
this.right = right;
}
private ServerboundPaddleBoatPacket(FriendlyByteBuf input) {
this.left = input.readBoolean();
this.right = input.readBoolean();
}
private void write(FriendlyByteBuf output) {
output.writeBoolean(this.left);
output.writeBoolean(this.right);
}
public void handle(ServerGamePacketListener listener) {
listener.handlePaddleBoat(this);
}
@Override
public PacketType<ServerboundPaddleBoatPacket> type() {
return GamePacketTypes.SERVERBOUND_PADDLE_BOAT;
}
public boolean getLeft() {
return this.left;
}
public boolean getRight() {
return this.right;
}
}引用的其他类
-
- 引用位置:
参数/字段
- 引用位置:
-
- 引用位置:
字段
- 引用位置:
-
- 引用位置:
实现/方法调用 - 关联成员:
Packet.codec()
- 引用位置:
-
- 引用位置:
返回值
- 引用位置:
-
- 引用位置:
参数
- 引用位置: