Closed ghost closed 8 years ago
My mistake. It appears that the max height per column is 15. Although after changing this, the columns still aren't sending so I will leave this issue open for that.
Updated code:
Chunk[] chunks = new Chunk[16];
for (int amount = 0; amount < 16; amount++) {
chunks[amount] = new Chunk(true);
chunks[amount].getBlocks().set(1, 1, 1, new BlockState(2, 0));
}
//Column column = new Column((int)Math.floor(1/16), (int)Math.floor(1/16), chunks);
Column column = new Column(1, 1, chunks);
session.send(new ServerChunkDataPacket(column));
From further testing it seems like chunks are completely broken. The packet gets sent containing the chunks, but the chunks themselves don't load inside the users game. i.e.: I send the packet containing a fresh chunk, then the notchian client still says waiting for chunks. Any ideas?
Perfect, thanks :smile:
I create an array of chunks, then in a loop, I initialize them and then proceed to set the blocks inside of the chunks. However, when I try to
.getBlocks().set(x, y, z, new BlockState(2, 0));
I get:Here is my code:
Notice, that the
y
is set to 50. When it is set to 1, there is no stack trace. Is there a limit on the height that I'm not entering properly?What am I doing wrong here? Also, does the library automatically round down and divide by 16 for the
x
andy
of the chunk packet? It doesn't look like it.It's also worth noting that when I connect to my test server using an external library to decode the packets the primary bitMap is set to
65535
not 100% sure if that's actually correct.