From 6cecf4c1773a08e551aab666c3436af997e4cbcf Mon Sep 17 00:00:00 2001 From: Adubbz Date: Thu, 4 Jul 2013 13:18:48 +1000 Subject: [PATCH] Fixed dedicated server crashes --- src/minecraft/biomesoplenty/BiomesOPlenty.java | 10 ++++++++-- src/minecraft/biomesoplenty/blocks/BlockGrave.java | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/minecraft/biomesoplenty/BiomesOPlenty.java b/src/minecraft/biomesoplenty/BiomesOPlenty.java index 74c53bde5..b272e55c8 100644 --- a/src/minecraft/biomesoplenty/BiomesOPlenty.java +++ b/src/minecraft/biomesoplenty/BiomesOPlenty.java @@ -71,7 +71,10 @@ public class BiomesOPlenty BOPEntities.init(); BOPVanillaCompat.init(); - Localizations.loadLanguages(); + if (proxy instanceof ClientProxy) + { + Localizations.loadLanguages(); + } // Achievement declaration if (BOPConfiguration.achievements) @@ -81,7 +84,10 @@ public class BiomesOPlenty GameRegistry.registerCraftingHandler(new BOPCraftHandler()); - MinecraftForge.EVENT_BUS.register(new SoundHandler()); + if (proxy instanceof ClientProxy) + { + MinecraftForge.EVENT_BUS.register(new SoundHandler()); + } BOPCrossIntegration.preInit(); } diff --git a/src/minecraft/biomesoplenty/blocks/BlockGrave.java b/src/minecraft/biomesoplenty/blocks/BlockGrave.java index 46b51ab6f..c1b23a026 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockGrave.java +++ b/src/minecraft/biomesoplenty/blocks/BlockGrave.java @@ -1,5 +1,7 @@ package biomesoplenty.blocks; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.particle.EffectRenderer; @@ -62,6 +64,7 @@ public class BlockGrave extends Block } @Override + @SideOnly(Side.CLIENT) public boolean addBlockHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer) { int i1 = worldObj.getBlockId(target.blockX, target.blockY, target.blockZ); @@ -111,6 +114,7 @@ public class BlockGrave extends Block } @Override + @SideOnly(Side.CLIENT) public boolean addBlockDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer) { byte b0 = 4;