Skip to content

Commit

Permalink
Fix #232
Browse files Browse the repository at this point in the history
  • Loading branch information
Nedelosk committed Jul 29, 2017
1 parent 68ed8a1 commit 95dca83
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/binnie/core/craftgui/WindowFieldKit.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,11 @@ public void onEvent(final EventValueChanged event) {

@Override
public void initialiseServer() {
//create slots
final ItemStack kit = this.getPlayer().getHeldItemMainhand();
final int sheets = 64 - kit.getItemDamage();
getWindowInventory().createSlot(0);
getWindowInventory().createSlot(1);
if (sheets != 0) {
this.getWindowInventory().setInventorySlotContents(1, new ItemStack(Items.PAPER, sheets));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public ContainerCraftGUI(final Window window) {
}
}
}
detectAndSendChanges();
}

private Side getSide() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ public void handleMouseInput() throws IOException {
@Override
public void onGuiClosed() {
this.window.onClose();
inventorySlots.onContainerClosed(mc.player);
}

public boolean isHelpMode() {
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/binnie/genetics/gui/WindowAnalyst.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ public void initialiseServer() {
}
}
}
//create slots
getWindowInventory().createSlot(0);
getWindowInventory().createSlot(1);
setupValidators();
}

Expand Down

0 comments on commit 95dca83

Please sign in to comment.