исключена ссылка на World в Location и ChunkSection
This commit is contained in:
@@ -21,7 +21,7 @@ public class PlayerBlockPlacementPacket implements CSPacket {
|
||||
public void readSelf(NetInputStream netStream) {
|
||||
long compactedCoords = netStream.readLong();
|
||||
double[] xyz = CompactedCoords.uncompressXYZ(compactedCoords);
|
||||
location = new Location(xyz[0], xyz[1], xyz[2], null);
|
||||
location = new Location(xyz[0], xyz[1], xyz[2]);
|
||||
face = Direction.getById(netStream.readVarInt());
|
||||
hand = (netStream.readVarInt() == 1);
|
||||
cursorX = netStream.readFloat();
|
||||
|
||||
@@ -50,7 +50,7 @@ public class PlayerDiggingPacket implements CSPacket {
|
||||
status = Status.getById(netStream.readVarInt());
|
||||
long compactCoord = netStream.readLong();
|
||||
double[] xyz = CompactedCoords.uncompressXYZ(compactCoord);
|
||||
location = new Location(xyz[0], xyz[1], xyz[2], null);
|
||||
location = new Location(xyz[0], xyz[1], xyz[2]);
|
||||
face = Direction.getById(netStream.readByte());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class TabCompletePacket implements CSPacket {
|
||||
double y = (compactValue >> 26) & 0xFFF;
|
||||
double z = compactValue << 38 >> 38; // is normal?
|
||||
|
||||
this.location = new Location(x, y, z, null);
|
||||
this.location = new Location(x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,10 +50,10 @@ public class TestChunkdataPacket {
|
||||
|
||||
BlockFactory blockFactory = new BlockFactory();
|
||||
|
||||
if (y == 0) return blockFactory.create(BlockType.BEDROCK, x, y, z, null);
|
||||
else if (y >= 1 && y <= 2) return blockFactory.create(BlockType.DIRT, x, y, z, null);
|
||||
else if (y == 3) return blockFactory.create(BlockType.GRASS, x, y, z, null);
|
||||
else return blockFactory.create(BlockType.AIR, x, y, z, null);
|
||||
if (y == 0) return blockFactory.create(BlockType.BEDROCK, x, y, z);
|
||||
else if (y >= 1 && y <= 2) return blockFactory.create(BlockType.DIRT, x, y, z);
|
||||
else if (y == 3) return blockFactory.create(BlockType.GRASS, x, y, z);
|
||||
else return blockFactory.create(BlockType.AIR, x, y, z);
|
||||
});
|
||||
|
||||
world = mock(World.class);
|
||||
|
||||
Reference in New Issue
Block a user