diff --git a/src/minecraft/dark/assembly/common/armbot/TileEntityArmbot.java b/src/minecraft/dark/assembly/common/armbot/TileEntityArmbot.java index 3ca4b864..61a4f25c 100644 --- a/src/minecraft/dark/assembly/common/armbot/TileEntityArmbot.java +++ b/src/minecraft/dark/assembly/common/armbot/TileEntityArmbot.java @@ -104,7 +104,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, } } - if (this.isRunning()) + if (this.isFunctioning()) { if (!this.worldObj.isRemote) { diff --git a/src/minecraft/dark/assembly/common/imprinter/TileEntityImprinter.java b/src/minecraft/dark/assembly/common/imprinter/TileEntityImprinter.java index 831335c3..424aee51 100644 --- a/src/minecraft/dark/assembly/common/imprinter/TileEntityImprinter.java +++ b/src/minecraft/dark/assembly/common/imprinter/TileEntityImprinter.java @@ -27,11 +27,11 @@ import dark.assembly.api.IArmbot; import dark.assembly.api.IArmbotUseable; import dark.core.common.DarkMain; import dark.core.network.PacketHandler; -import dark.core.prefab.TileEntityMulti; import dark.core.prefab.helpers.AutoCraftingManager; import dark.core.prefab.helpers.AutoCraftingManager.IAutoCrafter; import dark.core.prefab.helpers.Pair; import dark.core.prefab.invgui.ISlotPickResult; +import dark.core.prefab.machine.TileEntityMulti; public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInventory, IArmbotUseable, IPacketReceiver, ISlotPickResult, IAutoCrafter { diff --git a/src/minecraft/dark/assembly/common/machine/BlockAssembly.java b/src/minecraft/dark/assembly/common/machine/BlockAssembly.java index dfcede9c..ba84eb29 100644 --- a/src/minecraft/dark/assembly/common/machine/BlockAssembly.java +++ b/src/minecraft/dark/assembly/common/machine/BlockAssembly.java @@ -8,7 +8,7 @@ import net.minecraft.util.Icon; import net.minecraft.world.World; import dark.assembly.common.AssemblyLine; import dark.assembly.common.TabAssemblyLine; -import dark.core.prefab.BlockMachine; +import dark.core.prefab.machine.BlockMachine; public abstract class BlockAssembly extends BlockMachine { diff --git a/src/minecraft/dark/assembly/common/machine/InvInteractionHelper.java b/src/minecraft/dark/assembly/common/machine/InvInteractionHelper.java index 9e9d1490..ad2f2486 100644 --- a/src/minecraft/dark/assembly/common/machine/InvInteractionHelper.java +++ b/src/minecraft/dark/assembly/common/machine/InvInteractionHelper.java @@ -12,7 +12,7 @@ import net.minecraft.tileentity.TileEntityChest; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; import universalelectricity.core.vector.Vector3; -import dark.core.prefab.TileEntityMulti; +import dark.core.prefab.machine.TileEntityMulti; public class InvInteractionHelper { diff --git a/src/minecraft/dark/assembly/common/machine/TileEntityAssembly.java b/src/minecraft/dark/assembly/common/machine/TileEntityAssembly.java index 4eb02739..172b49b0 100644 --- a/src/minecraft/dark/assembly/common/machine/TileEntityAssembly.java +++ b/src/minecraft/dark/assembly/common/machine/TileEntityAssembly.java @@ -11,15 +11,15 @@ import universalelectricity.core.electricity.ElectricityPack; import universalelectricity.core.vector.Vector3; import dark.api.parts.INetworkEnergyPart; import dark.assembly.common.AssemblyLine; -import dark.core.prefab.TileEntityMachine; +import dark.core.prefab.machine.TileEntityEnergyMachine; import dark.core.prefab.tilenetwork.NetworkSharedPower; import dark.core.prefab.tilenetwork.NetworkTileEntities; /** A class to be inherited by all machines on the assembly line. This class acts as a single peace * in a network of similar tiles allowing all to share power from one or more sources - * + * * @author DarkGuardsman */ -public abstract class TileEntityAssembly extends TileEntityMachine implements INetworkEnergyPart +public abstract class TileEntityAssembly extends TileEntityEnergyMachine implements INetworkEnergyPart { /** lowest value the network can update at */ public static int refresh_min_rate = 20; @@ -61,7 +61,6 @@ public abstract class TileEntityAssembly extends TileEntityMachine implements IN super.updateEntity(); if (!this.worldObj.isRemote) { - this.prevRunning = this.running; if (ticks % updateTick == 0) { @@ -74,10 +73,10 @@ public abstract class TileEntityAssembly extends TileEntityMachine implements IN } @Override - public boolean canRun() + public boolean canFunction() { //TODO add check for network power - return super.canRun() || AssemblyLine.REQUIRE_NO_POWER; + return super.canFunction() || AssemblyLine.REQUIRE_NO_POWER; } /** Same as updateEntity */ @@ -87,12 +86,6 @@ public abstract class TileEntityAssembly extends TileEntityMachine implements IN } - /** Checks to see if this assembly tile can run using several methods */ - public boolean isRunning() - { - return this.running; - } - @Override public boolean canTileConnect(Connection type, ForgeDirection dir) { diff --git a/src/minecraft/dark/assembly/common/machine/TileEntityCrate.java b/src/minecraft/dark/assembly/common/machine/TileEntityCrate.java index 8a2ac566..353cf656 100644 --- a/src/minecraft/dark/assembly/common/machine/TileEntityCrate.java +++ b/src/minecraft/dark/assembly/common/machine/TileEntityCrate.java @@ -15,7 +15,7 @@ import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; import dark.core.common.DarkMain; import dark.core.network.PacketHandler; -import dark.core.prefab.TileEntityInv; +import dark.core.prefab.machine.TileEntityInv; public class TileEntityCrate extends TileEntityInv implements IPacketReceiver { diff --git a/src/minecraft/dark/assembly/common/machine/TileEntityManipulator.java b/src/minecraft/dark/assembly/common/machine/TileEntityManipulator.java index c8723a34..79bebdab 100644 --- a/src/minecraft/dark/assembly/common/machine/TileEntityManipulator.java +++ b/src/minecraft/dark/assembly/common/machine/TileEntityManipulator.java @@ -35,7 +35,7 @@ public class TileEntityManipulator extends TileEntityFilterable implements IRota { if (!this.worldObj.isRemote) { - if (!this.isDisabled() && this.isRunning()) + if (this.isFunctioning()) { if (!this.isOutput) { diff --git a/src/minecraft/dark/assembly/common/machine/TileEntityRejector.java b/src/minecraft/dark/assembly/common/machine/TileEntityRejector.java index 9fbd4aad..28e01f1c 100644 --- a/src/minecraft/dark/assembly/common/machine/TileEntityRejector.java +++ b/src/minecraft/dark/assembly/common/machine/TileEntityRejector.java @@ -38,7 +38,7 @@ public class TileEntityRejector extends TileEntityFilterable try { - if (this.isRunning()) + if (this.isFunctioning()) { /** Find all entities in the position in which this block is facing and attempt * to push it out of the way. */ diff --git a/src/minecraft/dark/assembly/common/machine/belt/BlockConveyorBelt.java b/src/minecraft/dark/assembly/common/machine/belt/BlockConveyorBelt.java index dd86a100..a4a5c462 100644 --- a/src/minecraft/dark/assembly/common/machine/belt/BlockConveyorBelt.java +++ b/src/minecraft/dark/assembly/common/machine/belt/BlockConveyorBelt.java @@ -22,7 +22,7 @@ import dark.assembly.common.machine.BlockAssembly; import dark.assembly.common.machine.belt.TileEntityConveyorBelt.SlantType; /** The block for the actual conveyor belt! - * + * * @author Calclavia, DarkGuardsman */ public class BlockConveyorBelt extends BlockAssembly { @@ -245,7 +245,7 @@ public class BlockConveyorBelt extends BlockAssembly { return; } - if (tileEntity.isRunning() && !world.isBlockIndirectlyGettingPowered(x, y, z)) + if (tileEntity.isFunctioning() && !world.isBlockIndirectlyGettingPowered(x, y, z)) { float acceleration = tileEntity.acceleration; float maxSpeed = tileEntity.maxSpeed; diff --git a/src/minecraft/dark/assembly/common/machine/belt/TileEntityConveyorBelt.java b/src/minecraft/dark/assembly/common/machine/belt/TileEntityConveyorBelt.java index 85b9fe68..9f27854a 100644 --- a/src/minecraft/dark/assembly/common/machine/belt/TileEntityConveyorBelt.java +++ b/src/minecraft/dark/assembly/common/machine/belt/TileEntityConveyorBelt.java @@ -21,7 +21,7 @@ import dark.assembly.common.machine.TileEntityAssembly; import dark.core.network.PacketHandler; /** Conveyer belt TileEntity that allows entities of all kinds to be moved - * + * * @author DarkGuardsman */ public class TileEntityConveyorBelt extends TileEntityAssembly implements IPacketReceiver, IBelt, IRotatable { @@ -68,7 +68,7 @@ public class TileEntityConveyorBelt extends TileEntityAssembly implements IPacke it.remove(); } } - if (this.worldObj.isRemote && this.isRunning()) + if (this.worldObj.isRemote && this.isFunctioning()) { if (this.ticks % 10 == 0 && this.worldObj.isRemote && this.worldObj.getBlockId(this.xCoord - 1, this.yCoord, this.zCoord) != AssemblyLine.recipeLoader.blockConveyorBelt.blockID && this.worldObj.getBlockId(xCoord, yCoord, zCoord - 1) != AssemblyLine.recipeLoader.blockConveyorBelt.blockID) { @@ -101,9 +101,9 @@ public class TileEntityConveyorBelt extends TileEntityAssembly implements IPacke } @Override - public boolean canRun() + public boolean canFunction() { - return super.canRun() && !this.worldObj.isBlockIndirectlyGettingPowered(this.xCoord, this.yCoord, this.zCoord); + return super.canFunction() && !this.worldObj.isBlockIndirectlyGettingPowered(this.xCoord, this.yCoord, this.zCoord); } @Override diff --git a/src/minecraft/dark/assembly/common/machine/processor/BlockProcessor.java b/src/minecraft/dark/assembly/common/machine/processor/BlockProcessor.java index 1f8a5fce..55a6c8a6 100644 --- a/src/minecraft/dark/assembly/common/machine/processor/BlockProcessor.java +++ b/src/minecraft/dark/assembly/common/machine/processor/BlockProcessor.java @@ -18,9 +18,9 @@ import dark.assembly.client.render.BlockRenderingHandler; import dark.assembly.common.AssemblyLine; import dark.assembly.common.CommonProxy; import dark.assembly.common.TabAssemblyLine; -import dark.core.prefab.BlockMachine; import dark.core.prefab.IExtraObjectInfo; import dark.core.prefab.helpers.Pair; +import dark.core.prefab.machine.BlockMachine; public class BlockProcessor extends BlockMachine implements IExtraObjectInfo { diff --git a/src/minecraft/dark/assembly/common/machine/processor/ContainerProcessor.java b/src/minecraft/dark/assembly/common/machine/processor/ContainerProcessor.java index c0cef321..addd6a25 100644 --- a/src/minecraft/dark/assembly/common/machine/processor/ContainerProcessor.java +++ b/src/minecraft/dark/assembly/common/machine/processor/ContainerProcessor.java @@ -135,7 +135,7 @@ public class ContainerProcessor extends Container return null; } } - else if (tileEntity.isBattery(slotStack)) + else if (tileEntity.isBatteryItem(slotStack)) { if (!this.mergeItemStack(slotStack, tileEntity.slotBatteryCharge, 2, false)) { diff --git a/src/minecraft/dark/assembly/common/machine/processor/TileEntityProcessor.java b/src/minecraft/dark/assembly/common/machine/processor/TileEntityProcessor.java index 2d40fd28..69643fd7 100644 --- a/src/minecraft/dark/assembly/common/machine/processor/TileEntityProcessor.java +++ b/src/minecraft/dark/assembly/common/machine/processor/TileEntityProcessor.java @@ -13,13 +13,13 @@ import dark.api.ProcessorRecipes.ProcessorType; import dark.assembly.common.machine.processor.BlockProcessor.ProcessorData; import dark.core.interfaces.IInvBox; import dark.core.network.PacketHandler; -import dark.core.prefab.TileEntityMachine; import dark.core.prefab.invgui.InvChest; +import dark.core.prefab.machine.TileEntityEnergyMachine; /** Basic A -> B recipe processor machine designed mainly to handle ore blocks - * + * * @author DarkGuardsman */ -public class TileEntityProcessor extends TileEntityMachine +public class TileEntityProcessor extends TileEntityEnergyMachine { public int slotInput = 0, slotOutput = 1, slotBatteryCharge = 2, slotBatteryDrain = 3; @@ -51,7 +51,7 @@ public class TileEntityProcessor extends TileEntityMachine { this.getProcessorData(); super.updateEntity(); - if (this.running) + if (this.isFunctioning()) { this.doAnimation(); @@ -137,9 +137,9 @@ public class TileEntityProcessor extends TileEntityMachine } @Override - public boolean canRun() + public boolean canFunction() { - return super.canRun() && this.canProcess(); + return super.canFunction() && this.canProcess(); } /** Can the machine process the itemStack */ @@ -211,7 +211,7 @@ public class TileEntityProcessor extends TileEntityMachine { return true; } - if (slotBatteryDrain == slot && this.isBattery(stack)) + if (slotBatteryDrain == slot && this.isBatteryItem(stack)) { return true; } @@ -262,7 +262,7 @@ public class TileEntityProcessor extends TileEntityMachine { if (!this.worldObj.isRemote && entity instanceof EntityPlayerMP) { - ((EntityPlayerMP) entity).playerNetServerHandler.sendPacketToPlayer(PacketHandler.instance().getPacket(this.getChannel(), this, TilePacketTypes.GUI.name, this.processingTicks, this.processingTime, this.energyStored)); + ((EntityPlayerMP) entity).playerNetServerHandler.sendPacketToPlayer(PacketHandler.instance().getPacket(this.getChannel(), this, SimplePacketTypes.GUI.name, this.processingTicks, this.processingTime, this.energyStored)); } } @@ -275,7 +275,7 @@ public class TileEntityProcessor extends TileEntityMachine { if (this.worldObj.isRemote) { - if (id.equalsIgnoreCase(TilePacketTypes.GUI.name)) + if (id.equalsIgnoreCase(SimplePacketTypes.GUI.name)) { this.processingTicks = dis.readInt(); this.processingTime = dis.readInt();