From 8e4190f303525e0404594c96729c24a6910a973c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Fri, 26 Dec 2014 13:20:19 +0100 Subject: [PATCH] Fixed raid TESR. --- .../oc/client/renderer/tileentity/RaidRenderer.scala | 8 ++++---- .../oc/common/tileentity/traits/RedstoneAware.scala | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/scala/li/cil/oc/client/renderer/tileentity/RaidRenderer.scala b/src/main/scala/li/cil/oc/client/renderer/tileentity/RaidRenderer.scala index 855601f82..4a7d8dfef 100644 --- a/src/main/scala/li/cil/oc/client/renderer/tileentity/RaidRenderer.scala +++ b/src/main/scala/li/cil/oc/client/renderer/tileentity/RaidRenderer.scala @@ -65,9 +65,9 @@ object RaidRenderer extends TileEntitySpecialRenderer { private def renderSlot(r: WorldRenderer, slot: Int, icon: TextureAtlasSprite) { val l = u1 + slot * fs val h = u1 + (slot + 1) * fs - r.addVertexWithUV(l, 1, 0, icon.getInterpolatedU(l), icon.getMaxV) - r.addVertexWithUV(h, 1, 0, icon.getInterpolatedU(h), icon.getMaxV) - r.addVertexWithUV(h, 0, 0, icon.getInterpolatedU(h), icon.getMinV) - r.addVertexWithUV(l, 0, 0, icon.getInterpolatedU(l), icon.getMinV) + r.addVertexWithUV(l, 1, 0, icon.getInterpolatedU(l * 16), icon.getMaxV) + r.addVertexWithUV(h, 1, 0, icon.getInterpolatedU(h * 16), icon.getMaxV) + r.addVertexWithUV(h, 0, 0, icon.getInterpolatedU(h * 16), icon.getMinV) + r.addVertexWithUV(l, 0, 0, icon.getInterpolatedU(l * 16), icon.getMinV) } } diff --git a/src/main/scala/li/cil/oc/common/tileentity/traits/RedstoneAware.scala b/src/main/scala/li/cil/oc/common/tileentity/traits/RedstoneAware.scala index 27cd6764e..713bd0631 100644 --- a/src/main/scala/li/cil/oc/common/tileentity/traits/RedstoneAware.scala +++ b/src/main/scala/li/cil/oc/common/tileentity/traits/RedstoneAware.scala @@ -150,18 +150,18 @@ trait RedstoneAware extends RotationAware /* with IConnectable with IRedstoneEmi protected def onRedstoneInputChanged(side: EnumFacing) {} protected def onRedstoneOutputEnabledChanged() { - world.notifyBlocksOfNeighborChange(position, block) + world.notifyNeighborsOfStateChange(getPos, getBlockType) if (isServer) ServerPacketSender.sendRedstoneState(this) - else world.markBlockForUpdate(position) + else world.markBlockForUpdate(getPos) } protected def onRedstoneOutputChanged(side: EnumFacing) { - val blockPos = position.offset(side) - world.notifyBlockOfNeighborChange(blockPos, block) - world.notifyBlocksOfNeighborChange(blockPos, world.getBlock(blockPos), side.getOpposite) + val blockPos = getPos.offset(side) + world.notifyNeighborsOfStateChange(blockPos, getBlockType) + world.notifyNeighborsOfStateExcept(blockPos, world.getBlockState(blockPos).getBlock, side.getOpposite) if (isServer) ServerPacketSender.sendRedstoneState(this) - else world.markBlockForUpdate(position) + else world.markBlockForUpdate(getPos) } // ----------------------------------------------------------------------- //