Fix micro part bounds not recalculating in some instances.

This commit is contained in:
Chicken Bones committed 2013-08-14 18:02:15 +10:00
1 parent e6f5c1478a
commit 67be7ed09c
2 files changed
+20 -2

No files matched your search

@@ -183,6 +183,12 @@ trait CommonMicroblockClient extends CommonMicroblock with MicroblockClient with
if(mat != null && pass == mat.getRenderPass)
render(pos, olm, mat, renderBounds, renderMask)
}
override def read(packet:MCDataInput)
{
super.read(packet)
recalcBounds()
}
}
abstract class CommonMicroblock(shape$:Byte = 0, material$:Int = 0) extends Microblock(shape$, material$) with JPartialOcclusion with TMicroOcclusion with TSlottedPart
+14 -2
View File
@@ -21,6 +21,7 @@ import cpw.mods.fml.relauncher.Side
import codechicken.lib.raytracer.ExtendedMOP
import codechicken.multipart.TEdgePart
import scala.collection.JavaConversions._
import codechicken.lib.data.MCDataInput
object EdgePlacement extends PlacementProperties
{
@@ -181,8 +182,19 @@ class PostMicroblockClient(shape$:Byte = 0, material$:Int = 0) extends PostMicro
override def onPartChanged(part:TMultiPart)
{
if(tile.worldObj.isRemote)
recalcBounds()
recalcBounds()
}
override def onAdded()
{
super.onAdded()
recalcBounds()
}
override def read(packet:MCDataInput)
{
super.read(packet)
recalcBounds()
}
def recalcBounds()