ServerboundSetJigsawBlockPacket.java
net.minecraft.network.protocol.game.ServerboundSetJigsawBlockPacket
信息
- 全限定名:net.minecraft.network.protocol.game.ServerboundSetJigsawBlockPacket
- 类型:public class
- 包:net.minecraft.network.protocol.game
- 源码路径:src/main/java/net/minecraft/network/protocol/game/ServerboundSetJigsawBlockPacket.java
- 起始行号:L11
- 实现:Packet
- 职责:
TODO
字段/常量
-
STREAM_CODEC- 类型:
StreamCodec<FriendlyByteBuf,ServerboundSetJigsawBlockPacket> - 修饰符:
public static final - 源码定位:
L12 - 说明:
TODO
- 类型:
-
pos- 类型:
BlockPos - 修饰符:
private final - 源码定位:
L15 - 说明:
TODO
- 类型:
-
name- 类型:
Identifier - 修饰符:
private final - 源码定位:
L16 - 说明:
TODO
- 类型:
-
target- 类型:
Identifier - 修饰符:
private final - 源码定位:
L17 - 说明:
TODO
- 类型:
-
pool- 类型:
Identifier - 修饰符:
private final - 源码定位:
L18 - 说明:
TODO
- 类型:
-
finalState- 类型:
String - 修饰符:
private final - 源码定位:
L19 - 说明:
TODO
- 类型:
-
joint- 类型:
JigsawBlockEntity.JointType - 修饰符:
private final - 源码定位:
L20 - 说明:
TODO
- 类型:
-
selectionPriority- 类型:
int - 修饰符:
private final - 源码定位:
L21 - 说明:
TODO
- 类型:
-
placementPriority- 类型:
int - 修饰符:
private final - 源码定位:
L22 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
public ServerboundSetJigsawBlockPacket(BlockPos blockPos, Identifier name, Identifier target, Identifier pool, String finalState, JigsawBlockEntity.JointType joint, int selectionPriority, int placementPriority) @ L24
- 构造器名:ServerboundSetJigsawBlockPacket
- 源码定位:L24
- 修饰符:public
参数:
- blockPos: BlockPos
- name: Identifier
- target: Identifier
- pool: Identifier
- finalState: String
- joint: JigsawBlockEntity.JointType
- selectionPriority: int
- placementPriority: int
说明:
TODO
private ServerboundSetJigsawBlockPacket(FriendlyByteBuf input) @ L44
- 构造器名:ServerboundSetJigsawBlockPacket
- 源码定位:L44
- 修饰符:private
参数:
- input: FriendlyByteBuf
说明:
TODO
方法
下面的方法块按源码顺序生成。
private void write(FriendlyByteBuf output) @ L55
- 方法名:write
- 源码定位:L55
- 返回类型:void
- 修饰符:private
参数:
- output: FriendlyByteBuf
说明:
TODO
public PacketType<ServerboundSetJigsawBlockPacket> type() @ L66
- 方法名:type
- 源码定位:L66
- 返回类型:PacketType
- 修饰符:public
参数:
- 无
说明:
TODO
public void handle(ServerGamePacketListener listener) @ L71
- 方法名:handle
- 源码定位:L71
- 返回类型:void
- 修饰符:public
参数:
- listener: ServerGamePacketListener
说明:
TODO
public BlockPos getPos() @ L75
- 方法名:getPos
- 源码定位:L75
- 返回类型:BlockPos
- 修饰符:public
参数:
- 无
说明:
TODO
public Identifier getName() @ L79
- 方法名:getName
- 源码定位:L79
- 返回类型:Identifier
- 修饰符:public
参数:
- 无
说明:
TODO
public Identifier getTarget() @ L83
- 方法名:getTarget
- 源码定位:L83
- 返回类型:Identifier
- 修饰符:public
参数:
- 无
说明:
TODO
public Identifier getPool() @ L87
- 方法名:getPool
- 源码定位:L87
- 返回类型:Identifier
- 修饰符:public
参数:
- 无
说明:
TODO
public String getFinalState() @ L91
- 方法名:getFinalState
- 源码定位:L91
- 返回类型:String
- 修饰符:public
参数:
- 无
说明:
TODO
public JigsawBlockEntity.JointType getJoint() @ L95
- 方法名:getJoint
- 源码定位:L95
- 返回类型:JigsawBlockEntity.JointType
- 修饰符:public
参数:
- 无
说明:
TODO
public int getSelectionPriority() @ L99
- 方法名:getSelectionPriority
- 源码定位:L99
- 返回类型:int
- 修饰符:public
参数:
- 无
说明:
TODO
public int getPlacementPriority() @ L103
- 方法名:getPlacementPriority
- 源码定位:L103
- 返回类型:int
- 修饰符:public
参数:
- 无
说明:
TODO
代码
public class ServerboundSetJigsawBlockPacket implements Packet<ServerGamePacketListener> {
public static final StreamCodec<FriendlyByteBuf, ServerboundSetJigsawBlockPacket> STREAM_CODEC = Packet.codec(
ServerboundSetJigsawBlockPacket::write, ServerboundSetJigsawBlockPacket::new
);
private final BlockPos pos;
private final Identifier name;
private final Identifier target;
private final Identifier pool;
private final String finalState;
private final JigsawBlockEntity.JointType joint;
private final int selectionPriority;
private final int placementPriority;
public ServerboundSetJigsawBlockPacket(
BlockPos blockPos,
Identifier name,
Identifier target,
Identifier pool,
String finalState,
JigsawBlockEntity.JointType joint,
int selectionPriority,
int placementPriority
) {
this.pos = blockPos;
this.name = name;
this.target = target;
this.pool = pool;
this.finalState = finalState;
this.joint = joint;
this.selectionPriority = selectionPriority;
this.placementPriority = placementPriority;
}
private ServerboundSetJigsawBlockPacket(FriendlyByteBuf input) {
this.pos = input.readBlockPos();
this.name = input.readIdentifier();
this.target = input.readIdentifier();
this.pool = input.readIdentifier();
this.finalState = input.readUtf();
this.joint = JigsawBlockEntity.JointType.CODEC.byName(input.readUtf(), JigsawBlockEntity.JointType.ALIGNED);
this.selectionPriority = input.readVarInt();
this.placementPriority = input.readVarInt();
}
private void write(FriendlyByteBuf output) {
output.writeBlockPos(this.pos);
output.writeIdentifier(this.name);
output.writeIdentifier(this.target);
output.writeIdentifier(this.pool);
output.writeUtf(this.finalState);
output.writeUtf(this.joint.getSerializedName());
output.writeVarInt(this.selectionPriority);
output.writeVarInt(this.placementPriority);
}
@Override
public PacketType<ServerboundSetJigsawBlockPacket> type() {
return GamePacketTypes.SERVERBOUND_SET_JIGSAW_BLOCK;
}
public void handle(ServerGamePacketListener listener) {
listener.handleSetJigsawBlock(this);
}
public BlockPos getPos() {
return this.pos;
}
public Identifier getName() {
return this.name;
}
public Identifier getTarget() {
return this.target;
}
public Identifier getPool() {
return this.pool;
}
public String getFinalState() {
return this.finalState;
}
public JigsawBlockEntity.JointType getJoint() {
return this.joint;
}
public int getSelectionPriority() {
return this.selectionPriority;
}
public int getPlacementPriority() {
return this.placementPriority;
}
}引用的其他类
-
- 引用位置:
参数/字段/返回值
- 引用位置:
-
- 引用位置:
参数/字段
- 引用位置:
-
- 引用位置:
字段
- 引用位置:
-
- 引用位置:
实现/方法调用 - 关联成员:
Packet.codec()
- 引用位置:
-
- 引用位置:
返回值
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数/字段/返回值
- 引用位置:
-
- 引用位置:
参数/字段/返回值
- 引用位置: