diff --git a/src/main/scala/resonantinduction/core/Reference.scala b/src/main/scala/resonantinduction/core/Reference.scala index 3e71ba58b..928ed3e4d 100644 --- a/src/main/scala/resonantinduction/core/Reference.scala +++ b/src/main/scala/resonantinduction/core/Reference.scala @@ -34,4 +34,5 @@ final object Reference final val itemTextureDirectory: String = textureDirectory + "items/" final val modelPath: String = "models/" final val modelDirectory: String = assetDirectory + modelPath + final val FX_DIRECTORY = textureDirectory + "fx/" } \ No newline at end of file diff --git a/src/main/scala/resonantinduction/electrical/ClientProxy.scala b/src/main/scala/resonantinduction/electrical/ClientProxy.scala index 3324bf926..aed674ff7 100644 --- a/src/main/scala/resonantinduction/electrical/ClientProxy.scala +++ b/src/main/scala/resonantinduction/electrical/ClientProxy.scala @@ -2,14 +2,13 @@ package resonantinduction.electrical import codechicken.multipart.{TMultiPart, TileMultipart} import cpw.mods.fml.client.FMLClientHandler -import cpw.mods.fml.client.registry.{ClientRegistry, RenderingRegistry} +import cpw.mods.fml.client.registry.ClientRegistry import cpw.mods.fml.relauncher.{Side, SideOnly} import net.minecraft.block.Block import net.minecraft.entity.player.EntityPlayer import net.minecraft.tileentity.TileEntity import net.minecraft.world.World import resonantinduction.electrical.battery.{RenderBattery, TileBattery} -import resonantinduction.electrical.laser.BlockRenderingHandler import resonantinduction.electrical.laser.fx.{EntityBlockParticleFX, EntityLaserFX, EntityScorchFX} import resonantinduction.electrical.multimeter.{GuiMultimeter, PartMultimeter} import resonantinduction.electrical.render.FXElectricBolt @@ -24,7 +23,7 @@ import universalelectricity.core.transform.vector.Vector3 } override def init { - RenderingRegistry.registerBlockHandler(new BlockRenderingHandler.type) + //RenderingRegistry.registerBlockHandler(new BlockRenderingHandler.type) //ClientRegistry.bindTileEntitySpecialRenderer(classOf(TileLaserEmitter), RenderLaserEmitter) //ClientRegistry.bindTileEntitySpecialRenderer(classOf(TileMirror), RenderMirror) //ClientRegistry.bindTileEntitySpecialRenderer(classOf(TileFocusCrystal), RenderFocusCrystal) diff --git a/src/main/scala/resonantinduction/electrical/Electrical.scala b/src/main/scala/resonantinduction/electrical/Electrical.scala index 2d5e11c80..e05191987 100644 --- a/src/main/scala/resonantinduction/electrical/Electrical.scala +++ b/src/main/scala/resonantinduction/electrical/Electrical.scala @@ -15,7 +15,7 @@ import resonant.lib.loadable.LoadableHandler import resonantinduction.atomic.gate.ItemQuantumGlyph import resonantinduction.core.resource.ItemResourcePart import resonantinduction.core.{Reference, ResonantTab, Settings} -import resonantinduction.electrical.battery.{BlockBattery, ItemBlockBattery, TileBattery} +import resonantinduction.electrical.battery.{ItemBlockBattery, TileBattery} import resonantinduction.electrical.generator.{TileMotor, TileSolarPanel, TileThermopile} import resonantinduction.electrical.laser.emitter.BlockLaserEmitter import resonantinduction.electrical.laser.focus.ItemFocusingMatrix @@ -75,7 +75,7 @@ object Electrical { ElectricalContent.itemMultimeter = Electrical.contentRegistry.newItem(classOf[ItemMultimeter]) ElectricalContent.itemTransformer = Electrical.contentRegistry.newItem(classOf[ItemElectricTransformer]) ElectricalContent.blockTesla = Electrical.contentRegistry.newBlock(classOf[TileTesla]) - ElectricalContent.blockBattery = Electrical.contentRegistry.newBlock(classOf[BlockBattery], classOf[ItemBlockBattery], classOf[TileBattery]) + ElectricalContent.blockBattery = Electrical.contentRegistry.newBlock(classOf[TileBattery]) ElectricalContent.itemLevitator = Electrical.contentRegistry.newItem(classOf[ItemLevitator]) ElectricalContent.itemInsulation = Electrical.contentRegistry.newItem("insulation", classOf[ItemResourcePart]) ElectricalContent.blockSolarPanel = Electrical.contentRegistry.newBlock(classOf[TileSolarPanel]) diff --git a/src/main/scala/resonantinduction/electrical/laser/Laser.scala b/src/main/scala/resonantinduction/electrical/laser/Laser.scala index 1a0b3965f..2b31bd1d8 100644 --- a/src/main/scala/resonantinduction/electrical/laser/Laser.scala +++ b/src/main/scala/resonantinduction/electrical/laser/Laser.scala @@ -10,7 +10,7 @@ import net.minecraft.item.ItemDye import net.minecraft.tileentity.TileEntityFurnace import net.minecraft.util.{DamageSource, MovingObjectPosition} import net.minecraft.world.World -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.electrical.Electrical import universalelectricity.core.transform.vector.Vector3 import scala.collection.mutable @@ -67,12 +67,12 @@ object Laser { if (!hitTile.asInstanceOf[ILaserHandler].onLaserHit(renderStart, direction, hit, color, energy)) { - ElectromagneticCoherence.proxy.renderLaser(world, renderStart, hitVec, color, energy) + Electrical.proxy.renderLaser(world, renderStart, hitVec, color, energy) } } else if (hitBlock.getMaterial == Material.glass) { - ElectromagneticCoherence.proxy.renderLaser(world, renderStart, hitVec, color, energy) + Electrical.proxy.renderLaser(world, renderStart, hitVec, color, energy) var newColor = color if (hitBlock.isInstanceOf[BlockStainedGlass] || hitBlock.isInstanceOf[BlockStainedGlassPane]) @@ -168,13 +168,13 @@ object Laser /** * Render laser hit */ - ElectromagneticCoherence.proxy.renderLaser(world, renderStart, hitVec, color, energy) + Electrical.proxy.renderLaser(world, renderStart, hitVec, color, energy) /** * Render scorch and particles */ - ElectromagneticCoherence.proxy.renderScorch(world, hitVec - (direction * 0.02), hit.sideHit) - ElectromagneticCoherence.proxy.renderBlockParticle(world, hitVec, hitBlock, hit.sideHit) + Electrical.proxy.renderScorch(world, hitVec - (direction * 0.02), hit.sideHit) + Electrical.proxy.renderBlockParticle(world, hitVec, hitBlock, hit.sideHit) } } else if (hit.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) @@ -190,13 +190,13 @@ object Laser } } - ElectromagneticCoherence.proxy.renderLaser(world, renderStart, new Vector3(hit.hitVec), color, energy) + Electrical.proxy.renderLaser(world, renderStart, new Vector3(hit.hitVec), color, energy) } return } - ElectromagneticCoherence.proxy.renderLaser(world, renderStart, maxPos, color, energy) + Electrical.proxy.renderLaser(world, renderStart, maxPos, color, energy) } } diff --git a/src/main/scala/resonantinduction/electrical/laser/emitter/BlockLaserEmitter.scala b/src/main/scala/resonantinduction/electrical/laser/emitter/BlockLaserEmitter.scala index d9e6ea607..60af10020 100644 --- a/src/main/scala/resonantinduction/electrical/laser/emitter/BlockLaserEmitter.scala +++ b/src/main/scala/resonantinduction/electrical/laser/emitter/BlockLaserEmitter.scala @@ -7,7 +7,7 @@ import net.minecraft.entity.EntityLivingBase import net.minecraft.item.ItemStack import net.minecraft.tileentity.TileEntity import net.minecraft.world.{IBlockAccess, World} -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.core.Reference import resonantinduction.electrical.laser.{BlockRenderingHandler, Laser} /** @@ -15,7 +15,7 @@ import resonantinduction.electrical.laser.{BlockRenderingHandler, Laser} */ class BlockLaserEmitter extends BlockContainer(Material.rock) { - setBlockName(ElectromagneticCoherence.PREFIX + "laserEmitter") + setBlockName(Reference.prefix + "laserEmitter") setBlockTextureName("stone") /** diff --git a/src/main/scala/resonantinduction/electrical/laser/emitter/RenderLaserEmitter.scala b/src/main/scala/resonantinduction/electrical/laser/emitter/RenderLaserEmitter.scala index a7f5f0781..e4689a765 100644 --- a/src/main/scala/resonantinduction/electrical/laser/emitter/RenderLaserEmitter.scala +++ b/src/main/scala/resonantinduction/electrical/laser/emitter/RenderLaserEmitter.scala @@ -9,7 +9,7 @@ import net.minecraftforge.client.model.AdvancedModelLoader import net.minecraftforge.common.util.ForgeDirection import org.lwjgl.opengl.GL11 import org.lwjgl.opengl.GL11._ -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.core.Reference /** * @author Calclavia @@ -17,8 +17,8 @@ import resonantinduction.electrical.em.ElectromagneticCoherence @SideOnly(Side.CLIENT) object RenderLaserEmitter extends TileEntitySpecialRenderer { - val model = AdvancedModelLoader.loadModel(new ResourceLocation(ElectromagneticCoherence.DOMAIN, ElectromagneticCoherence.MODEL_PATH_NAME + "laserEmitter.tcn")) - val texture = new ResourceLocation(ElectromagneticCoherence.DOMAIN, ElectromagneticCoherence.MODEL_PATH_NAME + "laserEmitter.png") + val model = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.domain, Reference.modelDirectory + "laserEmitter.tcn")) + val texture = new ResourceLocation(Reference.domain, Reference.modelPath + "laserEmitter.png") def renderTileEntityAt(tileEntity: TileEntity, x: Double, y: Double, z: Double, f: Float) { diff --git a/src/main/scala/resonantinduction/electrical/laser/focus/ItemFocusingMatrix.scala b/src/main/scala/resonantinduction/electrical/laser/focus/ItemFocusingMatrix.scala index a46b85936..e57e206cb 100644 --- a/src/main/scala/resonantinduction/electrical/laser/focus/ItemFocusingMatrix.scala +++ b/src/main/scala/resonantinduction/electrical/laser/focus/ItemFocusingMatrix.scala @@ -6,8 +6,7 @@ import net.minecraft.item.{Item, ItemStack} import net.minecraft.nbt.NBTTagCompound import net.minecraft.util.{ChatComponentText, EnumChatFormatting} import net.minecraft.world.World -import resonantinduction.core.ResonantTab -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.core.{Reference, ResonantTab} import universalelectricity.core.transform.rotation.Quaternion import universalelectricity.core.transform.vector.Vector3 @@ -19,8 +18,8 @@ import scala.util.Random */ class ItemFocusingMatrix extends Item { - setUnlocalizedName(ElectromagneticCoherence.PREFIX + "focusingMatrix") - setTextureName(ElectromagneticCoherence.PREFIX + "focusingMatrix") + setUnlocalizedName(Reference.prefix + "focusingMatrix") + setTextureName(Reference.prefix + "focusingMatrix") setCreativeTab(ResonantTab) /** diff --git a/src/main/scala/resonantinduction/electrical/laser/focus/crystal/BlockFocusCrystal.scala b/src/main/scala/resonantinduction/electrical/laser/focus/crystal/BlockFocusCrystal.scala index f984d3056..c33e14d06 100644 --- a/src/main/scala/resonantinduction/electrical/laser/focus/crystal/BlockFocusCrystal.scala +++ b/src/main/scala/resonantinduction/electrical/laser/focus/crystal/BlockFocusCrystal.scala @@ -4,7 +4,7 @@ import cpw.mods.fml.relauncher.{Side, SideOnly} import net.minecraft.block.material.Material import net.minecraft.tileentity.TileEntity import net.minecraft.world.World -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.core.Reference import resonantinduction.electrical.laser.BlockRenderingHandler import resonantinduction.electrical.laser.focus.BlockFocusBase @@ -13,7 +13,7 @@ import resonantinduction.electrical.laser.focus.BlockFocusBase */ class BlockFocusCrystal extends BlockFocusBase(Material.rock) { - setBlockName(ElectromagneticCoherence.PREFIX + "focusCrystal") + setBlockName(Reference.prefix + "focusCrystal") setBlockTextureName("glass") override def createNewTileEntity(world: World, metadata: Int): TileEntity = diff --git a/src/main/scala/resonantinduction/electrical/laser/focus/crystal/RenderFocusCrystal.scala b/src/main/scala/resonantinduction/electrical/laser/focus/crystal/RenderFocusCrystal.scala index 9e966af63..3fe283ff3 100644 --- a/src/main/scala/resonantinduction/electrical/laser/focus/crystal/RenderFocusCrystal.scala +++ b/src/main/scala/resonantinduction/electrical/laser/focus/crystal/RenderFocusCrystal.scala @@ -8,7 +8,7 @@ import net.minecraft.util.ResourceLocation import net.minecraftforge.client.model.AdvancedModelLoader import org.lwjgl.opengl.GL11 import org.lwjgl.opengl.GL11._ -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.core.Reference /** * @author Calclavia @@ -16,8 +16,8 @@ import resonantinduction.electrical.em.ElectromagneticCoherence @SideOnly(Side.CLIENT) object RenderFocusCrystal extends TileEntitySpecialRenderer { - val model = AdvancedModelLoader.loadModel(new ResourceLocation(ElectromagneticCoherence.DOMAIN, ElectromagneticCoherence.MODEL_PATH_NAME + "focusCrystal.tcn")) - val texture = new ResourceLocation(ElectromagneticCoherence.DOMAIN, ElectromagneticCoherence.MODEL_PATH_NAME + "focusCrystal.png") + val model = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.domain, Reference.modelDirectory + "focusCrystal.tcn")) + val texture = new ResourceLocation(Reference.domain, Reference.modelPath + "focusCrystal.png") def renderTileEntityAt(tileEntity: TileEntity, x: Double, y: Double, z: Double, f: Float) { diff --git a/src/main/scala/resonantinduction/electrical/laser/focus/crystal/TileFocusCrystal.scala b/src/main/scala/resonantinduction/electrical/laser/focus/crystal/TileFocusCrystal.scala index ef46e8d6f..31b84fced 100644 --- a/src/main/scala/resonantinduction/electrical/laser/focus/crystal/TileFocusCrystal.scala +++ b/src/main/scala/resonantinduction/electrical/laser/focus/crystal/TileFocusCrystal.scala @@ -5,7 +5,7 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity import net.minecraft.network.{NetworkManager, Packet} import net.minecraft.util.MovingObjectPosition import net.minecraftforge.common.util.ForgeDirection -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.electrical.Electrical import resonantinduction.electrical.laser.focus.IFocus import resonantinduction.electrical.laser.{ILaserHandler, Laser, TileBase} import universalelectricity.core.transform.rotation.Quaternion @@ -66,7 +66,7 @@ class TileFocusCrystal extends TileBase with ILaserHandler with IFocus override def onLaserHit(renderStart: Vector3, incidentDirection: Vector3, hit: MovingObjectPosition, color: Vector3, energy: Double): Boolean = { - ElectromagneticCoherence.proxy.renderLaser(worldObj, renderStart, position + 0.5, color, energy) + Electrical.proxy.renderLaser(worldObj, renderStart, position + 0.5, color, energy) this.energy += energy this.color = (this.color + color) / 2 return true diff --git a/src/main/scala/resonantinduction/electrical/laser/focus/mirror/BlockMirror.scala b/src/main/scala/resonantinduction/electrical/laser/focus/mirror/BlockMirror.scala index 976c79778..309727ce5 100644 --- a/src/main/scala/resonantinduction/electrical/laser/focus/mirror/BlockMirror.scala +++ b/src/main/scala/resonantinduction/electrical/laser/focus/mirror/BlockMirror.scala @@ -4,8 +4,7 @@ import cpw.mods.fml.relauncher.{Side, SideOnly} import net.minecraft.block.material.Material import net.minecraft.tileentity.TileEntity import net.minecraft.world.World -import resonantinduction.core.ResonantTab -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.core.{Reference, ResonantTab} import resonantinduction.electrical.laser.BlockRenderingHandler import resonantinduction.electrical.laser.focus.BlockFocusBase @@ -14,7 +13,7 @@ import resonantinduction.electrical.laser.focus.BlockFocusBase */ class BlockMirror extends BlockFocusBase(Material.rock) { - setBlockName(ElectromagneticCoherence.PREFIX + "mirror") + setBlockName(Reference.prefix + "mirror") setBlockTextureName("stone") setCreativeTab(ResonantTab) diff --git a/src/main/scala/resonantinduction/electrical/laser/focus/mirror/RenderMirror.scala b/src/main/scala/resonantinduction/electrical/laser/focus/mirror/RenderMirror.scala index 454dae566..d079ed791 100644 --- a/src/main/scala/resonantinduction/electrical/laser/focus/mirror/RenderMirror.scala +++ b/src/main/scala/resonantinduction/electrical/laser/focus/mirror/RenderMirror.scala @@ -8,7 +8,7 @@ import net.minecraft.util.ResourceLocation import net.minecraftforge.client.model.AdvancedModelLoader import org.lwjgl.opengl.GL11 import org.lwjgl.opengl.GL11._ -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.core.Reference /** * @author Calclavia @@ -16,8 +16,8 @@ import resonantinduction.electrical.em.ElectromagneticCoherence @SideOnly(Side.CLIENT) object RenderMirror extends TileEntitySpecialRenderer { - val model = AdvancedModelLoader.loadModel(new ResourceLocation(ElectromagneticCoherence.DOMAIN, ElectromagneticCoherence.MODEL_PATH_NAME + "mirror.tcn")) - val texture = new ResourceLocation(ElectromagneticCoherence.DOMAIN, ElectromagneticCoherence.MODEL_PATH_NAME + "mirror.png") + val model = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.domain, Reference.modelPath + "mirror.tcn")) + val texture = new ResourceLocation(Reference.domain, Reference.modelPath + "mirror.png") def renderTileEntityAt(tileEntity: TileEntity, x: Double, y: Double, z: Double, f: Float) { diff --git a/src/main/scala/resonantinduction/electrical/laser/focus/mirror/TileMirror.scala b/src/main/scala/resonantinduction/electrical/laser/focus/mirror/TileMirror.scala index 47c41fd92..4c6bbdba6 100644 --- a/src/main/scala/resonantinduction/electrical/laser/focus/mirror/TileMirror.scala +++ b/src/main/scala/resonantinduction/electrical/laser/focus/mirror/TileMirror.scala @@ -5,7 +5,7 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity import net.minecraft.network.{NetworkManager, Packet} import net.minecraft.util.MovingObjectPosition import net.minecraftforge.common.util.ForgeDirection -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.electrical.Electrical import resonantinduction.electrical.laser.focus.IFocus import resonantinduction.electrical.laser.{ILaserHandler, Laser, TileBase} import universalelectricity.core.transform.rotation.Quaternion @@ -70,7 +70,7 @@ class TileMirror extends TileBase with ILaserHandler with IFocus /** * Render incoming laser */ - ElectromagneticCoherence.proxy.renderLaser(worldObj, renderStart, position + 0.5, color, energy) + Electrical.proxy.renderLaser(worldObj, renderStart, position + 0.5, color, energy) /** * Calculate Reflection diff --git a/src/main/scala/resonantinduction/electrical/laser/fx/EntityLaserFX.scala b/src/main/scala/resonantinduction/electrical/laser/fx/EntityLaserFX.scala index e0ad64297..7a3c8c60f 100644 --- a/src/main/scala/resonantinduction/electrical/laser/fx/EntityLaserFX.scala +++ b/src/main/scala/resonantinduction/electrical/laser/fx/EntityLaserFX.scala @@ -7,7 +7,8 @@ import net.minecraft.client.renderer.Tessellator import net.minecraft.util.ResourceLocation import net.minecraft.world.World import org.lwjgl.opengl.GL11._ -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.core.Reference +import resonantinduction.electrical.ElectricalContent import resonantinduction.electrical.laser.Laser import universalelectricity.core.transform.vector.Vector3 @@ -17,10 +18,10 @@ import universalelectricity.core.transform.vector.Vector3 @SideOnly(Side.CLIENT) class EntityLaserFX(par1World: World, start: Vector3, end: Vector3, color: Vector3, energy: Double) extends EntityFX(par1World, start.x, start.y, start.z) { - val laserStartTexture = new ResourceLocation(ElectromagneticCoherence.DOMAIN, ElectromagneticCoherence.FX_DIRECTORY + "laserStart.png") - val laserMiddleTexture = new ResourceLocation(ElectromagneticCoherence.DOMAIN, ElectromagneticCoherence.FX_DIRECTORY + "laserMiddle.png") - val laserEndTexture = new ResourceLocation(ElectromagneticCoherence.DOMAIN, ElectromagneticCoherence.FX_DIRECTORY + "laserEnd.png") - val laserNoiseTexture = new ResourceLocation(ElectromagneticCoherence.DOMAIN, ElectromagneticCoherence.FX_DIRECTORY + "noise.png") + val laserStartTexture = new ResourceLocation(Reference.domain, Reference.FX_DIRECTORY + "laserStart.png") + val laserMiddleTexture = new ResourceLocation(Reference.domain, Reference.FX_DIRECTORY + "laserMiddle.png") + val laserEndTexture = new ResourceLocation(Reference.domain, Reference.FX_DIRECTORY + "laserEnd.png") + val laserNoiseTexture = new ResourceLocation(Reference.domain, Reference.FX_DIRECTORY + "noise.png") val energyPercentage = Math.min(energy / Laser.maxEnergy, 1).toFloat @@ -187,7 +188,7 @@ class EntityLaserFX(par1World: World, start: Vector3, end: Vector3, color: Vecto glPopMatrix() - FMLClientHandler.instance().getClient().renderEngine.bindTexture(ElectromagneticCoherence.particleTextures) + FMLClientHandler.instance().getClient().renderEngine.bindTexture(ElectricalContent.particleTextures) tessellator.startDrawingQuads() } diff --git a/src/main/scala/resonantinduction/electrical/laser/fx/EntityScorchFX.scala b/src/main/scala/resonantinduction/electrical/laser/fx/EntityScorchFX.scala index bb80a37c3..57e47354d 100644 --- a/src/main/scala/resonantinduction/electrical/laser/fx/EntityScorchFX.scala +++ b/src/main/scala/resonantinduction/electrical/laser/fx/EntityScorchFX.scala @@ -8,7 +8,8 @@ import net.minecraft.util.ResourceLocation import net.minecraft.world.World import net.minecraftforge.common.util.ForgeDirection import org.lwjgl.opengl.GL11._ -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.core.Reference +import resonantinduction.electrical.ElectricalContent import universalelectricity.core.transform.vector.Vector3 /** @@ -18,7 +19,7 @@ import universalelectricity.core.transform.vector.Vector3 @SideOnly(Side.CLIENT) class EntityScorchFX(par1World: World, position: Vector3, side: Int) extends EntityFX(par1World, position.x, position.y, position.z) { - val texture = new ResourceLocation(ElectromagneticCoherence.DOMAIN, ElectromagneticCoherence.FX_DIRECTORY + "scorch.png") + val texture = new ResourceLocation(Reference.domain, Reference.FX_DIRECTORY + "scorch.png") lastTickPosX = posX lastTickPosY = posY @@ -101,7 +102,7 @@ class EntityScorchFX(par1World: World, position: Vector3, side: Int) extends Ent glPopMatrix() - FMLClientHandler.instance().getClient().renderEngine.bindTexture(ElectromagneticCoherence.particleTextures) + FMLClientHandler.instance().getClient().renderEngine.bindTexture(ElectricalContent.particleTextures) tessellator.startDrawingQuads() } diff --git a/src/main/scala/resonantinduction/electrical/laser/receiver/BlockLaserReceiver.scala b/src/main/scala/resonantinduction/electrical/laser/receiver/BlockLaserReceiver.scala index 51b852689..6b1067be7 100644 --- a/src/main/scala/resonantinduction/electrical/laser/receiver/BlockLaserReceiver.scala +++ b/src/main/scala/resonantinduction/electrical/laser/receiver/BlockLaserReceiver.scala @@ -7,7 +7,7 @@ import net.minecraft.entity.EntityLivingBase import net.minecraft.item.ItemStack import net.minecraft.tileentity.TileEntity import net.minecraft.world.{IBlockAccess, World} -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.core.Reference import resonantinduction.electrical.laser.BlockRenderingHandler /** @@ -15,7 +15,7 @@ import resonantinduction.electrical.laser.BlockRenderingHandler */ class BlockLaserReceiver extends BlockContainer(Material.rock) { - setBlockName(ElectromagneticCoherence.PREFIX + "laserReceiver") + setBlockName(Reference.prefix + "laserReceiver") setBlockTextureName("stone") /** diff --git a/src/main/scala/resonantinduction/electrical/laser/receiver/RenderLaserReceiver.scala b/src/main/scala/resonantinduction/electrical/laser/receiver/RenderLaserReceiver.scala index afc582635..3b5b22c9c 100644 --- a/src/main/scala/resonantinduction/electrical/laser/receiver/RenderLaserReceiver.scala +++ b/src/main/scala/resonantinduction/electrical/laser/receiver/RenderLaserReceiver.scala @@ -9,7 +9,7 @@ import net.minecraftforge.client.model.AdvancedModelLoader import net.minecraftforge.common.util.ForgeDirection import org.lwjgl.opengl.GL11 import org.lwjgl.opengl.GL11._ -import resonantinduction.electrical.em.ElectromagneticCoherence +import resonantinduction.core.Reference /** * @author Calclavia @@ -17,8 +17,8 @@ import resonantinduction.electrical.em.ElectromagneticCoherence @SideOnly(Side.CLIENT) object RenderLaserReceiver extends TileEntitySpecialRenderer { - val model = AdvancedModelLoader.loadModel(new ResourceLocation(ElectromagneticCoherence.DOMAIN, ElectromagneticCoherence.MODEL_PATH_NAME + "laserReceiver.tcn")) - val texture = new ResourceLocation(ElectromagneticCoherence.DOMAIN, ElectromagneticCoherence.MODEL_PATH_NAME + "laserReceiver.png") + val model = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.domain, Reference.modelPath + "laserReceiver.tcn")) + val texture = new ResourceLocation(Reference.domain, Reference.modelPath + "laserReceiver.png") def renderTileEntityAt(tileEntity: TileEntity, x: Double, y: Double, z: Double, f: Float) { diff --git a/src/main/scala/resonantinduction/electrical/wire/flat/PartFlatSwitchWire.java b/src/main/scala/resonantinduction/electrical/wire/flat/PartFlatSwitchWire.java index 232756db8..f9ab5a37d 100644 --- a/src/main/scala/resonantinduction/electrical/wire/flat/PartFlatSwitchWire.java +++ b/src/main/scala/resonantinduction/electrical/wire/flat/PartFlatSwitchWire.java @@ -5,6 +5,8 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -49,7 +51,7 @@ public class PartFlatSwitchWire extends PartFlatWire TileMultipart tile = tile(); World w = world(); - if (item.getItem().itemID == Block.lever.blockID) + if (item.getItem() == Item.getItemFromBlock(Blocks.lever)) { if (!w.isRemote) { @@ -63,7 +65,7 @@ public class PartFlatSwitchWire extends PartFlatWire if (!player.capabilities.isCreativeMode) { - tile.dropItems(Collections.singletonList(new ItemStack(Block.lever, 1))); + tile.dropItems(Collections.singletonList(new ItemStack(Blocks.lever, 1))); } } } @@ -78,7 +80,7 @@ public class PartFlatSwitchWire extends PartFlatWire @Override public void drop() { - tile().dropItems(Collections.singletonList(new ItemStack(Block.lever, 1))); + tile().dropItems(Collections.singletonList(new ItemStack(Blocks.lever, 1))); super.drop(); } @@ -86,7 +88,7 @@ public class PartFlatSwitchWire extends PartFlatWire public Iterable getDrops() { List drops = (List) super.getDrops(); - drops.add(new ItemStack(Block.lever, 1)); + drops.add(new ItemStack(Blocks.lever, 1)); return drops; }