Forgot to readd the workaround for the Already Decorating! nonsense

This commit is contained in:
Adubbz 2014-03-17 20:25:01 +11:00
parent 1bd84e3652
commit 96b530d56b
2 changed files with 25 additions and 9 deletions

View File

@ -4,6 +4,7 @@ import biomesoplenty.common.world.decoration.BOPDecorationManager;
import biomesoplenty.common.world.decoration.BOPWorldFeatures;
import biomesoplenty.common.world.decoration.IBOPBiome;
import biomesoplenty.common.world.features.WorldGenBOPFlora;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
@ -22,7 +23,7 @@ public abstract class BOPBiome extends BiomeGenBase implements IBOPBiome
bopWorldFeatures = BOPDecorationManager.getBiomeFeatures(biomeID);
}
/*@Override
@Override
public void decorate(World world, Random random, int x, int z)
{
try
@ -41,7 +42,7 @@ public abstract class BOPBiome extends BiomeGenBase implements IBOPBiome
e.printStackTrace();
}
}
}*/
}
@Override
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random)

View File

@ -26,20 +26,35 @@ public class BOPDecorationManager implements IWorldGenerator
for (String featureName : biomeFeatures.getFeatureNames())
{
try
{
if (featureName.equals("bopFlowersPerChunk"))
{
if (!TerrainGen.decorate(world, random, chunkX, chunkZ, DecorateBiomeEvent.Decorate.EventType.FLOWERS)) continue;
}
WorldGenFieldAssociation.WorldFeature worldFeature = WorldGenFieldAssociation.getAssociatedFeature(featureName);
WorldGenFieldAssociation.WorldFeature worldFeature = WorldGenFieldAssociation.getAssociatedFeature(featureName);
if (worldFeature != null)
{
IBOPWorldGenerator worldGenerator = worldFeature.getBOPWorldGenerator();
if (worldGenerator != null)
if (worldFeature != null)
{
worldGenerator.setupGeneration(world, random, biome, featureName, chunkX, chunkZ);
IBOPWorldGenerator worldGenerator = worldFeature.getBOPWorldGenerator();
if (worldGenerator != null)
{
worldGenerator.setupGeneration(world, random, biome, featureName, chunkX, chunkZ);
}
}
}
catch (Exception e)
{
Throwable cause = e.getCause();
if (e.getMessage() != null && e.getMessage().equals("Already decorating!!") || (cause != null && cause.getMessage() != null && cause.getMessage().equals("Already decorating!!")))
{
}
else
{
e.printStackTrace();
}
}
}