Fixed all multipart item render

This commit is contained in:
Calclavia 2014-09-16 12:50:42 +08:00
parent e76863530c
commit fcf0966804
3 changed files with 16 additions and 10 deletions

View file

@ -127,9 +127,10 @@ class PartQuantumGlyph extends JCuboidPart with TSlottedPart with JNormalOcclusi
return "resonant_induction_quantum_glyph"
}
@SideOnly(Side.CLIENT) override def renderDynamic(pos: Vector3, frame: Float, pass: Int)
@SideOnly(Side.CLIENT)
override def renderDynamic(pos: Vector3, frame: Float, pass: Int)
{
RenderQuantumGlyph.INSTANCE.render(this, pos.x, pos.y, pos.z)
RenderQuantumGlyph.render(this, pos.x, pos.y, pos.z)
}
override def getOcclusionBoxes: JIterable[codechicken.lib.vec.Cuboid6] = Seq[Cuboid6](getBounds)

View file

@ -10,12 +10,7 @@ import resonant.content.prefab.scala.render.ISimpleItemRenderer
import resonant.lib.render.RenderUtility
import resonantinduction.core.Reference
object RenderQuantumGlyph
{
final val INSTANCE: RenderQuantumGlyph = new RenderQuantumGlyph
}
class RenderQuantumGlyph extends ISimpleItemRenderer
object RenderQuantumGlyph extends ISimpleItemRenderer
{
def render(part: PartQuantumGlyph, x: Double, y: Double, z: Double)
{

View file

@ -8,6 +8,8 @@ import net.minecraft.block.Block
import net.minecraft.entity.player.EntityPlayer
import net.minecraft.tileentity.TileEntity
import net.minecraft.world.World
import resonant.content.wrapper.ItemRenderHandler
import resonantinduction.atomic.gate.RenderQuantumGlyph
import resonantinduction.electrical.battery.{RenderBattery, TileBattery}
import resonantinduction.electrical.generator.{RenderMotor, TileMotor}
import resonantinduction.electrical.laser.emitter.{RenderLaserEmitter, TileLaserEmitter}
@ -15,13 +17,16 @@ import resonantinduction.electrical.laser.focus.crystal.{RenderFocusCrystal, Til
import resonantinduction.electrical.laser.focus.mirror.{RenderMirror, TileMirror}
import resonantinduction.electrical.laser.fx.{EntityBlockParticleFX, EntityLaserFX, EntityScorchFX}
import resonantinduction.electrical.laser.receiver.{RenderLaserReceiver, TileLaserReceiver}
import resonantinduction.electrical.multimeter.{GuiMultimeter, PartMultimeter}
import resonantinduction.electrical.levitator.RenderLevitator
import resonantinduction.electrical.multimeter.{RenderMultimeter, GuiMultimeter, PartMultimeter}
import resonantinduction.electrical.render.FXElectricBolt
import resonantinduction.electrical.tesla.{RenderTesla, TileTesla}
import resonantinduction.electrical.transformer.RenderTransformer
import universalelectricity.core.transform.vector.Vector3
/** @author Calclavia */
@SideOnly(Side.CLIENT) class ClientProxy extends CommonProxy
@SideOnly(Side.CLIENT)
class ClientProxy extends CommonProxy
{
override def preInit
{
@ -30,6 +35,11 @@ import universalelectricity.core.transform.vector.Vector3
override def init
{
ItemRenderHandler.register(ElectricalContent.itemTransformer, RenderTransformer.INSTANCE)
ItemRenderHandler.register(ElectricalContent.itemLevitator, RenderLevitator.INSTANCE)
ItemRenderHandler.register(ElectricalContent.itemMultimeter, RenderMultimeter.INSTANCE)
ItemRenderHandler.register(ElectricalContent.itemQuantumGlyph, RenderQuantumGlyph)
//RenderingRegistry.registerBlockHandler(new BlockRenderingHandler.type)
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileMotor], new RenderMotor)
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileTesla], new RenderTesla)