Attempting to fix block placement issues
This commit is contained in:
parent
bb141a530b
commit
970a47d856
3 changed files with 13 additions and 24 deletions
|
@ -6,12 +6,9 @@ import java.lang.reflect.Field;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeDecorator;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.gen.feature.WorldGenLakes;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import net.minecraftforge.event.terraingen.DecorateBiomeEvent;
|
||||
import net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate;
|
||||
import net.minecraftforge.event.terraingen.TerrainGen;
|
||||
import biomesoplenty.common.world.decoration.BOPWorldFeatures;
|
||||
import biomesoplenty.common.world.decoration.ForcedDecorators;
|
||||
|
@ -20,12 +17,11 @@ import biomesoplenty.common.world.generation.ForcedBOPWorldGenerators;
|
|||
import biomesoplenty.common.world.generation.IWorldGeneratorBOP;
|
||||
import biomesoplenty.common.world.generation.WorldGenFieldAssociation;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
|
||||
public class DecorateBiomeEventHandler
|
||||
{
|
||||
@SubscribeEvent
|
||||
public void onBiomeDecorate(DecorateBiomeEvent.Post event)
|
||||
public void onBiomeDecorate(DecorateBiomeEvent.Pre event)
|
||||
{
|
||||
World world = event.world;
|
||||
|
||||
|
@ -34,10 +30,7 @@ public class DecorateBiomeEventHandler
|
|||
|
||||
Random random = event.rand;
|
||||
|
||||
int x = chunkX;
|
||||
int z = chunkZ;
|
||||
|
||||
BiomeGenBase biome = world.getBiomeGenForCoordsBody(x + 8, z + 8);
|
||||
BiomeGenBase biome = world.getBiomeGenForCoordsBody(chunkX + 16, chunkZ + 16);
|
||||
|
||||
IBOPDecoration bopDecoration = null;
|
||||
|
||||
|
@ -82,7 +75,7 @@ public class DecorateBiomeEventHandler
|
|||
|
||||
if (worldGeneratorBOP != null)
|
||||
{
|
||||
worldGeneratorBOP.doGeneration(world, random, worldGeneratorField, worldGenerator, biome, bopDecoration, x, z);
|
||||
worldGeneratorBOP.doGeneration(world, random, worldGeneratorField, worldGenerator, biome, bopDecoration, chunkX, chunkZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,12 @@ public class DecorationModificationEventHandler
|
|||
@SubscribeEvent
|
||||
public void modifyDecor(Decorate event)
|
||||
{
|
||||
if (event.type == Decorate.EventType.LAKE)
|
||||
{
|
||||
event.setResult(Result.DENY);
|
||||
return;
|
||||
}
|
||||
|
||||
World world = event.world;
|
||||
|
||||
int chunkX = event.chunkX;
|
||||
|
@ -26,10 +32,7 @@ public class DecorationModificationEventHandler
|
|||
|
||||
Random random = event.rand;
|
||||
|
||||
int x = chunkX + 8;
|
||||
int z = chunkZ + 8;
|
||||
|
||||
BiomeGenBase biome = world.getBiomeGenForCoordsBody(x, z);
|
||||
BiomeGenBase biome = world.getBiomeGenForCoordsBody(chunkX + 16, chunkZ + 16);
|
||||
IBOPDecoration bopDecoration = null;
|
||||
|
||||
if (biome instanceof IBOPDecoration)
|
||||
|
@ -50,10 +53,6 @@ public class DecorationModificationEventHandler
|
|||
event.setResult(Result.DENY);
|
||||
}
|
||||
}
|
||||
else if (event.type == Decorate.EventType.LAKE)
|
||||
{
|
||||
event.setResult(Result.DENY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,10 +66,7 @@ public class DecorationModificationEventHandler
|
|||
|
||||
Random random = event.rand;
|
||||
|
||||
int x = chunkX + 8;
|
||||
int z = chunkZ + 8;
|
||||
|
||||
BiomeGenBase biome = world.getBiomeGenForCoordsBody(x, z);
|
||||
BiomeGenBase biome = world.getBiomeGenForCoordsBody(chunkX + 16, chunkZ + 16);
|
||||
IBOPDecoration bopDecoration = null;
|
||||
|
||||
if (biome instanceof IBOPDecoration)
|
||||
|
|
|
@ -13,8 +13,8 @@ public class BOPWorldFeatures
|
|||
public boolean generateAsh = false;
|
||||
public boolean generateMelons = false;
|
||||
|
||||
public int waterPoolsPerChunk = 0;
|
||||
public int lavaPoolsPerChunk = 0;
|
||||
public int waterPoolsPerChunk = 50;
|
||||
public int lavaPoolsPerChunk = 20;
|
||||
|
||||
public int waterLakesPerChunk = 0;
|
||||
public int lavaLakesPerChunk = 0;
|
||||
|
|
Loading…
Reference in a new issue