Added checks for Forge version to fix serverside crashes.

This commit is contained in:
Amnet 2013-09-25 08:58:30 +02:00
parent a2cc2b1ad0
commit 3dd2e0d069

View file

@ -3,6 +3,7 @@ package biomesoplenty;
import net.minecraft.crash.CallableMinecraftVersion; import net.minecraft.crash.CallableMinecraftVersion;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import biomesoplenty.configuration.BOPBiomes; import biomesoplenty.configuration.BOPBiomes;
import biomesoplenty.configuration.BOPBlocks; import biomesoplenty.configuration.BOPBlocks;
@ -106,6 +107,7 @@ public class BiomesOPlenty
{ {
// Add helpers for compatibility // Add helpers for compatibility
MinecraftForge.TERRAIN_GEN_BUS.register(new WorldTypeSize()); MinecraftForge.TERRAIN_GEN_BUS.register(new WorldTypeSize());
if (ForgeVersion.buildVersion >= 891 || proxy instanceof ClientProxy)
MinecraftForge.TERRAIN_GEN_BUS.register(new VillageMaterialEventHandler()); MinecraftForge.TERRAIN_GEN_BUS.register(new VillageMaterialEventHandler());
MinecraftForge.EVENT_BUS.register(new AchievementHelper()); MinecraftForge.EVENT_BUS.register(new AchievementHelper());
MinecraftForge.EVENT_BUS.register(new BonemealHandler()); MinecraftForge.EVENT_BUS.register(new BonemealHandler());