aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/core')
-rw-r--r--src/Java/gtPlusPlus/core/container/Container_Workbench.java8
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java12
-rw-r--r--src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java8
3 files changed, 18 insertions, 10 deletions
diff --git a/src/Java/gtPlusPlus/core/container/Container_Workbench.java b/src/Java/gtPlusPlus/core/container/Container_Workbench.java
index fd16aa4e67..59000f1b59 100644
--- a/src/Java/gtPlusPlus/core/container/Container_Workbench.java
+++ b/src/Java/gtPlusPlus/core/container/Container_Workbench.java
@@ -23,7 +23,7 @@ public class Container_Workbench extends Container {
public final InventoryWorkbenchChest inventoryChest;
public final InventoryWorkbenchTools inventoryTool;
public final InventoryWorkbenchHoloSlots inventoryHolo;
- public final InventoryWorkbenchHoloCrafting inventoryCrafting;
+ //public final InventoryWorkbenchHoloCrafting inventoryCrafting;
private final World worldObj;
private final int posX;
@@ -84,7 +84,7 @@ public class Container_Workbench extends Container {
this.inventoryChest = tile.inventoryChest;
this.inventoryTool = tile.inventoryTool;
this.inventoryHolo = tile.inventoryHolo;
- this.inventoryCrafting = tile.inventoryCrafting;
+ //this.inventoryCrafting = tile.inventoryCrafting;
int var6;
int var7;
@@ -262,7 +262,7 @@ public class Container_Workbench extends Container {
private void updateCraftingMatrix() {
for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) {
- this.craftMatrix.setInventorySlotContents(i, this.tile_entity.inventoryCrafting.getStackInSlot(i));
+ //this.craftMatrix.setInventorySlotContents(i, this.tile_entity.inventoryCrafting.getStackInSlot(i));
}
}
@@ -280,7 +280,7 @@ public class Container_Workbench extends Container {
private void saveCraftingMatrix() {
for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) {
- this.tile_entity.inventoryCrafting.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(i));
+ //this.tile_entity.inventoryCrafting.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(i));
}
}
diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java
index eac2724aa0..0657b6d886 100644
--- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java
+++ b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java
@@ -23,7 +23,7 @@ public class TileEntityWorkbench extends TileEntity implements INetworkDataProvi
public InventoryWorkbenchChest inventoryChest;
public InventoryWorkbenchTools inventoryTool;
public InventoryWorkbenchHoloSlots inventoryHolo;
- public InventoryWorkbenchHoloCrafting inventoryCrafting;
+ //public InventoryWorkbenchHoloCrafting inventoryCrafting;
public IInventory inventoryCraftResult = new InventoryCraftResult();
@@ -31,7 +31,7 @@ public class TileEntityWorkbench extends TileEntity implements INetworkDataProvi
this.inventoryTool = new InventoryWorkbenchTools();//number of slots - without product slot
this.inventoryChest = new InventoryWorkbenchChest();//number of slots - without product slot
this.inventoryHolo = new InventoryWorkbenchHoloSlots();
- this.inventoryCrafting = new InventoryWorkbenchHoloCrafting();
+ //this.inventoryCrafting = new InventoryWorkbenchHoloCrafting();
this.canUpdate();
}
@@ -59,14 +59,14 @@ public class TileEntityWorkbench extends TileEntity implements INetworkDataProvi
// Write Crafting Matrix to NBT
final NBTTagList craftingTag = new NBTTagList();
- for (int currentIndex = 0; currentIndex < this.inventoryCrafting.getSizeInventory(); ++currentIndex) {
+ /*for (int currentIndex = 0; currentIndex < this.inventoryCrafting.getSizeInventory(); ++currentIndex) {
if (this.inventoryCrafting.getStackInSlot(currentIndex) != null) {
final NBTTagCompound tagCompound = new NBTTagCompound();
tagCompound.setByte("Slot", (byte) currentIndex);
this.inventoryCrafting.getStackInSlot(currentIndex).writeToNBT(tagCompound);
craftingTag.appendTag(tagCompound);
}
- }
+ }*/
nbt.setTag("CraftingMatrix", craftingTag);
// Write craftingResult to NBT
@@ -90,14 +90,14 @@ public class TileEntityWorkbench extends TileEntity implements INetworkDataProvi
// Read in the Crafting Matrix from NBT
final NBTTagList craftingTag = nbt.getTagList("CraftingMatrix", 10);
- this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); //TODO: magic number
+ /*this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); //TODO: magic number
for (int i = 0; i < craftingTag.tagCount(); ++i) {
final NBTTagCompound tagCompound = craftingTag.getCompoundTagAt(i);
final byte slot = tagCompound.getByte("Slot");
if ((slot >= 0) && (slot < this.inventoryCrafting.getSizeInventory())) {
this.inventoryCrafting.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(tagCompound));
}
- }
+ }*/
// Read craftingResult from NBT
diff --git a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
index ba48892112..05b85cfff6 100644
--- a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
+++ b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
@@ -136,4 +136,12 @@ public class ReflectionUtils {
modifierField.setInt(nameField, modifiers);
}
+ public static void setFinalStatic(Field field, Object newValue) throws Exception {
+ field.setAccessible(true);
+ Field modifiersField = Field.class.getDeclaredField("modifiers");
+ modifiersField.setAccessible(true);
+ modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
+ field.set(null, newValue);
+ }
+
}