Added ISidedHollowConnect

This commit is contained in:
Chicken-Bones committed 2013-11-22 11:49:29 +10:00
1 parent 7511434d26
commit c69ec17bcc
2 files changed
+16

No files matched your search

@@ -215,6 +215,7 @@ class HollowMicroblock(shape$:Byte = 0, material$:Int = 0) extends CommonMicrobl
case _ => tile.partMap(6) match
{
case part:IHollowConnect => part.getHollowSize
case part:ISidedHollowConnect => part.getHollowSize(getSlot)
case _ => 8
}
}
@@ -0,0 +1,15 @@
package codechicken.microblock
/**
* Implement this on center parts that connect through hollow covers to have the covers render their hollows to fit the connection size
*
* Will replace IHollowConnect as of 1.7
*/
trait ISidedHollowConnect
{
/**
* @param side The side of the block on which the cover resides
* @return The size (width and height) of the connection in pixels. Must be be less than 12 and more than 0
*/
def getHollowSize(side:Int):Int
}