remove itemstages blocking item crafting
This commit is contained in:
@@ -570,9 +570,9 @@ public abstract class AEBaseGui extends GuiContainer implements IMTModGuiContain
|
||||
stack = ((SlotME) slot).getAEStack();
|
||||
|
||||
if (stack != null
|
||||
&& action == InventoryAction.PICKUP_OR_SET_DOWN
|
||||
&& (stack.getStackSize() == 0 || GuiScreen.isAltKeyDown())
|
||||
&& player.inventory.getItemStack().isEmpty()) {
|
||||
&& action == InventoryAction.PICKUP_OR_SET_DOWN
|
||||
&& (stack.getStackSize() == 0 || GuiScreen.isAltKeyDown())
|
||||
&& player.inventory.getItemStack().isEmpty()) {
|
||||
action = InventoryAction.AUTO_CRAFT;
|
||||
}
|
||||
|
||||
@@ -935,6 +935,7 @@ public abstract class AEBaseGui extends GuiContainer implements IMTModGuiContain
|
||||
}
|
||||
} else if (s instanceof AppEngSlot) {
|
||||
AppEngSlot appEngSlot = ((AppEngSlot) s);
|
||||
if (s.getStack().isEmpty()) return;
|
||||
appEngSlot.setDisplay(true);
|
||||
appEngSlot.setReturnAsSingleStack(true);
|
||||
|
||||
|
||||
@@ -97,26 +97,9 @@ public class SlotCraftingTerm extends AppEngCraftingSlot {
|
||||
return is;
|
||||
}
|
||||
|
||||
// Don't render the item client-side if the item stage for it is not unlocked yet
|
||||
@Override
|
||||
public ItemStack getStack() {
|
||||
if (Platform.isClient() && Loader.isModLoaded("itemstages")) {
|
||||
return itemstageStack();
|
||||
}
|
||||
return super.getStack();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
ItemStack itemstageStack() {
|
||||
final ItemStack item = super.getStack();
|
||||
final String itemsStage = ItemStages.getStage(item);
|
||||
final String enchantStage = ItemStages.getEnchantStage(item);
|
||||
final EntityPlayer player = Minecraft.getMinecraft().player;
|
||||
|
||||
if ((itemsStage != null && !GameStageHelper.hasStage(player, itemsStage))
|
||||
|| (enchantStage != null && !GameStageHelper.hasStage(player, enchantStage)))
|
||||
return ItemStack.EMPTY;
|
||||
return super.getStack();
|
||||
public boolean shouldDisplay() {
|
||||
return !getStack().isEmpty();
|
||||
}
|
||||
|
||||
public void doClick(final InventoryAction action, final EntityPlayer who) {
|
||||
@@ -196,15 +179,6 @@ public class SlotCraftingTerm extends AppEngCraftingSlot {
|
||||
}
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("itemstages")) {
|
||||
final String itemsStage = ItemStages.getStage(recipe.getRecipeOutput());
|
||||
final String enchantStage = ItemStages.getEnchantStage(recipe.getRecipeOutput());
|
||||
|
||||
if ((itemsStage != null && !GameStageHelper.hasStage(player, itemsStage))
|
||||
|| (enchantStage != null && !GameStageHelper.hasStage(player, enchantStage)))
|
||||
return null;
|
||||
}
|
||||
|
||||
return recipe;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user