Refactored ResonantBlock

This commit is contained in:
Calclavia 2015-01-26 18:17:24 +08:00
parent 15bd9807ab
commit a625d28e84
35 changed files with 170 additions and 176 deletions

View file

@ -22,14 +22,14 @@ import org.lwjgl.opengl.GL11
import resonant.core.ResonantEngine
import resonant.lib.network.discriminator.{PacketTile, PacketType}
import resonant.lib.network.handle.IPacketReceiver
import resonant.lib.prefab.tile.spatial.{SpatialBlock, SpatialTile}
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.render.RenderItemOverlayUtility
import resonant.lib.transform.vector.{Vector2, Vector3}
import resonant.lib.utility.inventory.InventoryUtility
import scala.collection.JavaConversions._
class TileImprinter extends SpatialTile(Material.circuits) with ISidedInventory with IPacketReceiver
class TileImprinter extends ResonantTile(Material.circuits) with ISidedInventory with IPacketReceiver
{
var inventory: Array[ItemStack] = new Array[ItemStack](10)
@ -61,6 +61,16 @@ class TileImprinter extends SpatialTile(Material.circuits) with ISidedInventory
nbt.setTag("Items", var2)
}
def getSizeInventory: Int =
{
return this.inventory.length
}
def getStackInSlot(slot: Int): ItemStack =
{
return this.inventory(slot)
}
def read(data: ByteBuf, player: EntityPlayer, `type`: PacketType)
{
try
@ -97,6 +107,18 @@ class TileImprinter extends SpatialTile(Material.circuits) with ISidedInventory
}
/**
* Sets the given item stack to the specified slot in the inventory (can be crafting or armor
* sections).
*/
def setInventorySlotContents(slot: Int, itemStack: ItemStack)
{
if (slot < this.getSizeInventory)
{
inventory(slot) = itemStack
}
}
/**
* Inventory methods.
*/
@ -160,38 +182,11 @@ class TileImprinter extends SpatialTile(Material.circuits) with ISidedInventory
}
}
/**
* Sets the given item stack to the specified slot in the inventory (can be crafting or armor
* sections).
*/
def setInventorySlotContents(slot: Int, itemStack: ItemStack)
{
if (slot < this.getSizeInventory)
{
inventory(slot) = itemStack
}
}
def getSizeInventory: Int =
{
return this.inventory.length
}
def getStackInSlot(slot: Int): ItemStack =
{
return this.inventory(slot)
}
def openInventory
{
this.onInventoryChanged
}
def closeInventory
{
this.onInventoryChanged
}
/**
* Updates all the output slots. Call this to update the Imprinter.
*/
@ -250,6 +245,11 @@ class TileImprinter extends SpatialTile(Material.circuits) with ISidedInventory
}
}
def closeInventory
{
this.onInventoryChanged
}
def getInventoryStackLimit: Int =
{
return 64
@ -291,22 +291,22 @@ class TileImprinter extends SpatialTile(Material.circuits) with ISidedInventory
@SideOnly(Side.CLIENT) override def registerIcons(iconReg: IIconRegister)
{
super.registerIcons(iconReg)
SpatialBlock.icon.put("imprinter_side", iconReg.registerIcon(Reference.prefix + "imprinter_side"))
SpatialBlock.icon.put("imprinter_top", iconReg.registerIcon(Reference.prefix + "imprinter_top"))
SpatialBlock.icon.put("imprinter_bottom", iconReg.registerIcon(Reference.prefix + "imprinter_bottom"))
ResonantBlock.icon.put("imprinter_side", iconReg.registerIcon(Reference.prefix + "imprinter_side"))
ResonantBlock.icon.put("imprinter_top", iconReg.registerIcon(Reference.prefix + "imprinter_top"))
ResonantBlock.icon.put("imprinter_bottom", iconReg.registerIcon(Reference.prefix + "imprinter_bottom"))
}
@SideOnly(Side.CLIENT) override def getIcon(side: Int, meta: Int): IIcon =
{
if (side == 1)
{
return SpatialBlock.icon.get("imprinter_top")
return ResonantBlock.icon.get("imprinter_top")
}
else if (side == 0)
{
return SpatialBlock.icon.get("imprinter_bottom")
return ResonantBlock.icon.get("imprinter_bottom")
}
return SpatialBlock.icon.get("imprinter_side")
return ResonantBlock.icon.get("imprinter_side")
}
override def use(player: EntityPlayer, hitSide: Int, hit: Vector3): Boolean =

View file

@ -10,7 +10,6 @@ import net.minecraft.util.IIcon
import net.minecraft.world.{IBlockAccess, World}
import net.minecraftforge.common.util.ForgeDirection
import resonant.api.tile.IRotatable
import resonant.lib.prefab.tile.spatial.SpatialBlock
import resonant.lib.prefab.tile.traits.TRotatable
import resonant.lib.transform.vector.Vector3
@ -19,7 +18,7 @@ object TileTurntable
var top: IIcon = null
}
class TileTurntable extends SpatialBlock(Material.piston) with TRotatable
class TileTurntable extends ResonantBlock(Material.piston) with TRotatable
{
textureName = "turntable_side"
tickRandomly = true

View file

@ -15,7 +15,7 @@ import resonant.api.recipe.{MachineRecipes, RecipeType}
import resonant.lib.content.prefab.TInventory
import resonant.lib.network.discriminator.PacketType
import resonant.lib.network.handle.{TPacketReceiver, TPacketSender}
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.render.{RenderItemOverlayUtility, RenderUtility}
import resonant.lib.transform.vector.Vector3
import resonant.lib.utility.inventory.InventoryUtility
@ -41,7 +41,7 @@ object TileWorkbench
val model = Array(AdvancedModelLoader.loadModel(new ResourceLocation(Reference.domain, Reference.modelPath + "workbench_0.obj")), AdvancedModelLoader.loadModel(new ResourceLocation(Reference.domain, Reference.modelPath + "workbench_1.obj")))
}
class TileWorkbench extends SpatialTile(Material.wood) with TInventory with TPacketSender with TPacketReceiver
class TileWorkbench extends ResonantTile(Material.wood) with TInventory with TPacketSender with TPacketReceiver
{
//Constructor
setTextureName("material_wood_surface")

View file

@ -24,7 +24,7 @@ import resonant.lib.factory.resources.item.TItemResource
import resonant.lib.network.discriminator.PacketType
import resonant.lib.network.handle.{TPacketReceiver, TPacketSender}
import resonant.lib.prefab.tile.item.ItemBlockSaved
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.render.RenderUtility
import resonant.lib.render.model.ModelCube
import resonant.lib.transform.region.Cuboid
@ -43,7 +43,7 @@ object TileGlassJar
val dustMaterialTexture = new ResourceLocation(Reference.domain, Reference.blockTextureDirectory + "material_sand.png")
}
class TileGlassJar extends SpatialTile(Material.wood) with TPacketReceiver with TPacketSender with ISimpleItemRenderer
class TileGlassJar extends ResonantTile(Material.wood) with TPacketReceiver with TPacketSender with ISimpleItemRenderer
{
var alloy = new Alloy(8)
var mixed = false
@ -112,20 +112,6 @@ class TileGlassJar extends SpatialTile(Material.wood) with TPacketReceiver with
GL11.glPopMatrix()
}
@SideOnly(Side.CLIENT)
override def renderDynamic(pos: Vector3, frame: Float, pass: Int)
{
GL11.glPushMatrix()
GL11.glTranslated(pos.x + 0.5, pos.y + 0.5, pos.z + 0.5)
renderMixture()
GL11.glPopMatrix()
GL11.glPushMatrix()
GL11.glTranslated(pos.x + 0.5, pos.y + 0.8, pos.z + 0.5)
renderJar()
GL11.glPopMatrix()
}
def renderMixture(itemStack: ItemStack = null)
{
val alloy: Alloy =
@ -193,6 +179,20 @@ class TileGlassJar extends SpatialTile(Material.wood) with TPacketReceiver with
RenderUtility.disableBlending()
}
@SideOnly(Side.CLIENT)
override def renderDynamic(pos: Vector3, frame: Float, pass: Int)
{
GL11.glPushMatrix()
GL11.glTranslated(pos.x + 0.5, pos.y + 0.5, pos.z + 0.5)
renderMixture()
GL11.glPopMatrix()
GL11.glPushMatrix()
GL11.glTranslated(pos.x + 0.5, pos.y + 0.8, pos.z + 0.5)
renderJar()
GL11.glPopMatrix()
}
@SideOnly(Side.CLIENT)
override protected def getTextureName: String = textureName

