|
21 | 21 | this.mirror = buf.readEnumValue(Mirror.class); |
22 | 22 | this.rotation = buf.readEnumValue(Rotation.class); |
23 | 23 | this.field_210399_i = buf.readString(12); |
| 24 | +@@ -70,6 +73,21 @@ |
| 25 | + this.field_210400_j = (i & 1) != 0; |
| 26 | + this.field_210401_k = (i & 2) != 0; |
| 27 | + this.field_210402_l = (i & 4) != 0; |
| 28 | ++ |
| 29 | ++ // [CM] Fabric Carpet 1.4.25+ Protocol for rule structureBlockLimit |
| 30 | ++ if (buf.readableBytes() == 6 * 4) |
| 31 | ++ { |
| 32 | ++ this.field_210395_e = new BlockPos( |
| 33 | ++ MathHelper.clamp(buf.readInt(), -limit, limit), |
| 34 | ++ MathHelper.clamp(buf.readInt(), -limit, limit), |
| 35 | ++ MathHelper.clamp(buf.readInt(), -limit, limit) |
| 36 | ++ ); |
| 37 | ++ this.size = new BlockPos( |
| 38 | ++ MathHelper.clamp(buf.readInt(), 0, limit), |
| 39 | ++ MathHelper.clamp(buf.readInt(), 0, limit), |
| 40 | ++ MathHelper.clamp(buf.readInt(), 0, limit) |
| 41 | ++ ); |
| 42 | ++ } |
| 43 | + } |
| 44 | + |
| 45 | + public void writePacketData(PacketBuffer buf) throws IOException |
| 46 | +@@ -107,6 +125,18 @@ |
| 47 | + } |
| 48 | + |
| 49 | + buf.writeByte(i); |
| 50 | ++ |
| 51 | ++ // [CM] Fabric Carpet 1.4.25+ Protocol for rule structureBlockLimit |
| 52 | ++ // client method, only applicable if with carpet is on the server, or running locally |
| 53 | ++ if (CarpetSettings.structureBlockLimit >= 128) |
| 54 | ++ { |
| 55 | ++ buf.writeInt(this.field_210395_e.getX()); |
| 56 | ++ buf.writeInt(this.field_210395_e.getY()); |
| 57 | ++ buf.writeInt(this.field_210395_e.getZ()); |
| 58 | ++ buf.writeInt(this.size.getX()); |
| 59 | ++ buf.writeInt(this.size.getY()); |
| 60 | ++ buf.writeInt(this.size.getZ()); |
| 61 | ++ } |
| 62 | + } |
| 63 | + |
| 64 | + public void processPacket(INetHandlerPlayServer handler) |
0 commit comments