Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

Commit

Permalink
Extract creative survival tab size to a constant.
Browse files Browse the repository at this point in the history
More galacticraft stuff, this time for that mod to hook into and edit.
  • Loading branch information
Kobata committed May 3, 2013
1 parent 9cf81f7 commit 3a8ee9d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/minecraft/invtweaks/InvTweaksObfuscation.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public class InvTweaksObfuscation {

private static Class containerCreative = ReflectionHelper.getClass(InvTweaksObfuscation.class.getClassLoader(), "ays", "net.minecraft.client.gui.inventory.ContainerCreative");

private static int CREATIVE_MAIN_INVENTORY_SIZE = 46;

public InvTweaksObfuscation(Minecraft mc) {
this.mc = mc;
this.mods = new InvTweaksModCompatibility(this);
Expand Down Expand Up @@ -524,7 +526,7 @@ public boolean isStandardInventory(GuiScreen guiScreen) {
|| isGuiBeacon(guiScreen)
|| isGuiHopper(guiScreen)
|| (isGuiInventoryCreative(guiScreen)
&& getSlots(getContainer(asGuiContainer(guiScreen))).size() == 46)
&& getSlots(getContainer(asGuiContainer(guiScreen))).size() == CREATIVE_MAIN_INVENTORY_SIZE)
|| mods.isStandardInventory(guiScreen);
}

Expand Down

0 comments on commit 3a8ee9d

Please sign in to comment.