Refactor: factory should *not* refer to silicon... Move assembly table to silicon module
This commit is contained in:
parent
98d8f5c6e0
commit
39a6cbd137
9 changed files with 16 additions and 20 deletions
|
@ -40,7 +40,6 @@ import buildcraft.factory.BptBlockRefinery;
|
|||
import buildcraft.factory.BptBlockTank;
|
||||
import buildcraft.factory.FactoryProxy;
|
||||
import buildcraft.factory.GuiHandler;
|
||||
import buildcraft.factory.TileAssemblyTable;
|
||||
import buildcraft.factory.TileAutoWorkbench;
|
||||
import buildcraft.factory.TileHopper;
|
||||
import buildcraft.factory.TileMiningWell;
|
||||
|
@ -49,7 +48,6 @@ import buildcraft.factory.TileQuarry;
|
|||
import buildcraft.factory.TileRefinery;
|
||||
import buildcraft.factory.TileTank;
|
||||
import buildcraft.factory.network.PacketHandlerFactory;
|
||||
import buildcraft.silicon.TileLaser;
|
||||
import net.minecraft.src.Block;
|
||||
import net.minecraft.src.Item;
|
||||
import net.minecraft.src.ItemStack;
|
||||
|
@ -133,8 +131,6 @@ public class BuildCraftFactory {
|
|||
CoreProxy.proxy.registerTileEntity(TilePump.class, "net.minecraft.src.buildcraft.factory.TilePump");
|
||||
CoreProxy.proxy.registerTileEntity(TileTank.class, "net.minecraft.src.buildcraft.factory.TileTank");
|
||||
CoreProxy.proxy.registerTileEntity(TileRefinery.class, "net.minecraft.src.buildcraft.factory.Refinery");
|
||||
CoreProxy.proxy.registerTileEntity(TileLaser.class, "net.minecraft.src.buildcraft.factory.TileLaser");
|
||||
CoreProxy.proxy.registerTileEntity(TileAssemblyTable.class, "net.minecraft.src.buildcraft.factory.TileAssemblyTable");
|
||||
|
||||
if (!hopperDisabled) {
|
||||
CoreProxy.proxy.registerTileEntity(TileHopper.class, "net.minecraft.src.buildcraft.factory.TileHopper");
|
||||
|
|
|
@ -24,6 +24,8 @@ import buildcraft.silicon.BlockAssemblyTable;
|
|||
import buildcraft.silicon.BlockLaser;
|
||||
import buildcraft.silicon.GuiHandler;
|
||||
import buildcraft.silicon.SiliconProxy;
|
||||
import buildcraft.silicon.TileAssemblyTable;
|
||||
import buildcraft.silicon.TileLaser;
|
||||
import buildcraft.silicon.network.PacketHandlerSilicon;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
|
@ -47,6 +49,8 @@ public class BuildCraftSilicon {
|
|||
@Init
|
||||
public void load(FMLInitializationEvent evt) {
|
||||
NetworkRegistry.instance().registerGuiHandler(instance, new GuiHandler());
|
||||
CoreProxy.proxy.registerTileEntity(TileLaser.class, "net.minecraft.src.buildcraft.factory.TileLaser");
|
||||
CoreProxy.proxy.registerTileEntity(TileAssemblyTable.class, "net.minecraft.src.buildcraft.factory.TileAssemblyTable");
|
||||
|
||||
new BptBlockRotateMeta(laserBlock.blockID, new int[] { 2, 5, 3, 4 }, true);
|
||||
new BptBlockInventory(assemblyTableBlock.blockID);
|
||||
|
@ -62,7 +66,7 @@ public class BuildCraftSilicon {
|
|||
Property laserId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("laser.id", DefaultProps.LASER_ID);
|
||||
|
||||
Property assemblyTableId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("assemblyTable.id", DefaultProps.ASSEMBLY_TABLE_ID);
|
||||
|
||||
|
||||
Property redstoneChipsetId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("redstoneChipset.id", Configuration.CATEGORY_ITEM, DefaultProps.REDSTONE_CHIPSET);
|
||||
|
||||
BuildCraftCore.mainConfiguration.save();
|
||||
|
|
|
@ -14,7 +14,6 @@ import buildcraft.core.DefaultProps;
|
|||
import buildcraft.core.GuiIds;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import buildcraft.factory.TileAssemblyTable;
|
||||
|
||||
|
||||
public class BlockAssemblyTable extends BlockContainer {
|
||||
|
|
|
@ -2,7 +2,6 @@ package buildcraft.silicon;
|
|||
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import buildcraft.core.GuiIds;
|
||||
import buildcraft.factory.TileAssemblyTable;
|
||||
import buildcraft.silicon.gui.ContainerAssemblyTable;
|
||||
import buildcraft.silicon.gui.GuiAssemblyTable;
|
||||
import net.minecraft.src.EntityPlayer;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package buildcraft.factory;
|
||||
package buildcraft.silicon;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
|
@ -13,7 +13,6 @@ import buildcraft.core.network.TileNetworkData;
|
|||
import buildcraft.core.network.TilePacketWrapper;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import buildcraft.silicon.ILaserTarget;
|
||||
|
||||
import net.minecraft.src.Container;
|
||||
import net.minecraft.src.EntityItem;
|
|
@ -21,7 +21,6 @@ import buildcraft.core.BlockIndex;
|
|||
import buildcraft.core.EntityEnergyLaser;
|
||||
import buildcraft.core.TileBuildCraft;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.factory.TileAssemblyTable;
|
||||
|
||||
import net.minecraft.src.NBTTagCompound;
|
||||
import net.minecraft.src.TileEntity;
|
||||
|
@ -146,10 +145,10 @@ public class TileLaser extends TileBuildCraft implements IPowerReceptor {
|
|||
for (int z = minZ; z <= maxZ; ++z) {
|
||||
|
||||
TileEntity tile = worldObj.getBlockTileEntity(x, y, z);
|
||||
if (tile instanceof TileAssemblyTable) {
|
||||
if (tile instanceof ILaserTarget) {
|
||||
|
||||
TileAssemblyTable table = (TileAssemblyTable) tile;
|
||||
if (table.currentRecipe != null) {
|
||||
ILaserTarget table = (ILaserTarget) tile;
|
||||
if (table.hasCurrentWork()) {
|
||||
targets.add(new BlockIndex(x, y, z));
|
||||
}
|
||||
}
|
||||
|
@ -163,7 +162,7 @@ public class TileLaser extends TileBuildCraft implements IPowerReceptor {
|
|||
}
|
||||
|
||||
BlockIndex b = targets.get(worldObj.rand.nextInt(targets.size()));
|
||||
laserTarget = (TileAssemblyTable) worldObj.getBlockTileEntity(b.i, b.j, b.k);
|
||||
laserTarget = (ILaserTarget) worldObj.getBlockTileEntity(b.i, b.j, b.k);
|
||||
}
|
||||
|
||||
protected void createLaser() {
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
package buildcraft.silicon.gui;
|
||||
|
||||
import buildcraft.core.gui.BuildCraftContainer;
|
||||
import buildcraft.factory.TileAssemblyTable;
|
||||
import buildcraft.factory.TileAssemblyTable.SelectionMessage;
|
||||
import buildcraft.silicon.TileAssemblyTable;
|
||||
import buildcraft.silicon.TileAssemblyTable.SelectionMessage;
|
||||
import net.minecraft.src.EntityPlayer;
|
||||
import net.minecraft.src.ICrafting;
|
||||
import net.minecraft.src.IInventory;
|
||||
|
|
|
@ -27,8 +27,8 @@ import buildcraft.core.network.PacketUpdate;
|
|||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.StringUtil;
|
||||
import buildcraft.energy.TileEngine;
|
||||
import buildcraft.factory.TileAssemblyTable;
|
||||
import buildcraft.factory.TileAssemblyTable.SelectionMessage;
|
||||
import buildcraft.silicon.TileAssemblyTable;
|
||||
import buildcraft.silicon.TileAssemblyTable.SelectionMessage;
|
||||
|
||||
public class GuiAssemblyTable extends GuiAdvancedInterface {
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ import cpw.mods.fml.common.network.Player;
|
|||
import buildcraft.core.network.PacketCoordinates;
|
||||
import buildcraft.core.network.PacketIds;
|
||||
import buildcraft.core.network.PacketUpdate;
|
||||
import buildcraft.factory.TileAssemblyTable;
|
||||
import buildcraft.factory.TileAssemblyTable.SelectionMessage;
|
||||
import buildcraft.silicon.TileAssemblyTable;
|
||||
import buildcraft.silicon.TileAssemblyTable.SelectionMessage;
|
||||
import buildcraft.silicon.gui.ContainerAssemblyTable;
|
||||
|
||||
import net.minecraft.src.Container;
|
||||
|
|
Loading…
Reference in a new issue