J2Blocks icon indicating copy to clipboard operation
J2Blocks copied to clipboard

world.setBlock negative position

Open jdSteven01 opened this issue 10 years ago • 3 comments

If I use negative number in setblock position, chunk error occurs! please fix it. (or my mistake?) 2015-02-01_19 48 23

jdSteven01 avatar Feb 01 '15 15:02 jdSteven01

I could not replicate the bug. Are you running the newest version?

MorbZ avatar Feb 10 '15 10:02 MorbZ

hmm... see this: please see minecraft version.

2015-02-11_21 46 37 2015-02-11_21 39 53 2015-02-11_21 41 17 2015-02-11_21 44 06

code: for(int a = -1023; a < 1024; a++){ for(int b = -1023; b < 1024; b++){ world.setBlock(a,10,b... } }

so, minecraft 1.8 below: (red : error)

default

or my computer's error?

jdSteven01 avatar Feb 11 '15 13:02 jdSteven01

Found the cause of the error in NBTExplorer. normal chunk: normal

error chunk: error

so, I change your code.

Region.java, line 195

chunk = new Chunk(this, chunkX, chunkZ, layers);

-> chunk = new Chunk(this, chunkX + (xPos * 32), chunkZ + (zPos * 32), layers);

2015-02-13_10 36 44

jdSteven01 avatar Feb 13 '15 02:02 jdSteven01