forked from BuildCraft/BuildCraft
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial draft of assemblyadvancedworkbench
- Loading branch information
Showing
16 changed files
with
420 additions
and
19 deletions.
There are no files selected for viewing
Binary file added
BIN
+1.27 KB
buildcraft_resources/gfx/buildcraft/gui/assembly_advancedworkbench.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package buildcraft.silicon; | ||
|
||
import buildcraft.core.proxy.CoreProxy; | ||
import net.minecraft.src.ItemBlock; | ||
import net.minecraft.src.ItemStack; | ||
|
||
public class ItemAssemblyTable extends ItemBlock { | ||
public ItemAssemblyTable(int par1) { | ||
super(par1); | ||
setHasSubtypes(true); | ||
} | ||
|
||
@Override | ||
public String getItemNameIS(ItemStack par1ItemStack) { | ||
return par1ItemStack.getItemDamage() == 0 ? "block.assemblyTableBlock" : "block.assemblyWorkbenchBlock"; | ||
} | ||
|
||
@Override | ||
public int getMetadata(int par1) { | ||
return par1 > 0 && par1 < 2 ? par1 : 0; | ||
} | ||
} |
92 changes: 92 additions & 0 deletions
92
common/buildcraft/silicon/TileAssemblyAdvancedWorkbench.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
package buildcraft.silicon; | ||
|
||
import buildcraft.core.network.PacketSlotChange; | ||
import net.minecraft.src.EntityPlayer; | ||
import net.minecraft.src.IInventory; | ||
import net.minecraft.src.ItemStack; | ||
import net.minecraft.src.TileEntity; | ||
|
||
public class TileAssemblyAdvancedWorkbench extends TileEntity implements IInventory { | ||
|
||
private ItemStack[] craftingSlots; | ||
private ItemStack[] storageSlots; | ||
private ItemStack outputSlot; | ||
@Override | ||
public int getSizeInventory() { | ||
return 16; | ||
} | ||
|
||
@Override | ||
public ItemStack getStackInSlot(int var1) { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public ItemStack decrStackSize(int var1, int var2) { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public ItemStack getStackInSlotOnClosing(int var1) { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public void setInventorySlotContents(int var1, ItemStack var2) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
public String getInvName() { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public int getInventoryStackLimit() { | ||
// TODO Auto-generated method stub | ||
return 0; | ||
} | ||
|
||
@Override | ||
public boolean isUseableByPlayer(EntityPlayer var1) { | ||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this; | ||
} | ||
|
||
@Override | ||
public void openChest() { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
public void closeChest() { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
public float getRecentEnergyAverage() { | ||
// TODO Auto-generated method stub | ||
return 0; | ||
} | ||
|
||
public float getStoredEnergy() { | ||
// TODO Auto-generated method stub | ||
return 0f; | ||
} | ||
|
||
public float getRequiredEnergy() { | ||
// TODO Auto-generated method stub | ||
return 0f; | ||
} | ||
|
||
public void handleSlotChange(PacketSlotChange packet1) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
} |
50 changes: 50 additions & 0 deletions
50
common/buildcraft/silicon/gui/ContainerAssemblyAdvancedWorkbench.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package buildcraft.silicon.gui; | ||
|
||
import net.minecraft.src.EntityPlayer; | ||
import net.minecraft.src.IInventory; | ||
import net.minecraft.src.InventoryPlayer; | ||
import net.minecraft.src.Slot; | ||
import buildcraft.core.gui.BuildCraftContainer; | ||
import buildcraft.factory.gui.ContainerAutoWorkbench.SlotAutoCrafting; | ||
import buildcraft.silicon.TileAssemblyAdvancedWorkbench; | ||
import buildcraft.silicon.TileAssemblyTable; | ||
|
||
public class ContainerAssemblyAdvancedWorkbench extends BuildCraftContainer { | ||
private InventoryPlayer player; | ||
private TileAssemblyAdvancedWorkbench workbench; | ||
|
||
public ContainerAssemblyAdvancedWorkbench(InventoryPlayer playerInventory, TileAssemblyAdvancedWorkbench table) { | ||
super(table.getSizeInventory()); | ||
this.player = playerInventory; | ||
this.workbench = table; | ||
// addSlotToContainer(new SlotAutoCrafting(inventoryplayer.player, tile, craftResult, 0, 124, 35)); | ||
// for (int k = 0; k < 3; k++) { | ||
// for (int j1 = 0; j1 < 3; j1++) { | ||
// addSlotToContainer(new Slot(workbench, j1 + k * 3, 31 + j1 * 18, 16 + k * 18)); | ||
// } | ||
// } | ||
|
||
for (int k = 0; k < 3; k++) { | ||
for (int j1 = 0; j1 < 9; j1++) { | ||
addSlotToContainer(new Slot(workbench, j1 + k * 9, 8 + j1 * 18, 85 + k * 18)); | ||
} | ||
} | ||
|
||
for (int l = 0; l < 3; l++) { | ||
for (int k1 = 0; k1 < 9; k1++) { | ||
addSlotToContainer(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 153 + l * 18)); | ||
} | ||
|
||
} | ||
|
||
for (int i1 = 0; i1 < 9; i1++) { | ||
addSlotToContainer(new Slot(playerInventory, i1, 8 + i1 * 18, 211)); | ||
} | ||
} | ||
|
||
@Override | ||
public boolean canInteractWith(EntityPlayer var1) { | ||
return workbench.isUseableByPlayer(var1); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.