Fixed a crash upon generating the nether

This commit is contained in:
Adubbz 2014-06-09 20:51:38 +10:00
parent 7ae3818bc5
commit 92efe43800

View file

@ -6,6 +6,7 @@ import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate; import net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate;
import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiome;
import biomesoplenty.common.biome.decoration.BOPOverworldBiomeDecorator;
import cpw.mods.fml.common.eventhandler.Event.Result; import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@ -33,6 +34,8 @@ public class DecorationModificationEventHandler
return; return;
} }
if (bopBiome.theBiomeDecorator instanceof BOPOverworldBiomeDecorator)
{
if (event.type == Decorate.EventType.PUMPKIN) if (event.type == Decorate.EventType.PUMPKIN)
{ {
if (!(Boolean)bopBiome.theBiomeDecorator.bopFeatures.getFeature("generatePumpkins")) if (!(Boolean)bopBiome.theBiomeDecorator.bopFeatures.getFeature("generatePumpkins"))
@ -42,4 +45,5 @@ public class DecorationModificationEventHandler
} }
} }
} }
}
} }