Files
ForgeMultipart/codechicken/multipart/TCuboidPart.scala
T
Chicken Bones 5594e269a5 Fixed direct redstone wire connection
Matched CCC updates
Expanded micro occlusion to java parts
2013-06-28 05:05:59 +10:00

29 lines
978 B
Scala

package codechicken.multipart
import codechicken.core.vec.Cuboid6
import codechicken.core.raytracer.IndexedCuboid6
import net.minecraft.client.renderer.RenderBlocks
import codechicken.core.render.CCRenderState
import codechicken.core.render.RenderUtils
import codechicken.core.vec.Vector3
import codechicken.core.render.IconTransformation
import scala.collection.JavaConversions._
import java.lang.Iterable
import codechicken.core.vec.Translation
abstract class JCuboidPart extends TCuboidPart
trait TCuboidPart extends TMultiPart
{
def getBounds:Cuboid6
override def getSubParts:Iterable[IndexedCuboid6] = Seq(new IndexedCuboid6(0, getBounds))
override def getCollisionBoxes:Iterable[Cuboid6] = Seq(getBounds)
override def drawBreaking(renderBlocks:RenderBlocks)
{
CCRenderState.reset()
RenderUtils.renderBlock(getBounds, 0, new Translation(x, y, z), new IconTransformation(renderBlocks.overrideBlockTexture), null)
}
}