Started Working on CellWorkbench

This commit is contained in:
AlgorithmX2 2014-01-06 00:54:25 -06:00
parent 517e8ccda4
commit 53c5285ea0
9 changed files with 30 additions and 39 deletions

View file

@ -1,19 +0,0 @@
package appeng.block.misc;
import java.util.EnumSet;
import net.minecraft.block.material.Material;
import appeng.block.AEBaseBlock;
import appeng.core.features.AEFeature;
import appeng.tile.misc.TilePartitionerEditor;
public class BlockPartitionEditor extends AEBaseBlock
{
public BlockPartitionEditor() {
super( BlockPartitionEditor.class, Material.iron );
setfeature( EnumSet.of( AEFeature.StorageCells ) );
setTileEntiy( TilePartitionerEditor.class );
}
}

View file

@ -122,8 +122,11 @@ public class GuiBus extends AEBaseGui
fontRenderer.drawString( getName().getLocal(), 8, 6, 4210752 );
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
redstoneMode.set( cvb.rsMode );
fuzzyMode.set( cvb.fzMode );
if ( redstoneMode != null )
redstoneMode.set( cvb.rsMode );
if ( fuzzyMode != null )
fuzzyMode.set( cvb.fzMode );
}
protected GuiText getName()

View file

@ -3,11 +3,13 @@ package appeng.container.implementations;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.IInventory;
import net.minecraft.tileentity.TileEntity;
import appeng.api.config.FuzzyMode;
import appeng.api.config.RedstoneMode;
import appeng.api.config.Settings;
import appeng.api.config.Upgrades;
import appeng.api.implementations.IBusCommon;
import appeng.api.parts.IPart;
import appeng.container.AEBaseContainer;
import appeng.container.slot.IOptionalSlotHost;
import appeng.container.slot.OptionalSlotFake;
@ -27,7 +29,7 @@ public class ContainerBus extends AEBaseContainer implements IOptionalSlotHost
IInventory toolbox = new AppEngInternalInventory( null, 9 );
public ContainerBus(InventoryPlayer ip, IBusCommon te) {
super( ip, null, te );
super( ip, (TileEntity) (te instanceof TileEntity ? te : null), (IPart) (te instanceof IPart ? te : null) );
myte = te;
IInventory upgrades = myte.getInventoryByName( "upgrades" );
@ -66,7 +68,12 @@ public class ContainerBus extends AEBaseContainer implements IOptionalSlotHost
addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 8, x, y, 1, 1, 2 ) );
}
bindPlayerInventory( ip, 0, 184 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, getHeight() - /* height of playerinventory */82 );
}
protected int getHeight()
{
return 184;
}
protected int availableUpgrades()

View file

@ -35,7 +35,7 @@ import appeng.block.misc.BlockCondenser;
import appeng.block.misc.BlockInscriber;
import appeng.block.misc.BlockInterface;
import appeng.block.misc.BlockNetworkEmitter;
import appeng.block.misc.BlockPartitionEditor;
import appeng.block.misc.BlockCellWorkbench;
import appeng.block.misc.BlockQuartzCrystalizer;
import appeng.block.misc.BlockQuartzTorch;
import appeng.block.misc.BlockTinyTNT;
@ -228,7 +228,7 @@ public class Registration
blocks.blockDrive = addFeature( BlockDrive.class );
blocks.blockChest = addFeature( BlockChest.class );
blocks.blockInterface = addFeature( BlockInterface.class );
blocks.blockPartitioner = addFeature( BlockPartitionEditor.class );
blocks.blockPartitioner = addFeature( BlockCellWorkbench.class );
blocks.blockIOPort = addFeature( BlockIOPort.class );
blocks.blockCondenser = addFeature( BlockCondenser.class );
blocks.blockEnergyAcceptor = addFeature( BlockEnergyAcceptor.class );

View file

@ -7,7 +7,7 @@ public enum GuiText
{
inventory("container"), // mc's default Inventory localization.
Chest, StoredEnergy, Of, Condenser, Drive, GrindStone, VibrationChamber, SpatialIOPort, NetworkStatus, LevelEmitter, Terminal, Interface, Config, StoredItems, Patterns, ImportBus, ExportBus;
Chest, StoredEnergy, Of, Condenser, Drive, GrindStone, VibrationChamber, SpatialIOPort, NetworkStatus, LevelEmitter, Terminal, Interface, Config, StoredItems, Patterns, ImportBus, ExportBus, CellWorkbench;
String root;

View file

@ -15,6 +15,7 @@ import appeng.api.storage.IStorageMonitorable;
import appeng.client.gui.GuiNull;
import appeng.container.ContainerNull;
import appeng.container.implementations.ContainerBus;
import appeng.container.implementations.ContainerCellWorkBench;
import appeng.container.implementations.ContainerChest;
import appeng.container.implementations.ContainerCondenser;
import appeng.container.implementations.ContainerDrive;
@ -26,6 +27,7 @@ import appeng.container.implementations.ContainerVibrationChamber;
import appeng.helpers.IInterfaceHost;
import appeng.parts.automation.PartLevelEmitter;
import appeng.tile.grindstone.TileGrinder;
import appeng.tile.misc.TileCellWorkbench;
import appeng.tile.misc.TileCondenser;
import appeng.tile.misc.TileVibrationChamber;
import appeng.tile.storage.TileChest;
@ -55,7 +57,9 @@ public enum GuiBridge implements IGuiHandler
GUI_BUS(ContainerBus.class, IBusCommon.class),
// extends (Container/Gui) + Bus
GUI_LEVELEMITTER(ContainerLevelEmitter.class, PartLevelEmitter.class);
GUI_LEVELEMITTER(ContainerLevelEmitter.class, PartLevelEmitter.class),
GUI_CELLWORKBENCH(ContainerCellWorkBench.class, TileCellWorkbench.class);
private Class Tile;
private Class Gui;

View file

@ -6,7 +6,6 @@ import java.util.HashSet;
import java.util.Hashtable;
import java.util.Set;
import appeng.api.networking.IGridHost;
import appeng.api.networking.IGridNode;
import appeng.api.networking.events.MENetworkEvent;
import appeng.api.networking.events.MENetworkEventSubscribe;

View file

@ -265,10 +265,15 @@ public class CableBusContainer implements AEMultiTile
}
}
public boolean canConnectRedstone(ForgeDirection side)
public boolean canConnectRedstone(EnumSet<ForgeDirection> enumSet)
{
IPart part = getPart( side );
return part != null && part.canConnectRedstone();
for (ForgeDirection dir : enumSet)
{
IPart part = getPart( dir );
if ( part != null && part.canConnectRedstone() )
return true;
}
return false;
}
@Override

View file

@ -1,8 +0,0 @@
package appeng.tile.misc;
import appeng.tile.AEBaseTile;
public class TilePartitionerEditor extends AEBaseTile
{
}