Terrain Control

Terrain Control

235k Downloads

Block replace doesn't work for biomeIDs > 128

rutgerkok opened this issue ยท 4 comments

commented

Minecraft supports up to 256 biome ids, but block replace supports just 128 ids.

commented

Fix line for this:
BukkitWorld > DoBlockReplace()

Find: BiomeConfig biomeConfig = this.settings.biomeConfigs[ChunkBiomes[(sectionZ << 4) | sectionX]];
Replace with: BiomeConfig biomeConfig = this.settings.biomeConfigs[ChunkBiomes[(sectionZ << 4) | sectionX] & 0xFF ];

Same with client.

I think it will help.

commented

Oh, now it is my bad.
Try one more "one line" fix
In LayerBiomeInBiome

public boolean[] BiomeIsles = new boolean[128];

change to

public boolean[] BiomeIsles = new boolean[256];

commented

Thank you. Will try it.

commented

Thanks Khoorn! However, something else is still preventing TC from creating biomes with a high id:

java.lang.ArrayIndexOutOfBoundsException: 200
    at com.khorn.terraincontrol.biomelayers.layers.LayerBiomeInBiome.GetBiomes(LayerBiomeInBiome.java:66)
    at com.khorn.terraincontrol.biomelayers.layers.LayerBiomeInBiome.GetBiomes(LayerBiomeInBiome.java:32)
    at com.khorn.terraincontrol.biomelayers.layers.LayerZoom.GetBiomes(LayerZoom.java:20)
    at com.khorn.terraincontrol.biomelayers.layers.LayerLandRandom.GetBiomes(LayerLandRandom.java:20)
    at com.khorn.terraincontrol.biomelayers.layers.LayerZoom.GetBiomes(LayerZoom.java:20)
    at com.khorn.terraincontrol.biomelayers.layers.LayerBiomeInBiome.GetBiomes(LayerBiomeInBiome.java:32)
    at com.khorn.terraincontrol.biomelayers.layers.LayerBiomeInBiome.GetBiomes(LayerBiomeInBiome.java:32)
    at com.khorn.terraincontrol.biomelayers.layers.LayerBiomeInBiome.GetBiomes(LayerBiomeInBiome.java:32)
    at com.khorn.terraincontrol.biomelayers.layers.LayerBiomeInBiome.GetBiomes(LayerBiomeInBiome.java:32)
    at com.khorn.terraincontrol.biomelayers.layers.LayerZoom.GetBiomes(LayerZoom.java:20)
    at com.khorn.terraincontrol.biomelayers.layers.LayerZoom.GetBiomes(LayerZoom.java:20)
    at com.khorn.terraincontrol.biomelayers.layers.LayerBiomeInBiome.GetBiomes(LayerBiomeInBiome.java:32)
    at com.khorn.terraincontrol.biomelayers.layers.LayerBiomeBorder.GetBiomes(LayerBiomeBorder.java:38)
    at com.khorn.terraincontrol.biomelayers.layers.LayerZoom.GetBiomes(LayerZoom.java:20)
    at com.khorn.terraincontrol.biomelayers.layers.LayerBiomeBorder.GetBiomes(LayerBiomeBorder.java:38)
    at com.khorn.terraincontrol.biomelayers.layers.LayerZoom.GetBiomes(LayerZoom.java:20)
    at com.khorn.terraincontrol.biomelayers.layers.LayerRiver.GetBiomes(LayerRiver.java:20)
    at com.khorn.terraincontrol.biomelayers.layers.LayerMix.GetBiomes(LayerMix.java:23)
    at com.khorn.terraincontrol.biomelayers.layers.LayerSmooth.GetBiomes(LayerSmooth.java:20)
    at com.khorn.terraincontrol.biomelayers.layers.LayerZoomVoronoi.GetBiomes(LayerZoomVoronoi.java:24)
    at com.khorn.terraincontrol.biomelayers.layers.LayerCacheInit.Calculate(LayerCacheInit.java:23)
    at com.khorn.terraincontrol.bukkit.TCWorldChunkManager.getTemperatures(TCWorldChunkManager.java:80)
    at net.minecraft.server.BiomeCacheBlock.<init>(SourceFile:27)
    at net.minecraft.server.BiomeCache.a(SourceFile:58)
                   etc.