From a647faeafd30bf8182ed152e145a48f9599f5e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Sat, 12 Apr 2014 14:35:20 +0200 Subject: [PATCH] Side check in getRenderType - this could cause a server crash in 1.7, can't hurt to have it in 1.6, too. --- src/main/scala/li/cil/oc/common/block/Delegator.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/li/cil/oc/common/block/Delegator.scala b/src/main/scala/li/cil/oc/common/block/Delegator.scala index 0019e28e8..1fed95389 100644 --- a/src/main/scala/li/cil/oc/common/block/Delegator.scala +++ b/src/main/scala/li/cil/oc/common/block/Delegator.scala @@ -1,6 +1,6 @@ package li.cil.oc.common.block -import cpw.mods.fml.common.Optional +import cpw.mods.fml.common.{FMLCommonHandler, Optional} import cpw.mods.fml.relauncher.{Side, SideOnly} import java.util import java.util.Random @@ -340,7 +340,7 @@ class Delegator[Child <: Delegate](id: Int) extends Block(id, Material.iron) { } } - override def getRenderType = BlockRenderer.getRenderId + override def getRenderType = if (FMLCommonHandler.instance.getEffectiveSide.isClient) BlockRenderer.getRenderId else -1 override def getLightOpacity(world: World, x: Int, y: Int, z: Int) = subBlock(world, x, y, z) match {