Forgot to readd the workaround for the Already Decorating! nonsense
This commit is contained in:
parent
1bd84e3652
commit
96b530d56b
|
@ -4,6 +4,7 @@ import biomesoplenty.common.world.decoration.BOPDecorationManager;
|
||||||
import biomesoplenty.common.world.decoration.BOPWorldFeatures;
|
import biomesoplenty.common.world.decoration.BOPWorldFeatures;
|
||||||
import biomesoplenty.common.world.decoration.IBOPBiome;
|
import biomesoplenty.common.world.decoration.IBOPBiome;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
|
|
||||||
|
@ -22,7 +23,7 @@ public abstract class BOPBiome extends BiomeGenBase implements IBOPBiome
|
||||||
bopWorldFeatures = BOPDecorationManager.getBiomeFeatures(biomeID);
|
bopWorldFeatures = BOPDecorationManager.getBiomeFeatures(biomeID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int x, int z)
|
public void decorate(World world, Random random, int x, int z)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -41,7 +42,7 @@ public abstract class BOPBiome extends BiomeGenBase implements IBOPBiome
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random)
|
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random)
|
||||||
|
|
|
@ -26,20 +26,35 @@ public class BOPDecorationManager implements IWorldGenerator
|
||||||
|
|
||||||
for (String featureName : biomeFeatures.getFeatureNames())
|
for (String featureName : biomeFeatures.getFeatureNames())
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
if (featureName.equals("bopFlowersPerChunk"))
|
if (featureName.equals("bopFlowersPerChunk"))
|
||||||
{
|
{
|
||||||
if (!TerrainGen.decorate(world, random, chunkX, chunkZ, DecorateBiomeEvent.Decorate.EventType.FLOWERS)) continue;
|
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)
|
if (worldFeature != null)
|
||||||
{
|
|
||||||
IBOPWorldGenerator worldGenerator = worldFeature.getBOPWorldGenerator();
|
|
||||||
|
|
||||||
if (worldGenerator != 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue