20w10a
- broken scarpet shapes
This commit is contained in:
1 parent
170fd9d762
commit
42f78a596a
16 files changed
+78
-48
No files matched your search
@@ -7,6 +7,7 @@ import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.network.packet.c2s.play.UpdateStructureBlockC2SPacket;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@@ -18,7 +19,7 @@ public class UpdateStructureBlockC2SPacketMixin {
|
||||
@Shadow
|
||||
private BlockPos offset;
|
||||
@Shadow
|
||||
private BlockPos size;
|
||||
private Vec3i size;
|
||||
|
||||
@Inject(
|
||||
method = "<init>(Lnet/minecraft/network/PacketByteBuf;)V",
|
||||
@@ -28,7 +29,7 @@ public class UpdateStructureBlockC2SPacketMixin {
|
||||
if (buf.readableBytes() == 6*4) {
|
||||
// This will throw an exception if carpet is not installed on client
|
||||
offset = new BlockPos(MathHelper.clamp(buf.readInt(), -CarpetSettings.structureBlockLimit, CarpetSettings.structureBlockLimit), MathHelper.clamp(buf.readInt(), -CarpetSettings.structureBlockLimit, CarpetSettings.structureBlockLimit), MathHelper.clamp(buf.readInt(), -CarpetSettings.structureBlockLimit, CarpetSettings.structureBlockLimit));
|
||||
size = new BlockPos(MathHelper.clamp(buf.readInt(), 0, CarpetSettings.structureBlockLimit), MathHelper.clamp(buf.readInt(), 0, CarpetSettings.structureBlockLimit), MathHelper.clamp(buf.readInt(), 0, CarpetSettings.structureBlockLimit));
|
||||
size = new Vec3i(MathHelper.clamp(buf.readInt(), 0, CarpetSettings.structureBlockLimit), MathHelper.clamp(buf.readInt(), 0, CarpetSettings.structureBlockLimit), MathHelper.clamp(buf.readInt(), 0, CarpetSettings.structureBlockLimit));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user