mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-11-27 23:33:13 +00:00
add ae2 recipe support and add a gui to set the count of item that CraftingHelper needs to craft
This commit is contained in:
1 parent
512d1fa562
commit
fde98d153e
27 files changed
+1287
-343
No files matched your search
@@ -0,0 +1,58 @@
|
||||
package com.github.vfyjxf.nee.container;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
import appeng.api.networking.security.PlayerSource;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.slot.SlotInaccessible;
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ContainerCraftingAmount extends AEBaseContainer {
|
||||
|
||||
private final Slot resultSlot;
|
||||
private ItemStack resultStack;
|
||||
|
||||
public ContainerCraftingAmount(InventoryPlayer ip, Object anchor) {
|
||||
super(ip, anchor);
|
||||
this.resultSlot = new SlotInaccessible(new AppEngInternalInventory(null, 1), 0, 34, 53);
|
||||
this.addSlotToContainer(resultSlot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
this.verifyPermissions(SecurityPermissions.CRAFT, false);
|
||||
}
|
||||
|
||||
|
||||
public IGrid getGrid() {
|
||||
final IActionHost h = ((IActionHost) this.getTarget());
|
||||
return h.getActionableNode().getGrid();
|
||||
}
|
||||
|
||||
public World getWorld() {
|
||||
return this.getPlayerInv().player.worldObj;
|
||||
}
|
||||
|
||||
public BaseActionSource getActionSrc() {
|
||||
return new PlayerSource(this.getPlayerInv().player, (IActionHost) this.getTarget());
|
||||
}
|
||||
|
||||
public Slot getResultSlot() {
|
||||
return resultSlot;
|
||||
}
|
||||
|
||||
public ItemStack getResultStack() {
|
||||
return resultStack;
|
||||
}
|
||||
|
||||
public void setResultStack(ItemStack resultStack) {
|
||||
this.resultStack = resultStack;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user