Within the onPlayerPlaceBlock event there is:
It would be really useful to be able to get the end x, y, z chunk position.
Currently I'm struggling to understand how I can get this and not from lack of trying. . . ( I shall continue my testing )
Within the onPlayerPlaceBlock event there is:
It would be really useful to be able to get the end x, y, z chunk position.
Currently I'm struggling to understand how I can get this and not from lack of trying. . . ( I shall continue my testing )
OK I think may have it.
Just need to create 6 if statements and flesh out the code.
I'm assuming player is in none-creative mode (max stack 64)
Yes that would be much better, but at least I can accomplish my goal in the meantime.
Its not that hard
int AreaIDx = (int) evt.getChunkPositionX();
int AreaIDy = (int) evt.getChunkPositionY();
int AreaIDz = (int) evt.getChunkPositionZ();
// block start is always 000 and end is always 15 63 15
Vector3i StartBlock = new Vector3i(0, 0, 0);
Vector3i EndBlock = new Vector3i(15, 63, 15);
Vector3i StartChunk = new Vector3i(AreaIDx, AreaIDy, AreaIDz);
Vector3i EndChunk = new Vector3i(AreaIDx, AreaIDy, AreaIDz);
Is that not for chunks yahgiggle? I'm talking about placing rows of blocks within multiple chunks. A new row of blocks placed inside a chunk can have any x y z of anything between (15,63,15). But the end block will also just have a vector value between (15,64,15,), I was finding out what game chunk the end of blocks went into.
Don’t have an account yet? Create a new account now and be part of our community!