Archived
0

исключена ссылка на World в Location и ChunkSection

This commit is contained in:
2018-08-26 01:13:21 +03:00
parent 2147c18f81
commit 464a2e7be6
12 changed files with 133 additions and 154 deletions

View File

@@ -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();

View File

@@ -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());
}
}

View File

@@ -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);
}
}
}

View File

@@ -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);