View file

@ -19,7 +19,7 @@ import resonant.lib.content.prefab.TInventory
import resonant.lib.network.discriminator.PacketType
import resonant.lib.network.handle.{TPacketReceiver, TPacketSender}
import resonant.lib.prefab.tile.item.ItemBlockSaved
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.render.{RenderItemOverlayUtility, RenderUtility}
import resonant.lib.transform.region.Cuboid
import resonant.lib.transform.vector.Vector3
@ -31,7 +31,7 @@ object TileSieve
val model = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.domain, Reference.modelPath + "sieve.tcn"))
}
class TileSieve extends SpatialTile(Material.wood) with TInventory with TPacketSender with TPacketReceiver with ISimpleItemRenderer
class TileSieve extends ResonantTile(Material.wood) with TInventory with TPacketSender with TPacketReceiver with ISimpleItemRenderer
{
//Constructor
setTextureName("material_wood_top")

View file

@ -25,7 +25,7 @@ import resonant.lib.grid.energy.electric.NodeElectricComponent
import resonant.lib.grid.thermal.{BoilEvent, ThermalPhysics}
import resonant.lib.network.discriminator.PacketType
import resonant.lib.network.handle.{TPacketReceiver, TPacketSender}
import resonant.lib.prefab.tile.spatial.{SpatialBlock, SpatialTile}
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.transform.vector.Vector3
import resonant.lib.utility.FluidUtility
import resonant.lib.wrapper.ByteBufWrapper._
@ -36,7 +36,7 @@ import resonant.lib.wrapper.CollectionWrapper._
*
* @author Calclavia
*/
class TileFirebox extends SpatialTile(Material.rock) with IFluidHandler with TInventory with TBlockNodeProvider with TIO with TPacketSender with TPacketReceiver
class TileFirebox extends ResonantTile(Material.rock) with IFluidHandler with TInventory with TBlockNodeProvider with TIO with TPacketSender with TPacketReceiver
{
/**
* 1KG of coal ~= 24MJ
@ -161,11 +161,6 @@ class TileFirebox extends SpatialTile(Material.rock) with IFluidHandler with TIn
return this.getBlockMetadata == 1
}
def canBurn(stack: ItemStack): Boolean =
{
return TileEntityFurnace.getItemBurnTime(stack) > 0
}
override def randomDisplayTick(): Unit =
{
if (isBurning)
@ -207,6 +202,11 @@ class TileFirebox extends SpatialTile(Material.rock) with IFluidHandler with TIn
return i == 0 && canBurn(itemStack)
}
def canBurn(stack: ItemStack): Boolean =
{
return TileEntityFurnace.getItemBurnTime(stack) > 0
}
/**
* Override this method
* Be sure to super this method or manually write the id into the packet when sending
@ -276,14 +276,14 @@ class TileFirebox extends SpatialTile(Material.rock) with IFluidHandler with TIn
override def registerIcons(iconReg: IIconRegister)
{
super.registerIcons(iconReg)
SpatialBlock.icon.put("firebox_side_on", iconReg.registerIcon(Reference.prefix + "firebox_side_on"))
SpatialBlock.icon.put("firebox_side_off", iconReg.registerIcon(Reference.prefix + "firebox_side_off"))
SpatialBlock.icon.put("firebox_top_on", iconReg.registerIcon(Reference.prefix + "firebox_top_on"))
SpatialBlock.icon.put("firebox_top_off", iconReg.registerIcon(Reference.prefix + "firebox_top_off"))
SpatialBlock.icon.put("firebox_electric_side_on", iconReg.registerIcon(Reference.prefix + "firebox_electric_side_on"))
SpatialBlock.icon.put("firebox_electric_side_off", iconReg.registerIcon(Reference.prefix + "firebox_electric_side_off"))
SpatialBlock.icon.put("firebox_electric_top_on", iconReg.registerIcon(Reference.prefix + "firebox_electric_top_on"))
SpatialBlock.icon.put("firebox_electric_top_off", iconReg.registerIcon(Reference.prefix + "firebox_electric_top_off"))
ResonantBlock.icon.put("firebox_side_on", iconReg.registerIcon(Reference.prefix + "firebox_side_on"))
ResonantBlock.icon.put("firebox_side_off", iconReg.registerIcon(Reference.prefix + "firebox_side_off"))
ResonantBlock.icon.put("firebox_top_on", iconReg.registerIcon(Reference.prefix + "firebox_top_on"))
ResonantBlock.icon.put("firebox_top_off", iconReg.registerIcon(Reference.prefix + "firebox_top_off"))
ResonantBlock.icon.put("firebox_electric_side_on", iconReg.registerIcon(Reference.prefix + "firebox_electric_side_on"))
ResonantBlock.icon.put("firebox_electric_side_off", iconReg.registerIcon(Reference.prefix + "firebox_electric_side_off"))
ResonantBlock.icon.put("firebox_electric_top_on", iconReg.registerIcon(Reference.prefix + "firebox_electric_top_on"))
ResonantBlock.icon.put("firebox_electric_top_off", iconReg.registerIcon(Reference.prefix + "firebox_electric_top_off"))
}
@SideOnly(Side.CLIENT)
@ -292,9 +292,9 @@ class TileFirebox extends SpatialTile(Material.rock) with IFluidHandler with TIn
val isElectric = meta == 1
if (side <= 1)
return if (isBurning) (if (isElectric) SpatialBlock.icon.get("firebox_electric_top_on") else SpatialBlock.icon.get("firebox_top_on")) else (if (isElectric) SpatialBlock.icon.get("firebox_electric_top_off") else SpatialBlock.icon.get("firebox_top_off"))
return if (isBurning) (if (isElectric) ResonantBlock.icon.get("firebox_electric_top_on") else ResonantBlock.icon.get("firebox_top_on")) else (if (isElectric) ResonantBlock.icon.get("firebox_electric_top_off") else ResonantBlock.icon.get("firebox_top_off"))
return if (isBurning) (if (isElectric) SpatialBlock.icon.get("firebox_electric_side_on") else SpatialBlock.icon.get("firebox_side_on")) else (if (isElectric) SpatialBlock.icon.get("firebox_electric_side_off") else SpatialBlock.icon.get("firebox_side_off"))
return if (isBurning) (if (isElectric) ResonantBlock.icon.get("firebox_electric_side_on") else ResonantBlock.icon.get("firebox_side_on")) else (if (isElectric) ResonantBlock.icon.get("firebox_electric_side_off") else ResonantBlock.icon.get("firebox_side_off"))
}
override def click(player: EntityPlayer)

View file

@ -14,7 +14,7 @@ import net.minecraft.world.IBlockAccess
import resonant.lib.content.prefab.TInventory
import resonant.lib.network.discriminator.PacketType
import resonant.lib.network.handle.{TPacketReceiver, TPacketSender}
import resonant.lib.prefab.tile.spatial.{SpatialBlock, SpatialTile}
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.transform.region.Cuboid
import resonant.lib.transform.vector.{Vector2, Vector3}
import resonant.lib.wrapper.ByteBufWrapper._
@ -30,7 +30,7 @@ object TileHotPlate
final val maxSmeltTime: Int = 200
}
class TileHotPlate extends SpatialTile(Material.iron) with TInventory with TPacketSender with TPacketReceiver
class TileHotPlate extends ResonantTile(Material.iron) with TInventory with TPacketSender with TPacketReceiver
{
/** Amount of smelt time left */
final val smeltTime = Array[Int](0, 0, 0, 0)
@ -87,22 +87,6 @@ class TileHotPlate extends SpatialTile(Material.iron) with TInventory with TPack
def canSmelt(stack: ItemStack): Boolean = stack != null && FurnaceRecipes.smelting.getSmeltingResult(stack) != null
override def getSizeInventory: Int = 4
def canRun: Boolean =
{
val tileEntity = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord)
if (tileEntity.isInstanceOf[TileFirebox])
{
if ((tileEntity.asInstanceOf[TileFirebox]).isBurning)
{
return true
}
}
return false
}
override def randomDisplayTick()
{
val height = 0.2
@ -173,12 +157,14 @@ class TileHotPlate extends SpatialTile(Material.iron) with TInventory with TPack
}
override def getSizeInventory: Int = 4
@SideOnly(Side.CLIENT)
override def registerIcons(iconReg: IIconRegister)
{
super.registerIcons(iconReg)
SpatialBlock.icon.put("electricHotPlate", iconReg.registerIcon(Reference.prefix + "electricHotPlate"))
SpatialBlock.icon.put("hotPlate_on", iconReg.registerIcon(Reference.prefix + "hotPlate_on"))
ResonantBlock.icon.put("electricHotPlate", iconReg.registerIcon(Reference.prefix + "electricHotPlate"))
ResonantBlock.icon.put("hotPlate_on", iconReg.registerIcon(Reference.prefix + "hotPlate_on"))
}
/**
@ -186,13 +172,27 @@ class TileHotPlate extends SpatialTile(Material.iron) with TInventory with TPack
*/
override def getIcon(access: IBlockAccess, side: Int): IIcon =
{
return if (access.getBlockMetadata(xi, yi, zi) == 1) SpatialBlock.icon.get("electricHotPlate") else (if (canRun) SpatialBlock.icon.get("hotPlate_on") else SpatialBlock.icon.get(getTextureName))
return if (access.getBlockMetadata(xi, yi, zi) == 1) ResonantBlock.icon.get("electricHotPlate") else (if (canRun) ResonantBlock.icon.get("hotPlate_on") else ResonantBlock.icon.get(getTextureName))
}
def canRun: Boolean =
{
val tileEntity = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord)
if (tileEntity.isInstanceOf[TileFirebox])
{
if ((tileEntity.asInstanceOf[TileFirebox]).isBurning)
{
return true
}
}
return false
}
@SideOnly(Side.CLIENT)
override def getIcon(side: Int, meta: Int): IIcon =
{
return if (meta == 1) SpatialBlock.icon.get("electricHotPlate") else SpatialBlock.icon.get(getTextureName)
return if (meta == 1) ResonantBlock.icon.get("electricHotPlate") else ResonantBlock.icon.get(getTextureName)
}
override def click(player: EntityPlayer)

