You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@SuppressWarnings("unused")
@HookHandler
public void onChunkCreate(ChunkCreationHook hook)
{
Calling hook.setBlockData(new int[32768]); causes an ArrayIndexOutOfBoundsException. One thing I would like to mention is that 16 * 16 * 256, the suggested chunk size, does not add up to 32768. It adds up to 65536. Attempting to setBlockDatawith either size does not work.
Update
Apparently, initializing the array with 65536 and setting all the integers in the array to 0 leads to another problem:
[18:01:33] [net.minecraft.server.MinecraftServer] [ERROR]: Encountered an unexpected exception
net.minecraft.util.ReportedException: Exception initializing level
at net.minecraft.world.WorldServer.a(WorldServer.java:670) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.server.MinecraftServer.initWorld(MinecraftServer.java:282) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.server.dedicated.DedicatedServer.i(DedicatedServer.java:340) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:450) [canary.jar:1.8.0-1.2.0]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]
Caused by: java.lang.IllegalArgumentException: bound must be positive
at java.util.Random.nextInt(Unknown Source) ~[?:1.8.0_25]
at net.minecraft.world.biome.BiomeDecorator.a(BiomeDecorator.java:190) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.biome.BiomeDecorator.a(BiomeDecorator.java:114) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.biome.BiomeGenBase.a(BiomeGenBase.java:278) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.gen.ChunkProviderGenerate.a(ChunkProviderGenerate.java:401) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.gen.ChunkProviderServer.a(ChunkProviderServer.java:233) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.chunk.Chunk.a(Chunk.java:893) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.gen.ChunkProviderServer.c(ChunkProviderServer.java:163) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.gen.ChunkProviderServer.d(ChunkProviderServer.java:172) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.World.a(World.java:261) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.World.f(World.java:257) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.World.p(World.java:619) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.World.d(World.java:195) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.World.c(World.java:182) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.WorldProvider.a(WorldProvider.java:95) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.WorldServer.b(WorldServer.java:723) ~[canary.jar:1.8.0-1.2.0]
at net.minecraft.world.WorldServer.a(WorldServer.java:653) ~[canary.jar:1.8.0-1.2.0]
... 4 more
An IllegalArgumentException is thrown instead. bound must be positive.
The text was updated successfully, but these errors were encountered:
This should actually be a new byte[256] (I got biomes stuck in the head for some reason...) int[65536], at one time it was set internally as an array of 32768 (even though the height had a change)
Its also not implemented properly with 1.8 right now
When adding a hook handler like so:
Calling
hook.setBlockData(new int[32768]);
causes an ArrayIndexOutOfBoundsException. One thing I would like to mention is that16 * 16 * 256
, the suggested chunk size, does not add up to32768
. It adds up to65536
. Attempting tosetBlockData
with either size does not work.Update
Apparently, initializing the array with
65536
and setting all the integers in the array to 0 leads to another problem:An IllegalArgumentException is thrown instead.
bound must be positive
.The text was updated successfully, but these errors were encountered: