Half fixed several tile render issues
This commit is contained in:
parent
e5bced2524
commit
d77e3b5783
16 changed files with 95 additions and 60 deletions
|
@ -1,5 +1,13 @@
|
||||||
package resonantinduction.archaic
|
package resonantinduction.archaic
|
||||||
|
|
||||||
|
import cpw.mods.fml.client.registry.ClientRegistry
|
||||||
|
import resonantinduction.archaic.process.{RenderMillstone, TileMillstone, RenderCastingMold, TileCastingMold}
|
||||||
|
|
||||||
class ClientProxy extends CommonProxy
|
class ClientProxy extends CommonProxy
|
||||||
{
|
{
|
||||||
|
override def init
|
||||||
|
{
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileCastingMold], new RenderCastingMold)
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileMillstone], new RenderMillstone)
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -102,11 +102,13 @@ object Atomic {
|
||||||
final val ENTITY_ID_PREFIX: Int = 49
|
final val ENTITY_ID_PREFIX: Int = 49
|
||||||
final val SECOND_IN_TICKS: Int = 20
|
final val SECOND_IN_TICKS: Int = 20
|
||||||
final val NAME: String = Reference.name + " Atomic"
|
final val NAME: String = Reference.name + " Atomic"
|
||||||
final val contentRegistry: ModManager = new ModManager().setPrefix(Reference.prefix).setTab(ResonantTab.tab)
|
final val contentRegistry: ModManager = new ModManager().setPrefix(Reference.prefix).setTab(ResonantTab)
|
||||||
private final val SUPPORTED_LANGUAGES: Array[String] = Array[String]("en_US", "pl_PL", "de_DE", "ru_RU")
|
private final val SUPPORTED_LANGUAGES: Array[String] = Array[String]("en_US", "pl_PL", "de_DE", "ru_RU")
|
||||||
var INSTANCE = this
|
var INSTANCE = this
|
||||||
@SidedProxy(clientSide = "resonantinduction.atomic.ClientProxy", serverSide = "resonantinduction.atomic.CommonProxy") var proxy: CommonProxy = null
|
@SidedProxy(clientSide = "resonantinduction.atomic.ClientProxy", serverSide = "resonantinduction.atomic.CommonProxy")
|
||||||
@Mod.Metadata("ResonantInduction|Atomic") var metadata: ModMetadata = null
|
var proxy: CommonProxy = null
|
||||||
|
@Mod.Metadata("ResonantInduction|Atomic")
|
||||||
|
var metadata: ModMetadata = null
|
||||||
|
|
||||||
@EventHandler def preInit(event: FMLPreInitializationEvent) {
|
@EventHandler def preInit(event: FMLPreInitializationEvent) {
|
||||||
Atomic.INSTANCE = this
|
Atomic.INSTANCE = this
|
||||||
|
@ -159,20 +161,20 @@ object Atomic {
|
||||||
AtomicContent.blockFulmination = Atomic.contentRegistry.newBlock(classOf[TileFulmination])
|
AtomicContent.blockFulmination = Atomic.contentRegistry.newBlock(classOf[TileFulmination])
|
||||||
AtomicContent.blockQuantumAssembler = Atomic.contentRegistry.newBlock(classOf[TileQuantumAssembler])
|
AtomicContent.blockQuantumAssembler = Atomic.contentRegistry.newBlock(classOf[TileQuantumAssembler])
|
||||||
|
|
||||||
AtomicContent.itemHazmatTop = new ItemHazmat("HazmatMask", 0)
|
AtomicContent.itemHazmatTop = new ItemHazmat("HazmatMask", 0).setCreativeTab(ResonantTab)
|
||||||
AtomicContent.itemHazmatBody = new ItemHazmat("HazmatBody", 1)
|
AtomicContent.itemHazmatBody = new ItemHazmat("HazmatBody", 1).setCreativeTab(ResonantTab)
|
||||||
AtomicContent.itemHazmatLeggings = new ItemHazmat("HazmatLeggings", 2)
|
AtomicContent.itemHazmatLeggings = new ItemHazmat("HazmatLeggings", 2).setCreativeTab(ResonantTab)
|
||||||
AtomicContent.itemHazmatBoots = new ItemHazmat("HazmatBoots", 3)
|
AtomicContent.itemHazmatBoots = new ItemHazmat("HazmatBoots", 3).setCreativeTab(ResonantTab)
|
||||||
AtomicContent.itemCell = new Item().setUnlocalizedName("cellEmpty")
|
AtomicContent.itemCell = new Item().setUnlocalizedName("cellEmpty").setCreativeTab(ResonantTab)
|
||||||
AtomicContent.itemFissileFuel = new ItemFissileFuel().setUnlocalizedName("rodFissileFuel")
|
AtomicContent.itemFissileFuel = new ItemFissileFuel().setUnlocalizedName("rodFissileFuel").setCreativeTab(ResonantTab)
|
||||||
AtomicContent.itemDeuteriumCell = new ItemCell().setUnlocalizedName("cellDeuterium")
|
AtomicContent.itemDeuteriumCell = new ItemCell().setUnlocalizedName("cellDeuterium").setCreativeTab(ResonantTab)
|
||||||
AtomicContent.itemTritiumCell = new ItemCell().setUnlocalizedName("cellTritium")
|
AtomicContent.itemTritiumCell = new ItemCell().setUnlocalizedName("cellTritium").setCreativeTab(ResonantTab)
|
||||||
AtomicContent.itemWaterCell = new ItemCell().setUnlocalizedName("cellWater")
|
AtomicContent.itemWaterCell = new ItemCell().setUnlocalizedName("cellWater").setCreativeTab(ResonantTab)
|
||||||
AtomicContent.itemDarkMatter = new ItemDarkMatter().setUnlocalizedName("darkMatter")
|
AtomicContent.itemDarkMatter = new ItemDarkMatter().setUnlocalizedName("darkMatter").setCreativeTab(ResonantTab)
|
||||||
AtomicContent.itemAntimatter = new ItemAntimatter().setUnlocalizedName("antimatter")
|
AtomicContent.itemAntimatter = new ItemAntimatter().setUnlocalizedName("antimatter").setCreativeTab(ResonantTab)
|
||||||
AtomicContent.itemBreedingRod = new ItemBreederFuel().setUnlocalizedName("rodBreederFuel")
|
AtomicContent.itemBreedingRod = new ItemBreederFuel().setUnlocalizedName("rodBreederFuel").setCreativeTab(ResonantTab)
|
||||||
AtomicContent.itemYellowCake = new ItemRadioactive().setUnlocalizedName("yellowcake")
|
AtomicContent.itemYellowCake = new ItemRadioactive().setUnlocalizedName("yellowcake").setCreativeTab(ResonantTab)
|
||||||
AtomicContent.itemUranium = Atomic.contentRegistry.newItem(classOf[ItemUranium])
|
AtomicContent.itemUranium = Atomic.contentRegistry.newItem(classOf[ItemUranium]).setCreativeTab(ResonantTab)
|
||||||
|
|
||||||
GameRegistry.registerItem(AtomicContent.itemHazmatTop, "HazmatMask", "ResonantInduction|Atomic");
|
GameRegistry.registerItem(AtomicContent.itemHazmatTop, "HazmatMask", "ResonantInduction|Atomic");
|
||||||
GameRegistry.registerItem(AtomicContent.itemHazmatBody, "HazmatBody", "ResonantInduction|Atomic");
|
GameRegistry.registerItem(AtomicContent.itemHazmatBody, "HazmatBody", "ResonantInduction|Atomic");
|
||||||
|
@ -237,6 +239,7 @@ object Atomic {
|
||||||
})
|
})
|
||||||
Settings.config.save
|
Settings.config.save
|
||||||
ResonantTab.itemStack(new ItemStack(AtomicContent.blockReactorCell))
|
ResonantTab.itemStack(new ItemStack(AtomicContent.blockReactorCell))
|
||||||
|
Atomic.proxy.preInit
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler def init(evt: FMLInitializationEvent) {
|
@EventHandler def init(evt: FMLInitializationEvent) {
|
||||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraftforge.client.model.IModelCustom;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import resonant.lib.render.RenderUtility;
|
import resonant.lib.render.RenderUtility;
|
||||||
|
import resonant.lib.render.model.FixedTechneModel;
|
||||||
import resonantinduction.core.Reference;
|
import resonantinduction.core.Reference;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
@ -32,10 +33,15 @@ public class RenderNuclearBoiler extends TileEntitySpecialRenderer
|
||||||
|
|
||||||
bindTexture(TEXTURE);
|
bindTexture(TEXTURE);
|
||||||
|
|
||||||
MODEL.renderAll(); //TODO re-add rotation
|
if(MODEL instanceof FixedTechneModel)
|
||||||
//MODEL.renderOnlyAroundPivot(Math.toDegrees(tileEntity.rotation), 0, 1, 0, "FUEL BAR SUPPORT 1 ROTATES", "FUEL BAR 1 ROTATES");
|
{
|
||||||
//MODEL.renderOnlyAroundPivot(-Math.toDegrees(tileEntity.rotation), 0, 1, 0, "FUEL BAR SUPPORT 2 ROTATES", "FUEL BAR 2 ROTATES");
|
((FixedTechneModel)MODEL).renderOnlyAroundPivot(Math.toDegrees(tileEntity.rotation), 0, 1, 0, "FUEL BAR SUPPORT 1 ROTATES", "FUEL BAR 1 ROTATES");
|
||||||
//MODEL.renderAllExcept("FUEL BAR SUPPORT 1 ROTATES", "FUEL BAR SUPPORT 2 ROTATES", "FUEL BAR 1 ROTATES", "FUEL BAR 2 ROTATES");
|
((FixedTechneModel)MODEL).renderOnlyAroundPivot(-Math.toDegrees(tileEntity.rotation), 0, 1, 0, "FUEL BAR SUPPORT 2 ROTATES", "FUEL BAR 2 ROTATES");
|
||||||
|
MODEL.renderAllExcept("FUEL BAR SUPPORT 1 ROTATES", "FUEL BAR SUPPORT 2 ROTATES", "FUEL BAR 1 ROTATES", "FUEL BAR 2 ROTATES");
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
MODEL.renderAll();
|
||||||
|
}
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,8 @@ public class TileNuclearBoiler extends TileElectricInventory implements IPacketR
|
||||||
super(Material.iron);
|
super(Material.iron);
|
||||||
energy().setCapacity(DIAN * 2);
|
energy().setCapacity(DIAN * 2);
|
||||||
this.setSizeInventory(4);
|
this.setSizeInventory(4);
|
||||||
|
normalRender(false);
|
||||||
|
isOpaqueCube(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class TileCentrifuge extends TileElectricInventory implements IPacketRece
|
||||||
public TileCentrifuge()
|
public TileCentrifuge()
|
||||||
{
|
{
|
||||||
super(Material.iron);
|
super(Material.iron);
|
||||||
isOpaqueCube(true);
|
isOpaqueCube(false);
|
||||||
normalRender(false);
|
normalRender(false);
|
||||||
energy().setCapacity(DIAN * 2);
|
energy().setCapacity(DIAN * 2);
|
||||||
setSizeInventory(4);
|
setSizeInventory(4);
|
||||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraftforge.client.model.IModelCustom;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import resonant.lib.render.RenderUtility;
|
import resonant.lib.render.RenderUtility;
|
||||||
|
import resonant.lib.render.model.FixedTechneModel;
|
||||||
import resonantinduction.core.Reference;
|
import resonantinduction.core.Reference;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
@ -31,11 +32,19 @@ public class RenderChemicalExtractor extends TileEntitySpecialRenderer
|
||||||
|
|
||||||
bindTexture(TEXTURE);
|
bindTexture(TEXTURE);
|
||||||
|
|
||||||
//GL11.glPushMatrix();
|
if(MODEL instanceof FixedTechneModel)
|
||||||
//MODEL.renderOnlyAroundPivot(Math.toDegrees(tileEntity.rotation), 0, 0, 1, "MAIN CHAMBER-ROTATES", "MAGNET 1-ROTATES", "MAGNET 2-ROTATES");
|
{
|
||||||
//GL11.glPopMatrix();
|
GL11.glPushMatrix();
|
||||||
|
((FixedTechneModel)MODEL).renderOnlyAroundPivot(Math.toDegrees(tileEntity.rotation), 0, 0, 1, "MAIN CHAMBER-ROTATES", "MAGNET 1-ROTATES", "MAGNET 2-ROTATES");
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
|
||||||
|
MODEL.renderAllExcept("MAIN CHAMBER-ROTATES", "MAGNET 1-ROTATES", "MAGNET 2-ROTATES");
|
||||||
|
}else
|
||||||
|
{
|
||||||
MODEL.renderAll();
|
MODEL.renderAll();
|
||||||
//MODEL.renderAllExcept("MAIN CHAMBER-ROTATES", "MAGNET 1-ROTATES", "MAGNET 2-ROTATES");
|
}
|
||||||
|
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,8 @@ public class TilePlasmaHeater extends TileElectric implements IPacketReceiver, I
|
||||||
super(Material.iron);
|
super(Material.iron);
|
||||||
energy().setCapacity(joules);
|
energy().setCapacity(joules);
|
||||||
energy().setMaxTransfer(joules / 20);
|
energy().setMaxTransfer(joules / 20);
|
||||||
|
normalRender(false);
|
||||||
|
isOpaqueCube(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -9,7 +9,11 @@ import net.minecraft.entity.player.EntityPlayer
|
||||||
import net.minecraft.tileentity.TileEntity
|
import net.minecraft.tileentity.TileEntity
|
||||||
import net.minecraft.world.World
|
import net.minecraft.world.World
|
||||||
import resonantinduction.electrical.battery.{RenderBattery, TileBattery}
|
import resonantinduction.electrical.battery.{RenderBattery, TileBattery}
|
||||||
|
import resonantinduction.electrical.laser.emitter.{RenderLaserEmitter, TileLaserEmitter}
|
||||||
|
import resonantinduction.electrical.laser.focus.crystal.{RenderFocusCrystal, TileFocusCrystal}
|
||||||
|
import resonantinduction.electrical.laser.focus.mirror.{RenderMirror, TileMirror}
|
||||||
import resonantinduction.electrical.laser.fx.{EntityBlockParticleFX, EntityLaserFX, EntityScorchFX}
|
import resonantinduction.electrical.laser.fx.{EntityBlockParticleFX, EntityLaserFX, EntityScorchFX}
|
||||||
|
import resonantinduction.electrical.laser.receiver.{RenderLaserReceiver, TileLaserReceiver}
|
||||||
import resonantinduction.electrical.multimeter.{GuiMultimeter, PartMultimeter}
|
import resonantinduction.electrical.multimeter.{GuiMultimeter, PartMultimeter}
|
||||||
import resonantinduction.electrical.render.FXElectricBolt
|
import resonantinduction.electrical.render.FXElectricBolt
|
||||||
import resonantinduction.electrical.tesla.{RenderTesla, TileTesla}
|
import resonantinduction.electrical.tesla.{RenderTesla, TileTesla}
|
||||||
|
@ -17,16 +21,19 @@ import universalelectricity.core.transform.vector.Vector3
|
||||||
|
|
||||||
/** @author Calclavia */
|
/** @author Calclavia */
|
||||||
@SideOnly(Side.CLIENT) class ClientProxy extends CommonProxy {
|
@SideOnly(Side.CLIENT) class ClientProxy extends CommonProxy {
|
||||||
override def preInit {
|
override def preInit
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileTesla], new RenderTesla)
|
{
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileBattery], new RenderBattery)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override def init {
|
override def init {
|
||||||
//RenderingRegistry.registerBlockHandler(new BlockRenderingHandler.type)
|
//RenderingRegistry.registerBlockHandler(new BlockRenderingHandler.type)
|
||||||
//ClientRegistry.bindTileEntitySpecialRenderer(classOf(TileLaserEmitter), RenderLaserEmitter)
|
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileTesla], new RenderTesla)
|
||||||
//ClientRegistry.bindTileEntitySpecialRenderer(classOf(TileMirror), RenderMirror)
|
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileBattery], new RenderBattery)
|
||||||
//ClientRegistry.bindTileEntitySpecialRenderer(classOf(TileFocusCrystal), RenderFocusCrystal)
|
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileLaserEmitter], RenderLaserEmitter)
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileLaserReceiver], RenderLaserReceiver)
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileMirror], RenderMirror)
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileFocusCrystal], RenderFocusCrystal)
|
||||||
}
|
}
|
||||||
|
|
||||||
override def postInit {
|
override def postInit {
|
||||||
|
|
|
@ -17,11 +17,11 @@ import resonantinduction.core.resource.ItemResourcePart
|
||||||
import resonantinduction.core.{Reference, ResonantTab, Settings}
|
import resonantinduction.core.{Reference, ResonantTab, Settings}
|
||||||
import resonantinduction.electrical.battery.{ItemBlockBattery, TileBattery}
|
import resonantinduction.electrical.battery.{ItemBlockBattery, TileBattery}
|
||||||
import resonantinduction.electrical.generator.{TileMotor, TileSolarPanel, TileThermopile}
|
import resonantinduction.electrical.generator.{TileMotor, TileSolarPanel, TileThermopile}
|
||||||
import resonantinduction.electrical.laser.emitter.BlockLaserEmitter
|
import resonantinduction.electrical.laser.emitter.{TileLaserEmitter, BlockLaserEmitter}
|
||||||
import resonantinduction.electrical.laser.focus.ItemFocusingMatrix
|
import resonantinduction.electrical.laser.focus.ItemFocusingMatrix
|
||||||
import resonantinduction.electrical.laser.focus.crystal.BlockFocusCrystal
|
import resonantinduction.electrical.laser.focus.crystal.{TileFocusCrystal, BlockFocusCrystal}
|
||||||
import resonantinduction.electrical.laser.focus.mirror.BlockMirror
|
import resonantinduction.electrical.laser.focus.mirror.{TileMirror, BlockMirror}
|
||||||
import resonantinduction.electrical.laser.receiver.BlockLaserReceiver
|
import resonantinduction.electrical.laser.receiver.{TileLaserReceiver, BlockLaserReceiver}
|
||||||
import resonantinduction.electrical.levitator.ItemLevitator
|
import resonantinduction.electrical.levitator.ItemLevitator
|
||||||
import resonantinduction.electrical.multimeter.ItemMultimeter
|
import resonantinduction.electrical.multimeter.ItemMultimeter
|
||||||
import resonantinduction.electrical.tesla.TileTesla
|
import resonantinduction.electrical.tesla.TileTesla
|
||||||
|
@ -62,6 +62,11 @@ object Electrical {
|
||||||
ElectricalContent.blockMirror = new BlockMirror()
|
ElectricalContent.blockMirror = new BlockMirror()
|
||||||
ElectricalContent.blockFocusCrystal = new BlockFocusCrystal()
|
ElectricalContent.blockFocusCrystal = new BlockFocusCrystal()
|
||||||
|
|
||||||
|
GameRegistry.registerTileEntity(classOf[TileLaserEmitter], "EMLaserEmitter");
|
||||||
|
GameRegistry.registerTileEntity(classOf[TileLaserReceiver], "EMLaserReceiver");
|
||||||
|
GameRegistry.registerTileEntity(classOf[TileMirror], "EMLaserMirror");
|
||||||
|
GameRegistry.registerTileEntity(classOf[TileFocusCrystal], "EMFocusCrystal");
|
||||||
|
|
||||||
ElectricalContent.itemFocusingMatrix = new ItemFocusingMatrix()
|
ElectricalContent.itemFocusingMatrix = new ItemFocusingMatrix()
|
||||||
|
|
||||||
GameRegistry.registerBlock(ElectricalContent.blockLaserEmitter, "LaserEmitter")
|
GameRegistry.registerBlock(ElectricalContent.blockLaserEmitter, "LaserEmitter")
|
||||||
|
|
|
@ -36,6 +36,7 @@ public class TileBattery extends TileEnergyDistribution implements IPacketReceiv
|
||||||
this.saveIOMap_$eq(true);
|
this.saveIOMap_$eq(true);
|
||||||
this.normalRender(false);
|
this.normalRender(false);
|
||||||
this.isOpaqueCube(false);
|
this.isOpaqueCube(false);
|
||||||
|
this.itemBlock(ItemBlockBattery.class);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,15 @@
|
||||||
package resonantinduction.electrical.laser
|
package resonantinduction.electrical.laser
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity
|
import net.minecraft.block.material.Material
|
||||||
import net.minecraftforge.common.util.ForgeDirection
|
import net.minecraftforge.common.util.ForgeDirection
|
||||||
import universalelectricity.core.transform.vector.Vector3
|
import resonant.content.prefab.java.TileAdvanced
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Calclavia
|
* @author Calclavia
|
||||||
*/
|
*/
|
||||||
class TileBase extends TileEntity
|
class TileBase extends TileAdvanced(Material.iron)
|
||||||
{
|
{
|
||||||
def world = worldObj
|
|
||||||
|
|
||||||
def isPowered(): Boolean = getWorldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)
|
def isPowered(): Boolean = getWorldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)
|
||||||
|
|
||||||
def direction: ForgeDirection = ForgeDirection.getOrientation(getBlockMetadata)
|
def direction: ForgeDirection = ForgeDirection.getOrientation(getBlockMetadata)
|
||||||
|
|
||||||
def position: Vector3 = new Vector3(this)
|
|
||||||
|
|
||||||
def x = xCoord
|
|
||||||
|
|
||||||
def y = yCoord
|
|
||||||
|
|
||||||
def z = zCoord
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ object RenderLaserEmitter extends TileEntitySpecialRenderer
|
||||||
glEnable(GL_BLEND)
|
glEnable(GL_BLEND)
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
|
||||||
|
|
||||||
tileEntity.asInstanceOf[TileLaserEmitter].direction match
|
tileEntity.asInstanceOf[TileLaserEmitter].getDirection match
|
||||||
{
|
{
|
||||||
case ForgeDirection.UNKNOWN =>
|
case ForgeDirection.UNKNOWN =>
|
||||||
case ForgeDirection.UP => glRotatef(-90, 1, 0, 0)
|
case ForgeDirection.UP => glRotatef(-90, 1, 0, 0)
|
||||||
|
@ -40,7 +40,7 @@ object RenderLaserEmitter extends TileEntitySpecialRenderer
|
||||||
case ForgeDirection.EAST => glRotatef(0, 0, 1, 0)
|
case ForgeDirection.EAST => glRotatef(0, 0, 1, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tileEntity.asInstanceOf[TileLaserEmitter].direction.offsetY == 0)
|
if (tileEntity.asInstanceOf[TileLaserEmitter].getDirection.offsetY == 0)
|
||||||
glRotatef(-90, 0, 1, 0)
|
glRotatef(-90, 0, 1, 0)
|
||||||
else
|
else
|
||||||
glRotatef(180, 1, 0, 0)
|
glRotatef(180, 1, 0, 0)
|
||||||
|
|
|
@ -1,28 +1,30 @@
|
||||||
package resonantinduction.electrical.laser.emitter
|
package resonantinduction.electrical.laser.emitter
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material
|
||||||
import net.minecraft.util.MovingObjectPosition
|
import net.minecraft.util.MovingObjectPosition
|
||||||
|
import resonant.content.prefab.java.TileAdvanced
|
||||||
|
import resonantinduction.electrical.laser.{ILaserHandler, Laser}
|
||||||
import universalelectricity.core.transform.vector.Vector3
|
import universalelectricity.core.transform.vector.Vector3
|
||||||
import resonantinduction.electrical.laser.{ILaserHandler, Laser, TileBase}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Calclavia
|
* @author Calclavia
|
||||||
*/
|
*/
|
||||||
class TileLaserEmitter extends TileBase with ILaserHandler
|
class TileLaserEmitter extends TileAdvanced(Material.iron) with ILaserHandler
|
||||||
{
|
{
|
||||||
var energy = 0D
|
var energy = 0D
|
||||||
|
|
||||||
override def onLaserHit(renderStart: Vector3, incidentDirection: Vector3, hit: MovingObjectPosition, color: Vector3, energy: Double) = false
|
override def onLaserHit(renderStart: Vector3, incidentDirection: Vector3, hit: MovingObjectPosition, color: Vector3, energy: Double) = false
|
||||||
|
|
||||||
override def updateEntity()
|
override def update()
|
||||||
{
|
{
|
||||||
if (isPowered())
|
if (isIndirectlyPowered)
|
||||||
{
|
{
|
||||||
energy += world.getStrongestIndirectPower(x, y, z) * (Laser.maxEnergy / 15)
|
energy += world.getStrongestIndirectPower(x, y, z) * (Laser.maxEnergy / 15)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (energy > 0)
|
if (energy > 0)
|
||||||
{
|
{
|
||||||
Laser.spawn(worldObj, position + 0.5 + new Vector3(direction) * 0.51, position + new Vector3(direction) * 0.6 + 0.5, new Vector3(direction), energy)
|
Laser.spawn(worldObj, position + 0.5 + new Vector3(getDirection) * 0.51, position + new Vector3(getDirection) * 0.6 + 0.5, new Vector3(getDirection), energy)
|
||||||
energy = 0;
|
energy = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class TileFocusCrystal extends TileBase with ILaserHandler with IFocus
|
||||||
var energy = 0D
|
var energy = 0D
|
||||||
var color = new Vector3(1, 1, 1)
|
var color = new Vector3(1, 1, 1)
|
||||||
|
|
||||||
override def updateEntity()
|
override def update()
|
||||||
{
|
{
|
||||||
if (isPowered())
|
if (isPowered())
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@ class TileMirror extends TileBase with ILaserHandler with IFocus
|
||||||
|
|
||||||
private var cachedHits = List[Vector3]()
|
private var cachedHits = List[Vector3]()
|
||||||
|
|
||||||
override def updateEntity()
|
override def update()
|
||||||
{
|
{
|
||||||
if (isPowered())
|
if (isPowered())
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,7 @@ class TileLaserReceiver extends TileBase with ILaserHandler
|
||||||
var redstoneValue = 0
|
var redstoneValue = 0
|
||||||
private var prevRedstoneValue = 0;
|
private var prevRedstoneValue = 0;
|
||||||
|
|
||||||
override def updateEntity()
|
override def update()
|
||||||
{
|
{
|
||||||
if (energy > 0)
|
if (energy > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue