Fixed dedicated server crashes

This commit is contained in:
Adubbz 2013-07-04 13:18:48 +10:00
parent 84ddf57362
commit 6cecf4c177
2 changed files with 12 additions and 2 deletions

View file

@ -71,7 +71,10 @@ public class BiomesOPlenty
BOPEntities.init(); BOPEntities.init();
BOPVanillaCompat.init(); BOPVanillaCompat.init();
if (proxy instanceof ClientProxy)
{
Localizations.loadLanguages(); Localizations.loadLanguages();
}
// Achievement declaration // Achievement declaration
if (BOPConfiguration.achievements) if (BOPConfiguration.achievements)
@ -81,7 +84,10 @@ public class BiomesOPlenty
GameRegistry.registerCraftingHandler(new BOPCraftHandler()); GameRegistry.registerCraftingHandler(new BOPCraftHandler());
if (proxy instanceof ClientProxy)
{
MinecraftForge.EVENT_BUS.register(new SoundHandler()); MinecraftForge.EVENT_BUS.register(new SoundHandler());
}
BOPCrossIntegration.preInit(); BOPCrossIntegration.preInit();
} }

View file

@ -1,5 +1,7 @@
package biomesoplenty.blocks; package biomesoplenty.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.particle.EffectRenderer; import net.minecraft.client.particle.EffectRenderer;
@ -62,6 +64,7 @@ public class BlockGrave extends Block
} }
@Override @Override
@SideOnly(Side.CLIENT)
public boolean addBlockHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer) public boolean addBlockHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer)
{ {
int i1 = worldObj.getBlockId(target.blockX, target.blockY, target.blockZ); int i1 = worldObj.getBlockId(target.blockX, target.blockY, target.blockZ);
@ -111,6 +114,7 @@ public class BlockGrave extends Block
} }
@Override @Override
@SideOnly(Side.CLIENT)
public boolean addBlockDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer) public boolean addBlockDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer)
{ {
byte b0 = 4; byte b0 = 4;