Class SidedInventoryFixedWrapper
java.lang.Object
alexiil.mc.lib.attributes.item.compat.InventoryFixedWrapper
alexiil.mc.lib.attributes.item.compat.SidedInventoryFixedWrapper
- All Implemented Interfaces:
- OpenWrapper,- net.minecraft.inventory.Inventory,- net.minecraft.inventory.SidedInventory,- net.minecraft.util.Clearable
public abstract class SidedInventoryFixedWrapper
extends InventoryFixedWrapper
implements net.minecraft.inventory.SidedInventory
A 
SidedInventory that wraps an FixedItemInv.
 
 One of the Inventory methods must be overridden by subclasses however:
 Inventory.canPlayerUse(PlayerEntity).
- 
Field SummaryFields inherited from class alexiil.mc.lib.attributes.item.compat.InventoryFixedWrapperinvFields inherited from interface net.minecraft.inventory.InventoryMAX_COUNT_PER_STACK
- 
Constructor SummaryConstructorsConstructorDescriptionCreates aSidedInventoryFixedWrapperwith all of it's slots exposed in every direction.SidedInventoryFixedWrapper(FixedItemInv inv, int[][] slotMap)
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanExtract(int slot, net.minecraft.item.ItemStack stack, net.minecraft.util.math.Direction dir)booleancanInsert(int slot, net.minecraft.item.ItemStack stack, net.minecraft.util.math.Direction dir)int[]getAvailableSlots(net.minecraft.util.math.Direction dir)protected voidresetSlotsTo(int[][] slotMap)Discards the currentavailableSlotsarray and replaces it with the given slot map.protected voidDiscards the currentavailableSlotsarray and replaces it with one that exposes all slots in every direction.Methods inherited from class alexiil.mc.lib.attributes.item.compat.InventoryFixedWrapperclear, getStack, getWrapped, isEmpty, isValid, markDirty, removeStack, removeStack, setStack, size, softSetInvStackMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.util.ClearableclearMethods inherited from interface net.minecraft.inventory.InventorycanPlayerUse, containsAny, count, getMaxCountPerStack, getStack, isEmpty, isValid, markDirty, onClose, onOpen, removeStack, removeStack, setStack, size
- 
Constructor Details- 
SidedInventoryFixedWrapperCreates aSidedInventoryFixedWrapperwith all of it's slots exposed in every direction.
- 
SidedInventoryFixedWrapper- Parameters:
- inv- The- FixedItemInvto wrap.
- slotMap- The slots to map. There are 3 different possible lengths you can give for this:- Null or 0: Every slot is available from every direction.
- 6: Every slot is available from the null direction, and the other slots are direct maps for a Direction.ordinal().
- 7: index 0-5 are for their respective Enum.ordinal(), and index 6 is for the null direction.
 
 
 
- 
- 
Method Details- 
resetSlotsToAllprotected void resetSlotsToAll()Discards the currentavailableSlotsarray and replaces it with one that exposes all slots in every direction.
- 
resetSlotsToprotected void resetSlotsTo(int[][] slotMap)Discards the currentavailableSlotsarray and replaces it with the given slot map.- Parameters:
- slotMap- The slots to map. There are 3 different possible lengths you can give for this:- Null or 0: Every slot is available from every direction.
- 6: Every slot is available from the null direction, and the other slots are direct maps for a Direction.ordinal().
- 7: index 0-5 are for their respective Enum.ordinal(), and index 6 is for the null direction.
 
 
- 
getAvailableSlotspublic int[] getAvailableSlots(net.minecraft.util.math.Direction dir)- Specified by:
- getAvailableSlotsin interface- net.minecraft.inventory.SidedInventory
 
- 
canInsertpublic boolean canInsert(int slot, net.minecraft.item.ItemStack stack, net.minecraft.util.math.Direction dir)- Specified by:
- canInsertin interface- net.minecraft.inventory.SidedInventory
 
- 
canExtractpublic boolean canExtract(int slot, net.minecraft.item.ItemStack stack, net.minecraft.util.math.Direction dir)- Specified by:
- canExtractin interface- net.minecraft.inventory.SidedInventory
 
 
-