mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-12 16:37:38 +00:00
Fix micro part bounds not recalculating in some instances.
This commit is contained in:
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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user