Fixed the biome decorator stuff

This commit is contained in:
Adubbz 2013-12-30 11:14:01 +11:00
parent 793a680f31
commit 061f762f9a
3 changed files with 12 additions and 9 deletions

View File

@ -22,8 +22,11 @@ public class DecorateBiomeEventHandler
int chunkZ = event.chunkZ;
Random random = event.rand;
int x = chunkX + 8;
int z = chunkZ + 8;
BiomeGenBase biome = world.getBiomeGenForCoordsBody(chunkX / 16, chunkZ / 16);
BiomeGenBase biome = world.getBiomeGenForCoordsBody(x, z);
IBOPDecoration bopDecoration = null;
@ -31,7 +34,7 @@ public class DecorateBiomeEventHandler
{
bopDecoration = (IBOPDecoration)biome;
}
else if (ForcedDecorators.biomeHasForcedDecorator(biome))
else if (ForcedDecorators.biomeHasForcedDecorator(biome.biomeID))
{
bopDecoration = ForcedDecorators.getForcedDecorator(biome.biomeID);
}
@ -44,12 +47,12 @@ public class DecorateBiomeEventHandler
for (int i = 0; i < worldGenPerChunk; i++)
{
int x = chunkX + random.nextInt(16) + 8;
int z = chunkZ + random.nextInt(16) + 8;
int randX = x + random.nextInt(16);
int randZ = z + random.nextInt(16);
WorldGenerator worldGenerator = WorldGenFieldAssociation.getAssociatedWorldGenerator(worldGeneratorField);
worldGenerator.generate(world, random, x, world.getTopSolidOrLiquidBlock(x, z), z);
worldGenerator.generate(world, random, randX, world.getTopSolidOrLiquidBlock(randX, randZ), randZ);
}
}
}

View File

@ -29,8 +29,8 @@ public class ForcedDecorators
return forcedDecoratorMap.get(biomeID);
}
public static boolean biomeHasForcedDecorator(BiomeGenBase biome)
public static boolean biomeHasForcedDecorator(int biomeID)
{
return forcedDecoratorMap.containsKey(biome.biomeID);
return forcedDecoratorMap.containsKey(biomeID);
}
}

View File

@ -7,7 +7,7 @@ public class SwampForcedDecorator implements IBOPDecoration
@Override
public int getWorldGenPerChunk(String fieldName)
{
if (fieldName.equals("mudPerChunk")) return 9;
if (fieldName.equals("mudPerChunk")) return 3;
return 0;
}