Removed @Synced
This commit is contained in:
parent
d31d618e2d
commit
e95550621a
|
@ -18,7 +18,6 @@ import net.minecraft.init.{Blocks, Items}
|
|||
import net.minecraft.item.{Item, ItemStack}
|
||||
import resonant.api.tile.node.NodeRegistry
|
||||
import resonant.lib.mod.content.ContentHolder
|
||||
import resonant.lib.network.discriminator.PacketAnnotationManager
|
||||
import resonant.lib.utility.recipe.UniversalRecipe
|
||||
import resonant.lib.world.schematic.{SchematicPlate, SchematicRegistry}
|
||||
|
||||
|
@ -58,9 +57,6 @@ object MechanicalContent extends ContentHolder
|
|||
|
||||
NodeRegistry.register(classOf[TNodeMechanical], classOf[NodeMechanical])
|
||||
|
||||
PacketAnnotationManager.INSTANCE.register(classOf[TileWindTurbine])
|
||||
PacketAnnotationManager.INSTANCE.register(classOf[TileWaterTurbine])
|
||||
|
||||
ResonantPartFactory.register(classOf[PartGear])
|
||||
ResonantPartFactory.register(classOf[PartGearShaft])
|
||||
ResonantPartFactory.register(classOf[PartPipe])
|
||||
|
|
|
@ -38,7 +38,6 @@ import resonant.api.tile.IElectromagnet
|
|||
import resonant.lib.factory.resources.block.OreGenerator
|
||||
import resonant.lib.grid.thermal.EventThermal
|
||||
import resonant.lib.mod.content.{ContentHolder, ExplicitContentName}
|
||||
import resonant.lib.network.discriminator.PacketAnnotationManager
|
||||
import resonant.lib.transform.vector.VectorWorld
|
||||
import resonant.lib.utility.recipe.UniversalRecipe
|
||||
import resonant.lib.world.schematic.SchematicRegistry
|
||||
|
@ -125,12 +124,6 @@ object QuantumContent extends ContentHolder
|
|||
|
||||
super.preInit()
|
||||
|
||||
//Annotation Packet Users
|
||||
PacketAnnotationManager.INSTANCE.register(classOf[TileReactorCell])
|
||||
PacketAnnotationManager.INSTANCE.register(classOf[TileChemicalExtractor])
|
||||
PacketAnnotationManager.INSTANCE.register(classOf[TileNuclearBoiler])
|
||||
PacketAnnotationManager.INSTANCE.register(classOf[TileAccelerator])
|
||||
|
||||
//Buckets
|
||||
itemBucketToxic = manager.newItem("bucketToxicWaste", new ItemBucket(QuantumContent.blockPlasma)).setCreativeTab(EDXCreativeTab).setContainerItem(Items.bucket).setTextureName(Reference.prefix + "bucketToxicWaste")
|
||||
|
||||
|
@ -193,63 +186,6 @@ object QuantumContent extends ContentHolder
|
|||
|
||||
def FLUID_PLASMA: Fluid = new Fluid("plasma").setGaseous(true)
|
||||
|
||||
def FLUID_URANIUM_HEXAFLOURIDE: Fluid =
|
||||
{
|
||||
var fluid: Fluid = FluidRegistry.getFluid("uraniumhexafluoride");
|
||||
if (fluid == null)
|
||||
{
|
||||
fluid = new Fluid("uraniumhexafluoride").setGaseous(true)
|
||||
FluidRegistry.registerFluid(fluid)
|
||||
}
|
||||
return fluid
|
||||
}
|
||||
|
||||
def FLUID_STEAM: Fluid =
|
||||
{
|
||||
var fluid: Fluid = FluidRegistry.getFluid("steam");
|
||||
if (fluid == null)
|
||||
{
|
||||
fluid = new Fluid("steam").setGaseous(true)
|
||||
FluidRegistry.registerFluid(fluid)
|
||||
}
|
||||
return fluid
|
||||
}
|
||||
|
||||
def FLUID_DEUTERIUM: Fluid =
|
||||
{
|
||||
var fluid: Fluid = FluidRegistry.getFluid("deuterium");
|
||||
if (fluid == null)
|
||||
{
|
||||
fluid = new Fluid("deuterium").setGaseous(true)
|
||||
FluidRegistry.registerFluid(fluid)
|
||||
}
|
||||
return fluid
|
||||
}
|
||||
|
||||
/** Gets the Fluid instance of Tritium */
|
||||
def getFluidTritium: Fluid =
|
||||
{
|
||||
var fluid: Fluid = FluidRegistry.getFluid("tritium");
|
||||
if (fluid == null)
|
||||
{
|
||||
fluid = new Fluid("tritium").setGaseous(true)
|
||||
FluidRegistry.registerFluid(fluid)
|
||||
}
|
||||
return fluid
|
||||
}
|
||||
|
||||
/** Gets the Fluid instance of Toxic Waste */
|
||||
def getFluidToxicWaste: Fluid =
|
||||
{
|
||||
var fluid: Fluid = FluidRegistry.getFluid("toxicwaste");
|
||||
if (fluid == null)
|
||||
{
|
||||
fluid = new Fluid("toxicwaste").setGaseous(true)
|
||||
FluidRegistry.registerFluid(fluid)
|
||||
}
|
||||
return fluid
|
||||
}
|
||||
|
||||
override def postInit()
|
||||
{
|
||||
super.postInit()
|
||||
|
@ -392,11 +328,6 @@ object QuantumContent extends ContentHolder
|
|||
return isItemStackOreDictionaryCompatible(itemStack, "dropUranium", "oreUranium")
|
||||
}
|
||||
|
||||
def isItemStackDeuteriumCell(itemStack: ItemStack): Boolean =
|
||||
{
|
||||
return isItemStackOreDictionaryCompatible(itemStack, "molecule_1d", "molecule_1h2", "cellDeuterium")
|
||||
}
|
||||
|
||||
/** Compare to Ore Dict
|
||||
*
|
||||
* @param itemStack
|
||||
|
@ -418,6 +349,11 @@ object QuantumContent extends ContentHolder
|
|||
return false
|
||||
}
|
||||
|
||||
def isItemStackDeuteriumCell(itemStack: ItemStack): Boolean =
|
||||
{
|
||||
return isItemStackOreDictionaryCompatible(itemStack, "molecule_1d", "molecule_1h2", "cellDeuterium")
|
||||
}
|
||||
|
||||
def isItemStackTritiumCell(itemStack: ItemStack): Boolean =
|
||||
{
|
||||
return isItemStackOreDictionaryCompatible(itemStack, "molecule_h3", "cellTritium")
|
||||
|
@ -436,12 +372,69 @@ object QuantumContent extends ContentHolder
|
|||
|
||||
def FLUIDSTACK_URANIUM_HEXAFLOURIDE: FluidStack = new FluidStack(QuantumContent.FLUID_URANIUM_HEXAFLOURIDE, 0)
|
||||
|
||||
def FLUID_URANIUM_HEXAFLOURIDE: Fluid =
|
||||
{
|
||||
var fluid: Fluid = FluidRegistry.getFluid("uraniumhexafluoride");
|
||||
if (fluid == null)
|
||||
{
|
||||
fluid = new Fluid("uraniumhexafluoride").setGaseous(true)
|
||||
FluidRegistry.registerFluid(fluid)
|
||||
}
|
||||
return fluid
|
||||
}
|
||||
|
||||
def FLUIDSTACK_STEAM: FluidStack = new FluidStack(FLUID_STEAM, 0)
|
||||
|
||||
def FLUID_STEAM: Fluid =
|
||||
{
|
||||
var fluid: Fluid = FluidRegistry.getFluid("steam");
|
||||
if (fluid == null)
|
||||
{
|
||||
fluid = new Fluid("steam").setGaseous(true)
|
||||
FluidRegistry.registerFluid(fluid)
|
||||
}
|
||||
return fluid
|
||||
}
|
||||
|
||||
def FLUIDSTACK_DEUTERIUM: FluidStack = new FluidStack(FLUID_DEUTERIUM, 0)
|
||||
|
||||
def FLUID_DEUTERIUM: Fluid =
|
||||
{
|
||||
var fluid: Fluid = FluidRegistry.getFluid("deuterium");
|
||||
if (fluid == null)
|
||||
{
|
||||
fluid = new Fluid("deuterium").setGaseous(true)
|
||||
FluidRegistry.registerFluid(fluid)
|
||||
}
|
||||
return fluid
|
||||
}
|
||||
|
||||
def getFluidStackTritium: FluidStack = new FluidStack(getFluidTritium, 0)
|
||||
|
||||
/** Gets the Fluid instance of Tritium */
|
||||
def getFluidTritium: Fluid =
|
||||
{
|
||||
var fluid: Fluid = FluidRegistry.getFluid("tritium");
|
||||
if (fluid == null)
|
||||
{
|
||||
fluid = new Fluid("tritium").setGaseous(true)
|
||||
FluidRegistry.registerFluid(fluid)
|
||||
}
|
||||
return fluid
|
||||
}
|
||||
|
||||
/** Gets a FluidStack of Toxic Waste */
|
||||
def getStackToxicWaste: FluidStack = new FluidStack(getFluidToxicWaste, 0)
|
||||
|
||||
/** Gets the Fluid instance of Toxic Waste */
|
||||
def getFluidToxicWaste: Fluid =
|
||||
{
|
||||
var fluid: Fluid = FluidRegistry.getFluid("toxicwaste");
|
||||
if (fluid == null)
|
||||
{
|
||||
fluid = new Fluid("toxicwaste").setGaseous(true)
|
||||
FluidRegistry.registerFluid(fluid)
|
||||
}
|
||||
return fluid
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,15 +6,11 @@ import net.minecraft.block.material.Material
|
|||
import net.minecraft.entity.player.EntityPlayer
|
||||
import net.minecraft.item.ItemStack
|
||||
import net.minecraft.nbt.NBTTagCompound
|
||||
import net.minecraft.network.Packet
|
||||
import net.minecraftforge.common.util.ForgeDirection
|
||||
import net.minecraftforge.fluids._
|
||||
import resonant.engine.ResonantEngine
|
||||
import resonant.lib.content.prefab.TIO
|
||||
import resonant.lib.grid.energy.EnergyStorage
|
||||
import resonant.lib.mod.compat.energy.Compatibility
|
||||
import resonant.lib.network.Synced
|
||||
import resonant.lib.network.discriminator.PacketAnnotation
|
||||
import resonant.lib.prefab.tile.traits.{TEnergyProvider, TRotatable}
|
||||
import resonant.lib.transform.vector.Vector3
|
||||
|
||||
|
@ -42,9 +38,9 @@ class TileChemicalExtractor extends TileProcess(Material.iron) with IFluidHandle
|
|||
tankOutputFillSlot = 5
|
||||
tankOutputDrainSlot = 6
|
||||
|
||||
@Synced final val inputTank: FluidTank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 10)
|
||||
@Synced final val outputTank: FluidTank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 10)
|
||||
@Synced var time: Int = 0
|
||||
final val inputTank: FluidTank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 10)
|
||||
final val outputTank: FluidTank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME * 10)
|
||||
var time: Int = 0
|
||||
var rotation: Float = 0
|
||||
|
||||
override def getSizeInventory: Int = 7
|
||||
|
@ -99,11 +95,6 @@ class TileChemicalExtractor extends TileProcess(Material.iron) with IFluidHandle
|
|||
}
|
||||
}
|
||||
|
||||
override def getDescriptionPacket: Packet =
|
||||
{
|
||||
return ResonantEngine.packetHandler.toMCPacket(new PacketAnnotation(this))
|
||||
}
|
||||
|
||||
override def use(player: EntityPlayer, side: Int, hit: Vector3): Boolean =
|
||||
{
|
||||
openGui(player, QuantumContent)
|
||||
|
|
|
@ -17,7 +17,7 @@ import resonant.lib.render.RenderUtility
|
|||
for (side <- 2 to 6)
|
||||
{
|
||||
RenderUtility.renderText((if (tile.isOverThreshold) "\u00a74" else "") + Math.round(tile.detectedTemperature) + " K", side, 0.8f, x, y + 0.1, z)
|
||||
RenderUtility.renderText((if (tile.isOverThreshold) "\u00a74" else "\u00a71") + "Threshold: " + (tile.getThershold) + " K", side, 1, x, y - 0.1, z)
|
||||
RenderUtility.renderText((if (tile.isOverThreshold) "\u00a74" else "\u00a71") + "Threshold: " + (tile.getThreshold) + " K", side, 1, x, y - 0.1, z)
|
||||
if (tile.trackCoordinate != null)
|
||||
{
|
||||
RenderUtility.renderText(tile.trackCoordinate.xi + ", " + tile.trackCoordinate.yi + ", " + tile.trackCoordinate.zi, side, 0.5f, x, y - 0.3, z)
|
||||
|
|
|
@ -16,8 +16,6 @@ import net.minecraft.nbt.NBTTagCompound
|
|||
import net.minecraft.util.IIcon
|
||||
import net.minecraft.world.IBlockAccess
|
||||
import resonant.lib.grid.thermal.ThermalGrid
|
||||
import resonant.lib.network.Synced
|
||||
import resonant.lib.network.discriminator.PacketAnnotation
|
||||
import resonant.lib.prefab.tile.item.ItemBlockSaved
|
||||
import resonant.lib.prefab.tile.spatial.SpatialTile
|
||||
import resonant.lib.transform.vector.{Vector3, VectorWorld}
|
||||
|
@ -33,13 +31,14 @@ object TileThermometer
|
|||
}
|
||||
|
||||
@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")
|
||||
@deprecated
|
||||
class TileThermometer extends SpatialTile(Material.piston) with SimpleComponent
|
||||
{
|
||||
@Synced var detectedTemperature: Float = 295
|
||||
@Synced var previousDetectedTemperature: Float = 295
|
||||
@Synced var trackCoordinate: Vector3 = null
|
||||
@Synced private var threshold: Int = 1000
|
||||
@Synced private var isProvidingPower: Boolean = false
|
||||
var detectedTemperature: Float = 295
|
||||
var previousDetectedTemperature: Float = 295
|
||||
var trackCoordinate: Vector3 = null
|
||||
private var threshold: Int = 1000
|
||||
private var isProvidingPower: Boolean = false
|
||||
|
||||
//Constructor
|
||||
providePower = true
|
||||
|
@ -63,11 +62,11 @@ class TileThermometer extends SpatialTile(Material.piston) with SimpleComponent
|
|||
{
|
||||
if (player.isSneaking)
|
||||
{
|
||||
setThreshold(getThershold + 100)
|
||||
setThreshold(getThreshold + 100)
|
||||
}
|
||||
else
|
||||
{
|
||||
setThreshold(getThershold - 100)
|
||||
setThreshold(getThreshold - 100)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -86,11 +85,11 @@ class TileThermometer extends SpatialTile(Material.piston) with SimpleComponent
|
|||
{
|
||||
if (player.isSneaking)
|
||||
{
|
||||
setThreshold(getThershold - 10)
|
||||
setThreshold(getThreshold - 10)
|
||||
}
|
||||
else
|
||||
{
|
||||
setThreshold(getThershold + 10)
|
||||
setThreshold(getThreshold + 10)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -139,19 +138,14 @@ class TileThermometer extends SpatialTile(Material.piston) with SimpleComponent
|
|||
|
||||
def isOverThreshold: Boolean =
|
||||
{
|
||||
return detectedTemperature >= getThershold
|
||||
return detectedTemperature >= getThreshold
|
||||
}
|
||||
|
||||
def getThershold: Int =
|
||||
def getThreshold: Int =
|
||||
{
|
||||
return threshold
|
||||
}
|
||||
|
||||
override def getDescPacket: PacketAnnotation =
|
||||
{
|
||||
return new PacketAnnotation(this)
|
||||
}
|
||||
|
||||
def setTrack(track: Vector3)
|
||||
{
|
||||
trackCoordinate = track
|
||||
|
@ -198,7 +192,7 @@ class TileThermometer extends SpatialTile(Material.piston) with SimpleComponent
|
|||
@Optional.Method(modid = "OpenComputers")
|
||||
def getWarningTemperature(context: Context, args: Arguments): Array[Any] =
|
||||
{
|
||||
return Array[Any](this.getThershold)
|
||||
return Array[Any](this.getThreshold)
|
||||
}
|
||||
|
||||
@Callback
|
||||
|
|
Loading…
Reference in New Issue