View file

@ -9,7 +9,7 @@ import resonant.lib.grid.core.TBlockNodeProvider
import resonant.lib.network.discriminator.PacketType
import resonant.lib.network.handle.{TPacketReceiver, TPacketSender}
import resonant.lib.prefab.fluid.NodeFluid
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.wrapper.ByteBufWrapper._
/**
@ -17,7 +17,7 @@ import resonant.lib.wrapper.ByteBufWrapper._
*
* @author DarkGuardsman, Calclavia
*/
abstract class TileFluidProvider(material: Material) extends SpatialTile(material) with TBlockNodeProvider with IFluidHandler with TPacketReceiver with TPacketSender
abstract class TileFluidProvider(material: Material) extends ResonantTile(material) with TBlockNodeProvider with IFluidHandler with TPacketReceiver with TPacketSender
{
protected var colorID: Int = 0
protected var clientRenderMask = 0x3F

View file

@ -10,7 +10,6 @@ import net.minecraft.creativetab.CreativeTabs
import net.minecraft.item.{Item, ItemStack}
import net.minecraft.util.IIcon
import resonant.lib.prefab.tile.item.ItemBlockMetadata
import resonant.lib.prefab.tile.spatial.SpatialBlock
import resonant.lib.wrapper.CollectionWrapper._
/**
@ -19,7 +18,7 @@ import resonant.lib.wrapper.CollectionWrapper._
* @author Calclavia
*
*/
class BlockDecoration extends SpatialBlock(Material.rock)
class BlockDecoration extends ResonantBlock(Material.rock)
{
var iconNames = Array("material_stone_brick", "material_stone_brick2", "material_stone_chiseled", "material_stone_cobble", "material_stone_cracked", "material_stone", "material_stone_slab", "material_stone_mossy", "material_steel_dark", "material_steel_tint", "material_steel")
var icons = new Array[IIcon](iconNames.length)

View file

@ -3,7 +3,7 @@ package edx.core.resource.content
import edx.core.Reference
import net.minecraft.block.material.Material
import net.minecraft.nbt.NBTTagCompound
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.transform.region.Cuboid
/**
@ -13,7 +13,7 @@ import resonant.lib.transform.region.Cuboid
*
* @author Calclavia
*/
class TileDust extends SpatialTile(Material.sand)
class TileDust extends ResonantTile(Material.sand)
{
var resMaterial = ""
textureName = Reference.prefix + ""

View file

@ -22,7 +22,7 @@ import resonant.lib.grid.energy.EnergyStorage
import resonant.lib.grid.energy.electric.NodeElectricComponent
import resonant.lib.network.discriminator.PacketType
import resonant.lib.network.handle.{TPacketReceiver, TPacketSender}
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.TEnergyProvider
import resonant.lib.render.RenderUtility
import resonant.lib.transform.vector.Vector3
@ -48,7 +48,7 @@ object TileBattery
def getEnergyForTier(tier: Int) = Math.round(Math.pow(500000000, (tier / (maxTier + 0.7f)) + 1) / 500000000) * 500000000
}
class TileBattery extends SpatialTile(Material.iron) with TIO with TBlockNodeProvider with TPacketSender with TPacketReceiver with TEnergyProvider with ISimpleItemRenderer
class TileBattery extends ResonantTile(Material.iron) with TIO with TBlockNodeProvider with TPacketSender with TPacketReceiver with TEnergyProvider with ISimpleItemRenderer
{
private val electricNode = new NodeElectricComponent(this)
var energyRenderLevel = 0

View file

@ -13,7 +13,7 @@ import org.lwjgl.opengl.GL11
import resonant.lib.content.prefab.TIO
import resonant.lib.grid.core.TBlockNodeProvider
import resonant.lib.grid.energy.electric.NodeElectricComponent
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.TRotatable
import resonant.lib.render.RenderUtility
import resonant.lib.transform.vector.Vector3
@ -41,7 +41,7 @@ object TileMotor
val motorConstant = fieldStrength * area * coils
}
class TileMotor extends SpatialTile(Material.iron) with TIO with TBlockNodeProvider with TRotatable
class TileMotor extends ResonantTile(Material.iron) with TIO with TBlockNodeProvider with TRotatable
{
private val electricNode = new NodeElectricComponent(this)
private val mechNode = new NodeMechanical(this)

View file

@ -9,13 +9,13 @@ import net.minecraftforge.common.util.ForgeDirection
import resonant.lib.content.prefab.TIO
import resonant.lib.grid.core.TBlockNodeProvider
import resonant.lib.grid.energy.electric.NodeElectricComponent
import resonant.lib.prefab.tile.spatial.{SpatialBlock, SpatialTile}
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.render.block.RenderConnectedTexture
import resonant.lib.transform.region.Cuboid
import scala.collection.convert.wrapAll._
class TileSolarPanel extends SpatialTile(Material.iron) with TBlockNodeProvider with TIO with RenderConnectedTexture
class TileSolarPanel extends ResonantTile(Material.iron) with TBlockNodeProvider with TIO with RenderConnectedTexture
{
private val electricNode = new NodeElectricComponent(this)
@ -36,8 +36,8 @@ class TileSolarPanel extends SpatialTile(Material.iron) with TBlockNodeProvider
@SideOnly(Side.CLIENT)
override def registerIcons(iconReg: IIconRegister)
{
SpatialBlock.icon.put("solarPanel_side", iconReg.registerIcon(Reference.prefix + "solarPanel_side"))
SpatialBlock.icon.put("solarPanel_bottom", iconReg.registerIcon(Reference.prefix + "solarPanel_bottom"))
ResonantBlock.icon.put("solarPanel_side", iconReg.registerIcon(Reference.prefix + "solarPanel_side"))
ResonantBlock.icon.put("solarPanel_bottom", iconReg.registerIcon(Reference.prefix + "solarPanel_bottom"))
super.registerIcons(iconReg)
}
@ -45,11 +45,11 @@ class TileSolarPanel extends SpatialTile(Material.iron) with TBlockNodeProvider
override def getIcon(side: Int, meta: Int): IIcon =
{
if (side == 0)
return SpatialBlock.icon.get("solarPanel_bottom")
return ResonantBlock.icon.get("solarPanel_bottom")
else if (side == 1)
return getIcon
return SpatialBlock.icon.get("solarPanel_side")
return ResonantBlock.icon.get("solarPanel_side")
}
override def update()

View file

@ -10,11 +10,11 @@ import net.minecraftforge.common.util.ForgeDirection
import resonant.lib.content.prefab.TIO
import resonant.lib.grid.core.TBlockNodeProvider
import resonant.lib.grid.energy.electric.NodeElectricComponent
import resonant.lib.prefab.tile.spatial.{SpatialBlock, SpatialTile}
import resonant.lib.prefab.tile.spatial.ResonantTile
import scala.collection.convert.wrapAll._
class TileThermopile extends SpatialTile(Material.rock) with TBlockNodeProvider with TIO
class TileThermopile extends ResonantTile(Material.rock) with TBlockNodeProvider with TIO
{
/**
* The amount of ticks the thermopile will use the temperature differences before turning all
@ -106,7 +106,7 @@ class TileThermopile extends SpatialTile(Material.rock) with TBlockNodeProvider
@SideOnly(Side.CLIENT)
override def registerIcons(iconReg: IIconRegister)
{
SpatialBlock.icon.put("thermopile_top", iconReg.registerIcon(Reference.prefix + "thermopile_top"))
ResonantBlock.icon.put("thermopile_top", iconReg.registerIcon(Reference.prefix + "thermopile_top"))
super.registerIcons(iconReg)
}
@ -115,7 +115,7 @@ class TileThermopile extends SpatialTile(Material.rock) with TBlockNodeProvider
{
if (side == 1)
{
return SpatialBlock.icon.get("thermopile_top")
return ResonantBlock.icon.get("thermopile_top")
}
return super.getIcon(side, meta)

View file

@ -24,7 +24,7 @@ import resonant.lib.grid.energy.electric.NodeElectricComponent
import resonant.lib.network.discriminator.{PacketTile, PacketType}
import resonant.lib.network.handle.{TPacketReceiver, TPacketSender}
import resonant.lib.prefab.tile.multiblock.reference.{IMultiBlockStructure, MultiBlockHandler}
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.TEnergyProvider
import resonant.lib.render.EnumColor
import resonant.lib.transform.vector.{Vector3, VectorWorld}
@ -45,7 +45,7 @@ object TileTesla
final val DEFAULT_COLOR: Int = 12
}
class TileTesla extends SpatialTile(Material.iron) with TBlockNodeProvider with IMultiBlockStructure[TileTesla] with ITesla with TPacketReceiver with TPacketSender with TEnergyProvider with TIO
class TileTesla extends ResonantTile(Material.iron) with TBlockNodeProvider with IMultiBlockStructure[TileTesla] with ITesla with TPacketReceiver with TPacketSender with TEnergyProvider with TIO
{
final val TRANSFER_CAP: Double = 10000D
/** Prevents transfer loops */

View file

@ -21,7 +21,6 @@ import net.minecraftforge.common.util.ForgeDirection
import resonant.core.ResonantEngine
import resonant.lib.network.discriminator.{PacketTile, PacketType}
import resonant.lib.network.handle.IPacketIDReceiver
import resonant.lib.prefab.tile.spatial.SpatialBlock
class TileDetector extends TileFilterable with IPacketIDReceiver
{
@ -121,19 +120,19 @@ class TileDetector extends TileFilterable with IPacketIDReceiver
@SideOnly(Side.CLIENT) override def registerIcons(iconReg: IIconRegister)
{
SpatialBlock.icon.put("detector_front_green", iconReg.registerIcon(Reference.prefix + "detector_front_green"))
SpatialBlock.icon.put("detector_front_red", iconReg.registerIcon(Reference.prefix + "detector_front_red"))
SpatialBlock.icon.put("detector_side_green", iconReg.registerIcon(Reference.prefix + "detector_side_green"))
SpatialBlock.icon.put("detector_side_red", iconReg.registerIcon(Reference.prefix + "detector_side_red"))
ResonantBlock.icon.put("detector_front_green", iconReg.registerIcon(Reference.prefix + "detector_front_green"))
ResonantBlock.icon.put("detector_front_red", iconReg.registerIcon(Reference.prefix + "detector_front_red"))
ResonantBlock.icon.put("detector_side_green", iconReg.registerIcon(Reference.prefix + "detector_side_green"))
ResonantBlock.icon.put("detector_side_red", iconReg.registerIcon(Reference.prefix + "detector_side_red"))
}
@SideOnly(Side.CLIENT) override def getIcon(side: Int, metadata: Int): IIcon =
{
if (side == ForgeDirection.SOUTH.ordinal)
{
return SpatialBlock.icon.get("detector_front_green")
return ResonantBlock.icon.get("detector_front_green")
}
return SpatialBlock.icon.get("detector_side_green")
return ResonantBlock.icon.get("detector_side_green")
}
@SideOnly(Side.CLIENT) override def getIcon(iBlockAccess: IBlockAccess, side: Int): IIcon =
@ -146,7 +145,7 @@ class TileDetector extends TileFilterable with IPacketIDReceiver
isFront = side == (tileEntity.asInstanceOf[TileDetector]).getDirection.ordinal
isInverted = (tileEntity.asInstanceOf[TileDetector]).isInverted
}
return if (isInverted) (if (isFront) SpatialBlock.icon.get("detector_front_red") else SpatialBlock.icon.get("detector_side_red")) else (if (isFront) SpatialBlock.icon.get("detector_front_green") else SpatialBlock.icon.get("detector_side_green"))
return if (isInverted) (if (isFront) ResonantBlock.icon.get("detector_front_red") else ResonantBlock.icon.get("detector_side_red")) else (if (isFront) ResonantBlock.icon.get("detector_front_green") else ResonantBlock.icon.get("detector_side_green"))
}
override def getStrongRedstonePower(access: IBlockAccess, side: Int): Int =

View file

@ -17,7 +17,7 @@ import net.minecraft.world.IBlockAccess
import net.minecraftforge.common.util.ForgeDirection
import resonant.lib.network.discriminator.{PacketTile, PacketType}
import resonant.lib.network.handle.IPacketReceiver
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.TRotatable
import resonant.lib.transform.vector.{Vector3, VectorWorld}
import resonant.lib.utility.inventory.InternalInventoryHandler
@ -32,7 +32,7 @@ object TileBreaker
@SideOnly(Side.CLIENT) private var iconBack: IIcon = null
}
class TileBreaker extends SpatialTile(Material.iron) with TRotatable with IPacketReceiver
class TileBreaker extends ResonantTile(Material.iron) with TRotatable with IPacketReceiver
{
private var _doWork: Boolean = false
private var invHandler: InternalInventoryHandler = null

View file

@ -16,7 +16,7 @@ import org.lwjgl.opengl.GL11
import resonant.lib.content.prefab.TInventory
import resonant.lib.network.discriminator.PacketTile
import resonant.lib.network.handle.TPacketSender
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.TRotatable
import resonant.lib.render.RenderItemOverlayUtility
import resonant.lib.transform.vector.Vector3
@ -33,7 +33,7 @@ object TilePlacer
@SideOnly(Side.CLIENT) private var iconBack: IIcon = null
}
class TilePlacer extends SpatialTile(Material.rock) with TInventory with TRotatable with TPacketSender
class TilePlacer extends ResonantTile(Material.rock) with TInventory with TRotatable with TPacketSender
{
private var _doWork: Boolean = false
private var autoPullItems: Boolean = false
@ -53,11 +53,6 @@ class TilePlacer extends SpatialTile(Material.rock) with TInventory with TRotata
work
}
override def onNeighborChanged(block: Block)
{
work
}
def work
{
if (isIndirectlyPowered)
@ -67,6 +62,11 @@ class TilePlacer extends SpatialTile(Material.rock) with TInventory with TRotata
}
}
override def onNeighborChanged(block: Block)
{
work
}
override def start
{
super.start

View file

@ -8,7 +8,7 @@ import net.minecraftforge.common.util.ForgeDirection
import resonant.lib.grid.core.TBlockNodeProvider
import resonant.lib.network.discriminator.PacketType
import resonant.lib.network.handle.{TPacketReceiver, TPacketSender}
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.TRotatable
import resonant.lib.transform.vector.Vector3
import resonant.lib.wrapper.ByteBufWrapper._
@ -18,7 +18,7 @@ import scala.collection.convert.wrapAll._
/** Prefab for resonantinduction.mechanical tiles
*
* @author Calclavia */
abstract class TileMechanical(material: Material) extends SpatialTile(material: Material) with TRotatable with TBlockNodeProvider with TPacketSender with TPacketReceiver
abstract class TileMechanical(material: Material) extends ResonantTile(material: Material) with TRotatable with TBlockNodeProvider with TPacketSender with TPacketReceiver
{
/** Node that handles most mechanical actions */
private var _mechanicalNode: NodeMechanical = null
@ -53,8 +53,6 @@ abstract class TileMechanical(material: Material) extends SpatialTile(material:
}
}
def mechanicalNode = _mechanicalNode
override def read(buf: ByteBuf, id: Int, packetType: PacketType)
{
super.read(buf, id, packetType)
@ -66,6 +64,8 @@ abstract class TileMechanical(material: Material) extends SpatialTile(material:
}
}
def mechanicalNode = _mechanicalNode
def mechanicalNode_=(newNode: NodeMechanical)
{
_mechanicalNode = newNode

View file

@ -13,7 +13,6 @@ import net.minecraftforge.common.util.ForgeDirection
import org.lwjgl.opengl.GL11._
import resonant.api.tile.IElectromagnet
import resonant.lib.prefab.tile.item.ItemBlockMetadata
import resonant.lib.prefab.tile.spatial.SpatialBlock
import resonant.lib.render.{RenderBlockUtility, RenderUtility}
import resonant.lib.transform.vector.Vector3
import resonant.lib.world.WorldUtility
@ -22,7 +21,7 @@ import resonant.lib.wrapper.CollectionWrapper._
/**
* Electromagnet block
*/
class TileElectromagnet extends SpatialBlock(Material.iron) with IElectromagnet
class TileElectromagnet extends ResonantBlock(Material.iron) with IElectromagnet
{
private val edgeTexture: String = "stone"
private var iconTop: IIcon = null

View file

@ -5,13 +5,12 @@ import net.minecraft.block.material.Material
import net.minecraft.entity.player.EntityPlayer
import net.minecraft.world.World
import net.minecraftforge.common.util.ForgeDirection
import resonant.lib.prefab.tile.spatial.SpatialBlock
import resonant.lib.transform.vector.Vector3
/**
* Siren block
*/
class TileSiren extends SpatialBlock(Material.wood)
class TileSiren extends ResonantBlock(Material.wood)
{
override def update

View file

@ -15,7 +15,7 @@ import org.lwjgl.opengl.GL11
import org.lwjgl.opengl.GL11._
import resonant.lib.grid.core.TBlockNodeProvider
import resonant.lib.grid.energy.electric.NodeElectricComponent
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.TRotatable
import resonant.lib.render.RenderUtility
import resonant.lib.transform.vector.Vector3
@ -38,7 +38,7 @@ object TileLaserEmitter
val texture = new ResourceLocation(Reference.domain, Reference.modelPath + "laserEmitter.png")
}
class TileLaserEmitter extends SpatialTile(Material.iron) with ILaserHandler with TBlockNodeProvider with TRotatable
class TileLaserEmitter extends ResonantTile(Material.iron) with ILaserHandler with TBlockNodeProvider with TRotatable
{
val electricNode = new NodeElectricComponent(this)

View file

@ -13,7 +13,7 @@ import net.minecraftforge.common.util.ForgeDirection
import org.lwjgl.opengl.GL11._
import resonant.lib.grid.core.TBlockNodeProvider
import resonant.lib.grid.energy.electric.NodeElectricComponent
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.TRotatable
import resonant.lib.render.RenderUtility
import resonant.lib.transform.vector.Vector3
@ -30,7 +30,7 @@ object TileLaserReceiver
@SideOnly(Side.CLIENT) val texture = new ResourceLocation(Reference.domain, Reference.modelPath + "laserReceiver.png")
}
class TileLaserReceiver extends SpatialTile(Material.rock) with ILaserHandler with TBlockNodeProvider with TRotatable
class TileLaserReceiver extends ResonantTile(Material.rock) with ILaserHandler with TBlockNodeProvider with TRotatable
{
val electricNode = new NodeElectricComponent(this)

View file

@ -5,13 +5,13 @@ import net.minecraft.entity.EntityLivingBase
import net.minecraft.entity.player.EntityPlayer
import net.minecraft.item.ItemStack
import net.minecraftforge.common.util.ForgeDirection
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.transform.vector.Vector3
/**
* @author Calclavia
*/
abstract class TileFocus(material: Material) extends SpatialTile(material) with IFocus
abstract class TileFocus(material: Material) extends ResonantTile(material) with IFocus
{
override def onPlaced(entityLiving: EntityLivingBase, itemStack: ItemStack)
{

View file

@ -9,7 +9,7 @@ import net.minecraft.util.IIcon
import net.minecraftforge.common.util.ForgeDirection
import net.minecraftforge.fluids._
import resonant.api.tile.IBoilHandler
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
/**
* Funnel for gas.
@ -19,7 +19,7 @@ object TileFunnel
private var iconTop: IIcon = null
}
class TileFunnel extends SpatialTile(Material.iron) with IBoilHandler
class TileFunnel extends ResonantTile(Material.iron) with IBoilHandler
{
private final val tank: FluidTank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 16)

View file

@ -17,14 +17,14 @@ import resonant.lib.content.prefab.TInventory
import resonant.lib.grid.energy.EnergyStorage
import resonant.lib.network.discriminator.{PacketTile, PacketType}
import resonant.lib.network.handle.{TPacketIDReceiver, TPacketSender}
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.TEnergyProvider
import resonant.lib.transform.vector.Vector3
import resonant.lib.utility.BlockUtility
import scala.collection.JavaConversions._
class TileAccelerator extends SpatialTile(Material.iron) with TInventory with IElectromagnet with IRotatable with TPacketIDReceiver with TPacketSender with TEnergyProvider
class TileAccelerator extends ResonantTile(Material.iron) with TInventory with IElectromagnet with IRotatable with TPacketIDReceiver with TPacketSender with TEnergyProvider
{
final val DESC_PACKET_ID = 2
/**

View file

@ -17,7 +17,7 @@ import resonant.lib.grid.energy.EnergyStorage
import resonant.lib.grid.energy.electric.NodeElectricComponent
import resonant.lib.network.discriminator.{PacketTile, PacketType}
import resonant.lib.network.handle.IPacketReceiver
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.{TEnergyProvider, TRotatable}
import resonant.lib.transform.vector.Vector3
@ -29,7 +29,7 @@ object TileNuclearBoiler
final val power: Long = 50000
}
class TileNuclearBoiler extends SpatialTile(Material.iron) with TInventory with TBlockNodeProvider with IPacketReceiver with IFluidHandler with TRotatable with TEnergyProvider with TIO
class TileNuclearBoiler extends ResonantTile(Material.iron) with TInventory with TBlockNodeProvider with IPacketReceiver with IFluidHandler with TRotatable with TEnergyProvider with TIO
{
final val totalTime: Int = 20 * 15
final val waterTank: FluidTank = new FluidTank(QuantumContent.fluidStackWater.copy, FluidContainerRegistry.BUCKET_VOLUME * 5)

View file

@ -18,7 +18,7 @@ import resonant.lib.grid.energy.electric.NodeElectricComponent
import resonant.lib.mod.compat.energy.Compatibility
import resonant.lib.network.discriminator.{PacketTile, PacketType}
import resonant.lib.network.handle.IPacketReceiver
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.{TEnergyProvider, TRotatable}
import resonant.lib.transform.vector.Vector3
@ -31,7 +31,7 @@ object TileCentrifuge
final val DIAN: Long = 500000
}
class TileCentrifuge extends SpatialTile(Material.iron) with TInventory with TBlockNodeProvider with IPacketReceiver with IFluidHandler with IInventory with TEnergyProvider with TRotatable with TIO
class TileCentrifuge extends ResonantTile(Material.iron) with TInventory with TBlockNodeProvider with IPacketReceiver with IFluidHandler with IInventory with TEnergyProvider with TRotatable with TIO
{
val gasTank: FluidTank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 5)
private val electricNode = new NodeElectricComponent(this)

View file

@ -6,14 +6,14 @@ import net.minecraftforge.fluids.{FluidContainerRegistry, FluidStack, FluidTank}
import resonant.api.recipe.{MachineRecipes, RecipeResource}
import resonant.lib.content.prefab.TInventory
import resonant.lib.grid.core.TBlockNodeProvider
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
/**
* General class for all machines that do traditional recipe processing
*
* @author Calclavia
*/
abstract class TileProcess(material: Material) extends SpatialTile(material) with TInventory with TBlockNodeProvider
abstract class TileProcess(material: Material) extends ResonantTile(material) with TInventory with TBlockNodeProvider
{
protected var inputSlot: Int = 0
protected var outputSlot: Int = 0

View file

@ -2,7 +2,7 @@ package edx.quantum.machine.fulmination
import net.minecraft.block.material.Material
import resonant.lib.grid.energy.EnergyStorage
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.TEnergyProvider
/**
@ -13,7 +13,7 @@ object TileFulmination
private final val maxEnergy: Long = 10000000000000L
}
class TileFulmination extends SpatialTile(Material.iron) with TEnergyProvider
class TileFulmination extends ResonantTile(Material.iron) with TEnergyProvider
{
//TODO: Dummy
energy = new EnergyStorage

View file

@ -14,7 +14,7 @@ import net.minecraftforge.common.util.ForgeDirection
import resonant.api.event.PlasmaEvent
import resonant.lib.grid.thermal.GridThermal
import resonant.lib.mod.config.Config
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.transform.vector.Vector3
object TilePlasma
@ -22,7 +22,7 @@ object TilePlasma
@Config var plasmaMaxTemperature: Int = 1000000
}
class TilePlasma extends SpatialTile(Material.lava)
class TilePlasma extends ResonantTile(Material.lava)
{
private var temperature: Double = TilePlasma.plasmaMaxTemperature

View file

@ -18,7 +18,7 @@ import resonant.lib.grid.energy.electric.NodeElectricComponent
import resonant.lib.mod.config.Config
import resonant.lib.network.discriminator.{PacketTile, PacketType}
import resonant.lib.network.handle.IPacketReceiver
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.TEnergyProvider
import resonant.lib.transform.vector.Vector3
import resonant.lib.utility.science.UnitDisplay
@ -30,7 +30,7 @@ object TilePlasmaHeater
@Config var plasmaHeatAmount: Int = 100
}
class TilePlasmaHeater extends SpatialTile(Material.iron) with TBlockNodeProvider with IPacketReceiver with IFluidHandler with TEnergyProvider
class TilePlasmaHeater extends ResonantTile(Material.iron) with TBlockNodeProvider 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)

View file

@ -15,7 +15,7 @@ import resonant.lib.grid.energy.EnergyStorage
import resonant.lib.grid.energy.electric.NodeElectricComponent
import resonant.lib.network.discriminator.{PacketTile, PacketType}
import resonant.lib.network.handle.IPacketReceiver
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.prefab.tile.traits.TEnergyProvider
import resonant.lib.transform.vector.Vector3
@ -24,7 +24,7 @@ import resonant.lib.transform.vector.Vector3
*
* @author Calclavia, Darkguardsman
*/
class TileQuantumAssembler extends SpatialTile(Material.iron) with TInventory with TBlockNodeProvider with IPacketReceiver with TEnergyProvider
class TileQuantumAssembler extends ResonantTile(Material.iron) with TInventory with TBlockNodeProvider with IPacketReceiver with TEnergyProvider
{
private val electricNode = new NodeElectricComponent(this)

View file

@ -17,7 +17,7 @@ import net.minecraft.util.IIcon
import net.minecraft.world.IBlockAccess
import resonant.lib.grid.thermal.GridThermal
import resonant.lib.prefab.tile.item.ItemBlockSaved
import resonant.lib.prefab.tile.spatial.SpatialTile
import resonant.lib.prefab.tile.spatial.ResonantTile
import resonant.lib.transform.vector.{Vector3, VectorWorld}
import resonant.lib.utility.inventory.InventoryUtility
@ -32,7 +32,7 @@ object TileThermometer
@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")
@deprecated
class TileThermometer extends SpatialTile(Material.piston) with SimpleComponent
class TileThermometer extends ResonantTile(Material.piston) with SimpleComponent
{
var detectedTemperature: Float = 295
var previousDetectedTemperature: Float = 295
@ -81,6 +81,11 @@ class TileThermometer extends SpatialTile(Material.piston) with SimpleComponent
markUpdate
}
def getThreshold: Int =
{
return threshold
}
override def configure(player: EntityPlayer, side: Int, hit: Vector3): Boolean =
{
if (player.isSneaking)
@ -141,11 +146,6 @@ class TileThermometer extends SpatialTile(Material.piston) with SimpleComponent
return detectedTemperature >= getThreshold
}
def getThreshold: Int =
{
return threshold
}
def setTrack(track: Vector3)
{
trackCoordinate = track

View file

@ -1,13 +1,12 @@
package edx.quantum.reactor
import net.minecraft.block.material.Material
import resonant.lib.prefab.tile.spatial.SpatialBlock
import resonant.lib.transform.region.Cuboid
/**
* Control rod block
*/
class TileControlRod extends SpatialBlock(Material.iron)
class TileControlRod extends ResonantBlock(Material.iron)
{
bounds = new Cuboid(0.3f, 0f, 0.3f, 0.7f, 1f, 0.7f)
isOpaqueCube = false