use of com.enderio.core.client.gui.widget.GhostBackgroundItemSlot in project EnderIO by SleepyTrousers.
the class ContainerEnchanter method createGhostSlots.
public void createGhostSlots(List<GhostSlot> slots) {
slots.add(new GhostBackgroundItemSlot(Items.WRITABLE_BOOK, getSlotFromInventory(0)));
slots.add(new GhostBackgroundItemSlot(new ItemStack(Items.DYE, 1, 4), getSlotFromInventory(2)));
}
use of com.enderio.core.client.gui.widget.GhostBackgroundItemSlot in project EnderIO by SleepyTrousers.
the class ContainerWiredCharger method addGhostslots.
public void addGhostslots(NNList<GhostSlot> ghostSlots) {
NNList<ItemStack> empties = new NNList<>();
NNList<ItemStack> fulls = new NNList<>();
getValidPair(ItemHelper.getValidItems()).apply(new Callback<Triple<ItemStack, ItemStack, Integer>>() {
@Override
public void apply(@Nonnull Triple<ItemStack, ItemStack, Integer> e) {
empties.add(e.getLeft());
fulls.add(e.getMiddle());
}
});
// JEI will cause initGui to be re-run after closing the recipe view, causing duplicate ghost
ghostSlots.removeAllByClass(GhostBackgroundItemSlot.class);
// slots
final GhostBackgroundItemSlot ghost0 = new GhostBackgroundItemSlot(empties, getSlotFromInventory(0));
ghost0.setDisplayStdOverlay(true);
ghostSlots.add(ghost0);
final GhostBackgroundItemSlot ghost1 = new GhostBackgroundItemSlot(fulls, getSlotFromInventory(1));
ghost1.setDisplayStdOverlay(true);
ghostSlots.add(ghost1);
}
Aggregations