public class Slot<T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>>
extends java.lang.Object
| Constructor and Description |
|---|
Slot(IInventory<I,S> inventory,
int slotIndex,
int inventoryIndex,
java.util.function.BiFunction<Slot<T,I,S>,S,java.lang.Integer> acceptor) |
| Modifier and Type | Method and Description |
|---|---|
static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> |
accept(int count) |
static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> |
acceptAll() |
static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> |
acceptNone() |
boolean |
accepts(S stack) |
int |
acceptsCount(S stack) |
static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> |
acceptTags(int maxCount,
net.lenni0451.mcstructs.items.info.ItemTag... tags) |
static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> |
acceptTags(net.lenni0451.mcstructs.items.info.ItemTag... tags) |
static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> |
acceptTypes(int maxCount,
net.lenni0451.mcstructs.items.info.ItemType... types) |
static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> |
acceptTypes(net.lenni0451.mcstructs.items.info.ItemType... types) |
boolean |
canTake(InventoryHolder<T,I,S> inventoryHolder) |
IInventory<I,S> |
getInventory() |
int |
getInventoryIndex() |
int |
getSlotIndex() |
S |
getStack() |
void |
onTake(InventoryHolder<T,I,S> inventoryHolder,
S stack) |
void |
onUpdate() |
void |
setStack(S stack) |
public static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> java.util.function.BiFunction<Slot<T,I,S>,S,java.lang.Integer> acceptAll()
public static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> java.util.function.BiFunction<Slot<T,I,S>,S,java.lang.Integer> acceptNone()
public static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> java.util.function.BiFunction<Slot<T,I,S>,S,java.lang.Integer> accept(int count)
public static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> java.util.function.BiFunction<Slot<T,I,S>,S,java.lang.Integer> acceptTypes(net.lenni0451.mcstructs.items.info.ItemType... types)
public static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> java.util.function.BiFunction<Slot<T,I,S>,S,java.lang.Integer> acceptTypes(int maxCount, net.lenni0451.mcstructs.items.info.ItemType... types)
public static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> java.util.function.BiFunction<Slot<T,I,S>,S,java.lang.Integer> acceptTags(net.lenni0451.mcstructs.items.info.ItemTag... tags)
public static <T extends IInventory<I,S>,I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>> java.util.function.BiFunction<Slot<T,I,S>,S,java.lang.Integer> acceptTags(int maxCount, net.lenni0451.mcstructs.items.info.ItemTag... tags)
public IInventory<I,S> getInventory()
public int getSlotIndex()
public int getInventoryIndex()
public S getStack()
public void setStack(S stack)
public boolean accepts(S stack)
public int acceptsCount(S stack)
public boolean canTake(InventoryHolder<T,I,S> inventoryHolder)
public void onUpdate()
public void onTake(InventoryHolder<T,I,S> inventoryHolder, S stack)