public class DroneItemHandler
extends net.minecraftforge.items.ItemStackHandler
| Constructor and Description |
|---|
DroneItemHandler(IDrone holder,
int useableSlots) |
| Modifier and Type | Method and Description |
|---|---|
void |
copyFromFakePlayer()
Copy of the contents of the fake player's inventory back to this inventory (other than the item in slot 0),
dropping in the world any items which don't fit due to the drone's inventory being too small.
|
void |
copyItemToFakePlayer(int slot)
Copy item from drone's IItemHandler inventory to the fake player's main inventory
Also handle item equipping where appropriate
|
net.minecraft.item.ItemStack |
extractItem(int slot,
int amount,
boolean simulate) |
int |
getSlots() |
net.minecraft.item.ItemStack |
insertItem(int slot,
net.minecraft.item.ItemStack stack,
boolean simulate) |
protected boolean |
isFakePlayerReady() |
void |
setFakePlayerReady()
Call this when it's safe to create a fake player (i.e.
|
void |
setStackInSlot(int slot,
net.minecraft.item.ItemStack stack) |
void |
setUseableSlots(int useableSlots) |
public DroneItemHandler(IDrone holder, int useableSlots)
@Nonnull
public net.minecraft.item.ItemStack insertItem(int slot,
@Nonnull
net.minecraft.item.ItemStack stack,
boolean simulate)
insertItem in interface net.minecraftforge.items.IItemHandlerinsertItem in class net.minecraftforge.items.ItemStackHandler@Nonnull
public net.minecraft.item.ItemStack extractItem(int slot,
int amount,
boolean simulate)
extractItem in interface net.minecraftforge.items.IItemHandlerextractItem in class net.minecraftforge.items.ItemStackHandlerpublic void setStackInSlot(int slot,
@Nonnull
net.minecraft.item.ItemStack stack)
setStackInSlot in interface net.minecraftforge.items.IItemHandlerModifiablesetStackInSlot in class net.minecraftforge.items.ItemStackHandlerpublic int getSlots()
getSlots in interface net.minecraftforge.items.IItemHandlergetSlots in class net.minecraftforge.items.ItemStackHandlerpublic void setUseableSlots(int useableSlots)
protected boolean isFakePlayerReady()
public void setFakePlayerReady()
public void copyFromFakePlayer()
public void copyItemToFakePlayer(int slot)
slot - slot that is being updated