Package codechicken.lib.inventory
Class MappedInventoryAccess
java.lang.Object
codechicken.lib.inventory.MappedInventoryAccess
- All Implemented Interfaces:
Iterable<net.minecraft.world.item.ItemStack>,net.minecraft.world.Clearable,net.minecraft.world.Container,net.minecraft.world.entity.SlotProvider,net.neoforged.neoforge.common.extensions.ContainerExtension
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.world.Container
net.minecraft.world.Container.ContainerIterator -
Field Summary
FieldsFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER -
Constructor Summary
ConstructorsConstructorDescriptionMappedInventoryAccess(net.minecraft.world.Container inv, MappedInventoryAccess.InventoryAccessor... accessors) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleancanPlaceItem(int slot, net.minecraft.world.item.ItemStack stack) voidintList<net.minecraft.world.entity.ContainerUser> net.minecraft.world.item.ItemStackgetItem(int slot) intbooleanisEmpty()net.minecraft.world.item.ItemStackremoveItem(int slot, int amount) net.minecraft.world.item.ItemStackremoveItemNoUpdate(int slot) voidreset()voidvoidsetItem(int slot, net.minecraft.world.item.ItemStack stack) voidstartOpen(net.minecraft.world.entity.ContainerUser user) booleanstillValid(net.minecraft.world.entity.player.Player player) voidstopOpen(net.minecraft.world.entity.ContainerUser user) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, getMaxStackSize, getSlot, hasAnyMatching, hasAnyOf, iteratorMethods inherited from interface net.neoforged.neoforge.common.extensions.ContainerExtension
onTransfer, setItemMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.world.entity.SlotProvider
getSlotsFromRange
-
Field Details
-
fullAccess
-
-
Constructor Details
-
MappedInventoryAccess
public MappedInventoryAccess(net.minecraft.world.Container inv, MappedInventoryAccess.InventoryAccessor... accessors)
-
-
Method Details
-
reset
public void reset() -
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfacenet.minecraft.world.Container
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacenet.minecraft.world.Container
-
getItem
public net.minecraft.world.item.ItemStack getItem(int slot) - Specified by:
getItemin interfacenet.minecraft.world.Container
-
removeItem
public net.minecraft.world.item.ItemStack removeItem(int slot, int amount) - Specified by:
removeItemin interfacenet.minecraft.world.Container
-
removeItemNoUpdate
public net.minecraft.world.item.ItemStack removeItemNoUpdate(int slot) - Specified by:
removeItemNoUpdatein interfacenet.minecraft.world.Container
-
setItem
public void setItem(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
setItemin interfacenet.minecraft.world.Container
-
getMaxStackSize
public int getMaxStackSize()- Specified by:
getMaxStackSizein interfacenet.minecraft.world.Container
-
setChanged
public void setChanged()- Specified by:
setChangedin interfacenet.minecraft.world.Container
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) - Specified by:
stillValidin interfacenet.minecraft.world.Container
-
addAccessor
-
canPlaceItem
public boolean canPlaceItem(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
canPlaceItemin interfacenet.minecraft.world.Container
-
startOpen
public void startOpen(net.minecraft.world.entity.ContainerUser user) - Specified by:
startOpenin interfacenet.minecraft.world.Container
-
stopOpen
public void stopOpen(net.minecraft.world.entity.ContainerUser user) - Specified by:
stopOpenin interfacenet.minecraft.world.Container
-
getEntitiesWithContainerOpen
- Specified by:
getEntitiesWithContainerOpenin interfacenet.minecraft.world.Container
-
clearContent
public void clearContent()- Specified by:
clearContentin interfacenet.minecraft.world.Clearable
-
accessors
-