Package net.minecraft.inventory
Class SimpleInventory
java.lang.Object
net.minecraft.inventory.SimpleInventory
- Direct Known Subclasses:
AnimalInventory,ClientNetworkSyncedInventory,EnderChestInventory
- Mappings:
Namespace Name official ukintermediary net/minecraft/class_852named net/minecraft/inventory/SimpleInventory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DefaultedList<ItemStack>private booleanprivate List<SimpleInventoryListener>private Stringprivate final int -
Constructor Summary
ConstructorsConstructorDescriptionSimpleInventory(String name, boolean hasCustomName, int size) SimpleInventory(Text text, int id) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(SimpleInventoryListener listener) booleancanPlayerUseInv(PlayerEntity player) voidclear()fillInventoryWith(ItemStack stack) intintgetInvStack(int slot) intintgetProperty(int key) booleanbooleanisEmpty()booleanisValidInvStack(int slot, ItemStack stack) voidvoidonInvClose(PlayerEntity player) voidonInvOpen(PlayerEntity player) removeInvStack(int slot) voidremoveListener(SimpleInventoryListener listener) voidsetInvStack(int slot, ItemStack stack) voidvoidsetProperty(int id, int value) takeInvStack(int slot, int amount)
-
Field Details
-
name
- Mappings:
Namespace Name Mixin selector official aLuk;a:Ljava/lang/String;intermediary field_3115Lnet/minecraft/class_852;field_3115:Ljava/lang/String;named nameLnet/minecraft/inventory/SimpleInventory;name:Ljava/lang/String;
-
size
private final int size- Mappings:
Namespace Name Mixin selector official bLuk;b:Iintermediary field_3116Lnet/minecraft/class_852;field_3116:Inamed sizeLnet/minecraft/inventory/SimpleInventory;size:I
-
field_15440
- Mappings:
Namespace Name Mixin selector official cLuk;c:Lfi;intermediary field_15440Lnet/minecraft/class_852;field_15440:Lnet/minecraft/class_3114;named field_15440Lnet/minecraft/inventory/SimpleInventory;field_15440:Lnet/minecraft/util/collection/DefaultedList;
-
listeners
- Mappings:
Namespace Name Mixin selector official dLuk;d:Ljava/util/List;intermediary field_3118Lnet/minecraft/class_852;field_3118:Ljava/util/List;named listenersLnet/minecraft/inventory/SimpleInventory;listeners:Ljava/util/List;
-
hasCustomName
private boolean hasCustomName- Mappings:
Namespace Name Mixin selector official eLuk;e:Zintermediary field_6098Lnet/minecraft/class_852;field_6098:Znamed hasCustomNameLnet/minecraft/inventory/SimpleInventory;hasCustomName:Z
-
-
Constructor Details
-
SimpleInventory
- Mappings:
Namespace Name Mixin selector official <init>Luk;<init>(Ljava/lang/String;ZI)Vintermediary <init>Lnet/minecraft/class_852;<init>(Ljava/lang/String;ZI)Vnamed <init>Lnet/minecraft/inventory/SimpleInventory;<init>(Ljava/lang/String;ZI)V
-
SimpleInventory
- Mappings:
Namespace Name Mixin selector official <init>Luk;<init>(Lhh;I)Vintermediary <init>Lnet/minecraft/class_852;<init>(Lnet/minecraft/class_1982;I)Vnamed <init>Lnet/minecraft/inventory/SimpleInventory;<init>(Lnet/minecraft/text/Text;I)V
-
-
Method Details
-
addListener
- Mappings:
Namespace Name Mixin selector official aLuk;a(Ltx;)Vintermediary method_6072Lnet/minecraft/class_852;method_6072(Lnet/minecraft/class_850;)Vnamed addListenerLnet/minecraft/inventory/SimpleInventory;addListener(Lnet/minecraft/inventory/SimpleInventoryListener;)V
-
removeListener
- Mappings:
Namespace Name Mixin selector official bLuk;b(Ltx;)Vintermediary method_6073Lnet/minecraft/class_852;method_6073(Lnet/minecraft/class_850;)Vnamed removeListenerLnet/minecraft/inventory/SimpleInventory;removeListener(Lnet/minecraft/inventory/SimpleInventoryListener;)V
-
getInvStack
- Specified by:
getInvStackin interfaceInventory- Mappings:
Namespace Name Mixin selector official aLtv;a(I)Laip;intermediary method_2381Lnet/minecraft/class_849;method_2381(I)Lnet/minecraft/class_1071;named getInvStackLnet/minecraft/inventory/Inventory;getInvStack(I)Lnet/minecraft/item/ItemStack;
-
takeInvStack
- Specified by:
takeInvStackin interfaceInventory- Mappings:
Namespace Name Mixin selector official aLtv;a(II)Laip;intermediary method_2382Lnet/minecraft/class_849;method_2382(II)Lnet/minecraft/class_1071;named takeInvStackLnet/minecraft/inventory/Inventory;takeInvStack(II)Lnet/minecraft/item/ItemStack;
-
fillInventoryWith
- Mappings:
Namespace Name Mixin selector official aLuk;a(Laip;)Laip;intermediary method_10914Lnet/minecraft/class_852;method_10914(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1071;named fillInventoryWithLnet/minecraft/inventory/SimpleInventory;fillInventoryWith(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;
-
removeInvStack
- Specified by:
removeInvStackin interfaceInventory- Mappings:
Namespace Name Mixin selector official c_Ltv;c_(I)Laip;intermediary method_2386Lnet/minecraft/class_849;method_2386(I)Lnet/minecraft/class_1071;named removeInvStackLnet/minecraft/inventory/Inventory;removeInvStack(I)Lnet/minecraft/item/ItemStack;
-
setInvStack
- Specified by:
setInvStackin interfaceInventory- Mappings:
Namespace Name Mixin selector official aLtv;a(ILaip;)Vintermediary method_2383Lnet/minecraft/class_849;method_2383(ILnet/minecraft/class_1071;)Vnamed setInvStackLnet/minecraft/inventory/Inventory;setInvStack(ILnet/minecraft/item/ItemStack;)V
-
getInvSize
public int getInvSize()- Specified by:
getInvSizein interfaceInventory- Mappings:
Namespace Name Mixin selector official w_Ltv;w_()Iintermediary method_2388Lnet/minecraft/class_849;method_2388()Inamed getInvSizeLnet/minecraft/inventory/Inventory;getInvSize()I
-
isEmpty
public boolean isEmpty() -
getTranslationKey
- Specified by:
getTranslationKeyin interfaceNameable- Mappings:
Namespace Name Mixin selector official h_Lui;h_()Ljava/lang/String;intermediary method_2518Lnet/minecraft/class_2611;method_2518()Ljava/lang/String;named getTranslationKeyLnet/minecraft/text/Nameable;getTranslationKey()Ljava/lang/String;
-
hasCustomName
public boolean hasCustomName()- Specified by:
hasCustomNamein interfaceNameable- Mappings:
Namespace Name Mixin selector official n_Lui;n_()Zintermediary method_5339Lnet/minecraft/class_2611;method_5339()Znamed hasCustomNameLnet/minecraft/text/Nameable;hasCustomName()Z
-
setName
- Mappings:
Namespace Name Mixin selector official aLuk;a(Ljava/lang/String;)Vintermediary method_6071Lnet/minecraft/class_852;method_6071(Ljava/lang/String;)Vnamed setNameLnet/minecraft/inventory/SimpleInventory;setName(Ljava/lang/String;)V
-
method_6344
- Specified by:
method_6344in interfaceNameable- Mappings:
Namespace Name Mixin selector official i_Lui;i_()Lhh;intermediary method_6344Lnet/minecraft/class_2611;method_6344()Lnet/minecraft/class_1982;named method_6344Lnet/minecraft/text/Nameable;method_6344()Lnet/minecraft/text/Text;
-
getInvMaxStackAmount
public int getInvMaxStackAmount()- Specified by:
getInvMaxStackAmountin interfaceInventory- Mappings:
Namespace Name Mixin selector official z_Ltv;z_()Iintermediary method_2389Lnet/minecraft/class_849;method_2389()Inamed getInvMaxStackAmountLnet/minecraft/inventory/Inventory;getInvMaxStackAmount()I
-
markDirty
public void markDirty() -
canPlayerUseInv
- Specified by:
canPlayerUseInvin interfaceInventory- Mappings:
Namespace Name Mixin selector official aLtv;a(Laed;)Zintermediary method_2384Lnet/minecraft/class_849;method_2384(Lnet/minecraft/class_988;)Znamed canPlayerUseInvLnet/minecraft/inventory/Inventory;canPlayerUseInv(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
onInvOpen
- Specified by:
onInvOpenin interfaceInventory- Mappings:
Namespace Name Mixin selector official bLtv;b(Laed;)Vintermediary method_10894Lnet/minecraft/class_849;method_10894(Lnet/minecraft/class_988;)Vnamed onInvOpenLnet/minecraft/inventory/Inventory;onInvOpen(Lnet/minecraft/entity/player/PlayerEntity;)V
-
onInvClose
- Specified by:
onInvClosein interfaceInventory- Mappings:
Namespace Name Mixin selector official cLtv;c(Laed;)Vintermediary method_10895Lnet/minecraft/class_849;method_10895(Lnet/minecraft/class_988;)Vnamed onInvCloseLnet/minecraft/inventory/Inventory;onInvClose(Lnet/minecraft/entity/player/PlayerEntity;)V
-
isValidInvStack
- Specified by:
isValidInvStackin interfaceInventory- Mappings:
Namespace Name Mixin selector official bLtv;b(ILaip;)Zintermediary method_5338Lnet/minecraft/class_849;method_5338(ILnet/minecraft/class_1071;)Znamed isValidInvStackLnet/minecraft/inventory/Inventory;isValidInvStack(ILnet/minecraft/item/ItemStack;)Z
-
getProperty
public int getProperty(int key) - Specified by:
getPropertyin interfaceInventory- Mappings:
Namespace Name Mixin selector official cLtv;c(I)Iintermediary method_10892Lnet/minecraft/class_849;method_10892(I)Inamed getPropertyLnet/minecraft/inventory/Inventory;getProperty(I)I
-
setProperty
public void setProperty(int id, int value) - Specified by:
setPropertyin interfaceInventory- Mappings:
Namespace Name Mixin selector official bLtv;b(II)Vintermediary method_10893Lnet/minecraft/class_849;method_10893(II)Vnamed setPropertyLnet/minecraft/inventory/Inventory;setProperty(II)V
-
getProperties
public int getProperties()- Specified by:
getPropertiesin interfaceInventory- Mappings:
Namespace Name Mixin selector official hLtv;h()Iintermediary method_10896Lnet/minecraft/class_849;method_10896()Inamed getPropertiesLnet/minecraft/inventory/Inventory;getProperties()I
-
clear
public void clear()
-