Skip to content

Commit f5ea03f

Browse files
committed
allow negative block positions
1 parent 9dcd03a commit f5ea03f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/main/java/win/baruna/blockmeter/measurebox/MeasureBox.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected MeasureBox(BlockPos blockStart, BlockPos blockEnd,
4949

5050
/**
5151
* Creates a MeasureBox from a PacketByteBuf
52-
*
52+
*
5353
* @param attachedData a PacketByteBuf containing the ClientMeasureBox
5454
* @return the PacketByteBuf submitted
5555
*/
@@ -62,16 +62,14 @@ protected MeasureBox(PacketByteBuf attachedData) {
6262
this.mode = attachedData.readInt();
6363
this.orientation = attachedData.readInt();
6464

65-
if (blockStart.getY() < 0 || blockStart.getY() > 256
66-
|| blockEnd.getY() < 0 || blockEnd.getY() > 256
67-
|| dimension == null) {
65+
if (dimension == null) {
6866
throw new IllegalArgumentException("invalid buffer");
6967
}
7068
}
7169

7270
/**
7371
* Fills a PacketByteBuf with the MeasureBox
74-
*
72+
*
7573
* @param buf PacketByteBuf to fill
7674
*/
7775
public void writePacketBuf(PacketByteBuf buf) {
@@ -86,7 +84,7 @@ public void writePacketBuf(PacketByteBuf buf) {
8684

8785
/**
8886
* Parses a MeasureBox from a PacketByteBuf
89-
*
87+
*
9088
* @param attachedData a PacketByteBuf containing the ClientMeasureBox
9189
* @return the PacketByteBuf submitted
9290
*/

0 commit comments

Comments
 (0)