接口 SidedInventory
-
- 所有已知实现类:
AbstractFurnaceBlockEntity,BlastFurnaceBlockEntity,BrewingStandBlockEntity,ComposterBlock.ComposterInventory,ComposterBlock.DummyInventory,ComposterBlock.FullComposterInventory,FurnaceBlockEntity,ShulkerBoxBlockEntity,SmokerBlockEntity
public interface SidedInventory extends Inventory
A special inventory interface for inventories that expose different slots for different sides, such as hoppers.- Mappings:
Namespace Name official arpintermediary net/minecraft/class_1278named net/minecraft/inventory/SidedInventory
-
-
字段概要
-
从接口继承的字段 net.minecraft.inventory.Inventory
MAX_COUNT_PER_STACK
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 booleancanExtract(int slot, ItemStack stack, Direction dir)Determines whether the given stack can be removed from this inventory at the specified slot position from the given direction.booleancanInsert(int slot, ItemStack stack, @Nullable Direction dir)Determines whether the given stack can be inserted into this inventory at the specified slot position from the given direction.int[]getAvailableSlots(Direction side)Gets the available slot positions that are reachable from a given side.-
从接口继承的方法 net.minecraft.inventory.Inventory
canPlayerUse, containsAny, count, getMaxCountPerStack, getStack, isEmpty, isValid, markDirty, onClose, onOpen, removeStack, removeStack, setStack, size
-
-
-
-
方法详细资料
-
getAvailableSlots
int[] getAvailableSlots(Direction side)
Gets the available slot positions that are reachable from a given side.- Mappings:
Namespace Name Mixin selector official aLarp;a(Lgg;)[Iintermediary method_5494Lnet/minecraft/class_1278;method_5494(Lnet/minecraft/class_2350;)[Inamed getAvailableSlotsLnet/minecraft/inventory/SidedInventory;getAvailableSlots(Lnet/minecraft/util/math/Direction;)[I
-
canInsert
boolean canInsert(int slot, ItemStack stack, @Nullable @Nullable Direction dir)Determines whether the given stack can be inserted into this inventory at the specified slot position from the given direction.- Mappings:
Namespace Name Mixin selector official aLarp;a(ILbpr;Lgg;)Zintermediary method_5492Lnet/minecraft/class_1278;method_5492(ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Znamed canInsertLnet/minecraft/inventory/SidedInventory;canInsert(ILnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/Direction;)Z
-
canExtract
boolean canExtract(int slot, ItemStack stack, Direction dir)Determines whether the given stack can be removed from this inventory at the specified slot position from the given direction.- Mappings:
Namespace Name Mixin selector official bLarp;b(ILbpr;Lgg;)Zintermediary method_5493Lnet/minecraft/class_1278;method_5493(ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Znamed canExtractLnet/minecraft/inventory/SidedInventory;canExtract(ILnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/Direction;)Z
-
-