diff --git a/src/main/scala/edx/core/ClientProxy.scala b/src/main/scala/edx/core/ClientProxy.scala index 1eff039f0..38a64a53c 100644 --- a/src/main/scala/edx/core/ClientProxy.scala +++ b/src/main/scala/edx/core/ClientProxy.scala @@ -28,7 +28,6 @@ import edx.quantum.machine.accelerator.{EntityParticle, RenderParticle} import edx.quantum.machine.boiler.{GuiNuclearBoiler, RenderNuclearBoiler, TileNuclearBoiler} import edx.quantum.machine.centrifuge.{GuiCentrifuge, RenderCentrifuge, TileCentrifuge} import edx.quantum.machine.extractor.{GuiChemicalExtractor, RenderChemicalExtractor, TileChemicalExtractor} -import edx.quantum.machine.plasma.{RenderPlasmaHeater, TilePlasmaHeater} import edx.quantum.machine.quantum.{RenderQuantumAssembler, TileQuantumAssembler} import edx.quantum.machine.thermometer.{RenderThermometer, TileThermometer} import edx.quantum.reactor.{GuiReactorCell, TileReactorCell} @@ -74,7 +73,6 @@ import resonant.lib.transform.vector.Vector3 //Quantum ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileCentrifuge], new RenderCentrifuge) - ClientRegistry.bindTileEntitySpecialRenderer(classOf[TilePlasmaHeater], new RenderPlasmaHeater) ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileNuclearBoiler], new RenderNuclearBoiler) ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileThermometer], new RenderThermometer) ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileChemicalExtractor], new RenderChemicalExtractor) diff --git a/src/main/scala/edx/electrical/tesla/TileTesla.scala b/src/main/scala/edx/electrical/tesla/TileTesla.scala index bb06f48c7..fedce0c9c 100644 --- a/src/main/scala/edx/electrical/tesla/TileTesla.scala +++ b/src/main/scala/edx/electrical/tesla/TileTesla.scala @@ -1,6 +1,3 @@ -/** - * - */ package edx.electrical.tesla import java.util.{ArrayList, Comparator, HashSet, List, PriorityQueue, Set} @@ -267,12 +264,6 @@ class TileTesla extends TileElectric(Material.iron) with IMultiBlockStructure[Ti } } - def getMultiBlock: MultiBlockHandler[TileTesla] = - { - if (multiBlock == null) multiBlock = new MultiBlockHandler[TileTesla](this) - return multiBlock - } - def teslaTransfer(e: Double, doTransfer: Boolean): Double = { var transferEnergy = e @@ -611,6 +602,12 @@ class TileTesla extends TileElectric(Material.iron) with IMultiBlockStructure[Ti } } + def getMultiBlock: MultiBlockHandler[TileTesla] = + { + if (multiBlock == null) multiBlock = new MultiBlockHandler[TileTesla](this) + return multiBlock + } + def getLowestTesla: TileTesla = { var lowest: TileTesla = this diff --git a/src/main/scala/edx/quantum/machine/plasma/RenderPlasmaHeater.scala b/src/main/scala/edx/quantum/machine/plasma/RenderPlasmaHeater.scala index 00c1707c6..fcc9d8171 100644 --- a/src/main/scala/edx/quantum/machine/plasma/RenderPlasmaHeater.scala +++ b/src/main/scala/edx/quantum/machine/plasma/RenderPlasmaHeater.scala @@ -6,26 +6,25 @@ import net.minecraft.tileentity.TileEntity import net.minecraft.util.ResourceLocation import net.minecraftforge.client.model.{AdvancedModelLoader, IModelCustom} import org.lwjgl.opengl.GL11 -import resonant.lib.render.RenderTaggedTile +import resonant.lib.render.RenderUtility -@SideOnly(Side.CLIENT) object RenderPlasmaHeater +@SideOnly(Side.CLIENT) +object RenderPlasmaHeater { final val MODEL: IModelCustom = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.domain, Reference.modelPath + "fusionReactor.tcn")) final val TEXTURE: ResourceLocation = new ResourceLocation(Reference.domain, Reference.modelPath + "fusionReactor.png") } -@SideOnly(Side.CLIENT) class RenderPlasmaHeater extends RenderTaggedTile +@SideOnly(Side.CLIENT) +class RenderPlasmaHeater { - override def renderTileEntityAt(t: TileEntity, x: Double, y: Double, z: Double, f: Float) + def renderTileEntityAt(t: TileEntity, x: Double, y: Double, z: Double, f: Float) { val tileEntity: TilePlasmaHeater = t.asInstanceOf[TilePlasmaHeater] - if (tileEntity.world != null) - { - super.renderTileEntityAt(t, x, y, z, f) - } + GL11.glPushMatrix GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5) - bindTexture(RenderPlasmaHeater.TEXTURE) + RenderUtility.bind(RenderPlasmaHeater.TEXTURE) GL11.glPushMatrix GL11.glRotated(Math.toDegrees(tileEntity.rotation), 0, 1, 0) RenderPlasmaHeater.MODEL.renderOnly(Array("rrot", "srot"): _*) diff --git a/src/main/scala/edx/quantum/machine/plasma/TilePlasmaHeater.scala b/src/main/scala/edx/quantum/machine/plasma/TilePlasmaHeater.scala index 3d3557912..1bcd07797 100644 --- a/src/main/scala/edx/quantum/machine/plasma/TilePlasmaHeater.scala +++ b/src/main/scala/edx/quantum/machine/plasma/TilePlasmaHeater.scala @@ -11,7 +11,6 @@ import net.minecraft.nbt.NBTTagCompound import net.minecraft.network.Packet import net.minecraftforge.common.util.ForgeDirection import net.minecraftforge.fluids._ -import resonant.api.tile.ITagRender import resonant.engine.ResonantEngine import resonant.lib.grid.energy.EnergyStorage import resonant.lib.mod.config.Config @@ -29,7 +28,7 @@ object TilePlasmaHeater @Config var plasmaHeatAmount: Int = 100 } -class TilePlasmaHeater extends TileElectric(Material.iron) with IPacketReceiver with ITagRender with IFluidHandler with TEnergyProvider +class TilePlasmaHeater extends TileElectric(Material.iron) with IPacketReceiver with IFluidHandler with TEnergyProvider { final val tankInputDeuterium: FluidTank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 10) final val tankInputTritium: FluidTank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 10)