Removed RenderTaggedTile, moving its function to RenderUtility
This commit is contained in:
parent
1e74eebf09
commit
d66a109caa
4 changed files with 15 additions and 22 deletions
|
@ -28,7 +28,6 @@ import edx.quantum.machine.accelerator.{EntityParticle, RenderParticle}
|
||||||
import edx.quantum.machine.boiler.{GuiNuclearBoiler, RenderNuclearBoiler, TileNuclearBoiler}
|
import edx.quantum.machine.boiler.{GuiNuclearBoiler, RenderNuclearBoiler, TileNuclearBoiler}
|
||||||
import edx.quantum.machine.centrifuge.{GuiCentrifuge, RenderCentrifuge, TileCentrifuge}
|
import edx.quantum.machine.centrifuge.{GuiCentrifuge, RenderCentrifuge, TileCentrifuge}
|
||||||
import edx.quantum.machine.extractor.{GuiChemicalExtractor, RenderChemicalExtractor, TileChemicalExtractor}
|
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.quantum.{RenderQuantumAssembler, TileQuantumAssembler}
|
||||||
import edx.quantum.machine.thermometer.{RenderThermometer, TileThermometer}
|
import edx.quantum.machine.thermometer.{RenderThermometer, TileThermometer}
|
||||||
import edx.quantum.reactor.{GuiReactorCell, TileReactorCell}
|
import edx.quantum.reactor.{GuiReactorCell, TileReactorCell}
|
||||||
|
@ -74,7 +73,6 @@ import resonant.lib.transform.vector.Vector3
|
||||||
|
|
||||||
//Quantum
|
//Quantum
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileCentrifuge], new RenderCentrifuge)
|
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileCentrifuge], new RenderCentrifuge)
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TilePlasmaHeater], new RenderPlasmaHeater)
|
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileNuclearBoiler], new RenderNuclearBoiler)
|
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileNuclearBoiler], new RenderNuclearBoiler)
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileThermometer], new RenderThermometer)
|
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileThermometer], new RenderThermometer)
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileChemicalExtractor], new RenderChemicalExtractor)
|
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileChemicalExtractor], new RenderChemicalExtractor)
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package edx.electrical.tesla
|
package edx.electrical.tesla
|
||||||
|
|
||||||
import java.util.{ArrayList, Comparator, HashSet, List, PriorityQueue, Set}
|
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 =
|
def teslaTransfer(e: Double, doTransfer: Boolean): Double =
|
||||||
{
|
{
|
||||||
var transferEnergy = e
|
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 =
|
def getLowestTesla: TileTesla =
|
||||||
{
|
{
|
||||||
var lowest: TileTesla = this
|
var lowest: TileTesla = this
|
||||||
|
|
|
@ -6,26 +6,25 @@ import net.minecraft.tileentity.TileEntity
|
||||||
import net.minecraft.util.ResourceLocation
|
import net.minecraft.util.ResourceLocation
|
||||||
import net.minecraftforge.client.model.{AdvancedModelLoader, IModelCustom}
|
import net.minecraftforge.client.model.{AdvancedModelLoader, IModelCustom}
|
||||||
import org.lwjgl.opengl.GL11
|
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 MODEL: IModelCustom = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.domain, Reference.modelPath + "fusionReactor.tcn"))
|
||||||
final val TEXTURE: ResourceLocation = new ResourceLocation(Reference.domain, Reference.modelPath + "fusionReactor.png")
|
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]
|
val tileEntity: TilePlasmaHeater = t.asInstanceOf[TilePlasmaHeater]
|
||||||
if (tileEntity.world != null)
|
|
||||||
{
|
|
||||||
super.renderTileEntityAt(t, x, y, z, f)
|
|
||||||
}
|
|
||||||
GL11.glPushMatrix
|
GL11.glPushMatrix
|
||||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5)
|
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5)
|
||||||
bindTexture(RenderPlasmaHeater.TEXTURE)
|
RenderUtility.bind(RenderPlasmaHeater.TEXTURE)
|
||||||
GL11.glPushMatrix
|
GL11.glPushMatrix
|
||||||
GL11.glRotated(Math.toDegrees(tileEntity.rotation), 0, 1, 0)
|
GL11.glRotated(Math.toDegrees(tileEntity.rotation), 0, 1, 0)
|
||||||
RenderPlasmaHeater.MODEL.renderOnly(Array("rrot", "srot"): _*)
|
RenderPlasmaHeater.MODEL.renderOnly(Array("rrot", "srot"): _*)
|
||||||
|
|
|
@ -11,7 +11,6 @@ import net.minecraft.nbt.NBTTagCompound
|
||||||
import net.minecraft.network.Packet
|
import net.minecraft.network.Packet
|
||||||
import net.minecraftforge.common.util.ForgeDirection
|
import net.minecraftforge.common.util.ForgeDirection
|
||||||
import net.minecraftforge.fluids._
|
import net.minecraftforge.fluids._
|
||||||
import resonant.api.tile.ITagRender
|
|
||||||
import resonant.engine.ResonantEngine
|
import resonant.engine.ResonantEngine
|
||||||
import resonant.lib.grid.energy.EnergyStorage
|
import resonant.lib.grid.energy.EnergyStorage
|
||||||
import resonant.lib.mod.config.Config
|
import resonant.lib.mod.config.Config
|
||||||
|
@ -29,7 +28,7 @@ object TilePlasmaHeater
|
||||||
@Config var plasmaHeatAmount: Int = 100
|
@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 tankInputDeuterium: FluidTank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 10)
|
||||||
final val tankInputTritium: FluidTank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 10)
|
final val tankInputTritium: FluidTank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 10)
|
||||||
|
|
Loading…
Add table
Reference in a new issue