Class InventoryFixedWrapper
java.lang.Object
alexiil.mc.lib.attributes.item.compat.InventoryFixedWrapper
- All Implemented Interfaces:
- OpenWrapper,- net.minecraft.inventory.Inventory,- net.minecraft.util.Clearable
- Direct Known Subclasses:
- SidedInventoryFixedWrapper
public abstract class InventoryFixedWrapper
extends Object
implements net.minecraft.inventory.Inventory, OpenWrapper
An 
Inventory that wraps an FixedItemInv.
 
 One of the Inventory methods must be overridden by subclasses however:
 Inventory.canPlayerUse(PlayerEntity).
- 
Field SummaryFieldsFields inherited from interface net.minecraft.inventory.InventoryMAX_COUNT_PER_STACK
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()net.minecraft.item.ItemStackgetStack(int slot)booleanisEmpty()booleanisValid(int slot, net.minecraft.item.ItemStack stack)voidnet.minecraft.item.ItemStackremoveStack(int slot)net.minecraft.item.ItemStackremoveStack(int slot, int amount)voidsetStack(int slot, net.minecraft.item.ItemStack to)intsize()booleansoftSetInvStack(int slot, net.minecraft.item.ItemStack to)Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.inventory.InventorycanPlayerUse, containsAny, count, getMaxCountPerStack, onClose, onOpen
- 
Field Details- 
inv
 
- 
- 
Constructor Details- 
InventoryFixedWrapper
 
- 
- 
Method Details- 
clearpublic void clear()- Specified by:
- clearin interface- net.minecraft.util.Clearable
 
- 
sizepublic int size()- Specified by:
- sizein interface- net.minecraft.inventory.Inventory
 
- 
isEmptypublic boolean isEmpty()- Specified by:
- isEmptyin interface- net.minecraft.inventory.Inventory
 
- 
getStackpublic net.minecraft.item.ItemStack getStack(int slot)- Specified by:
- getStackin interface- net.minecraft.inventory.Inventory
 
- 
removeStackpublic net.minecraft.item.ItemStack removeStack(int slot, int amount)- Specified by:
- removeStackin interface- net.minecraft.inventory.Inventory
 
- 
removeStackpublic net.minecraft.item.ItemStack removeStack(int slot)- Specified by:
- removeStackin interface- net.minecraft.inventory.Inventory
 
- 
setStackpublic void setStack(int slot, net.minecraft.item.ItemStack to)- Specified by:
- setStackin interface- net.minecraft.inventory.Inventory
 
- 
softSetInvStackpublic boolean softSetInvStack(int slot, net.minecraft.item.ItemStack to)
- 
isValidpublic boolean isValid(int slot, net.minecraft.item.ItemStack stack)- Specified by:
- isValidin interface- net.minecraft.inventory.Inventory
 
- 
markDirtypublic void markDirty()- Specified by:
- markDirtyin interface- net.minecraft.inventory.Inventory
 
- 
getWrapped- Specified by:
- getWrappedin interface- OpenWrapper
- Returns:
- The object that this wraps, or null if the wrapped object cannot be converted cleanly without exposing
         additional details.
         For example LBA's InventorytoFixedItemInvViewwrapper (FixedInventoryViewVanillaWrapper) implements this to return theInventory, but theSidedInventoryvariant (FixedSidedInventoryVanillaWrapper) returns null, as it is not possible to cleanly open the original inventory without exposing additional slots.
 
 
-