Package net.minecraft.inventory
Class SimpleInventory
java.lang.Object
net.minecraft.inventory.SimpleInventory
- Direct Known Subclasses:
AnimalInventory,ClientNetworkSyncedInventory,EnderChestInventory
public class SimpleInventory extends Object implements Inventory
- Mappings:
Namespace Name official oqintermediary net/minecraft/class_1727named net/minecraft/inventory/SimpleInventory
-
Field Summary
Fields Modifier and Type Field Description private booleanhasCustomNameprivate ItemStack[]inventoryprivate List<SimpleInventoryListener>listenersprivate Stringnameprivate intsize -
Constructor Summary
Constructors Constructor Description SimpleInventory(String name, boolean hasCustomName, int size)SimpleInventory(Text text, int id) -
Method Summary
Modifier and Type Method Description voidaddListener(SimpleInventoryListener listener)booleancanPlayerUseInv(PlayerEntity player)voidclear()ItemStackfillInventoryWith(ItemStack stack)intgetInvMaxStackAmount()intgetInvSize()ItemStackgetInvStack(int slot)TextgetName()intgetProperties()intgetProperty(int key)StringgetTranslationKey()booleanhasCustomName()booleanisValidInvStack(int slot, ItemStack stack)voidmarkDirty()voidonInvClose(PlayerEntity player)voidonInvOpen(PlayerEntity player)ItemStackremoveInvStack(int slot)voidremoveListener(SimpleInventoryListener listener)voidsetInvStack(int slot, ItemStack stack)voidsetName(String name)voidsetProperty(int id, int value)ItemStacktakeInvStack(int slot, int amount)
-
Field Details
-
name
- Mappings:
Namespace Name Mixin selector official aLoq;a:Ljava/lang/String;intermediary field_7216Lnet/minecraft/class_1727;field_7216:Ljava/lang/String;named nameLnet/minecraft/inventory/SimpleInventory;name:Ljava/lang/String;
-
size
private int size- Mappings:
Namespace Name Mixin selector official bLoq;b:Iintermediary field_7217Lnet/minecraft/class_1727;field_7217:Inamed sizeLnet/minecraft/inventory/SimpleInventory;size:I
-
inventory
- Mappings:
Namespace Name Mixin selector official cLoq;c:[Lzx;intermediary field_7218Lnet/minecraft/class_1727;field_7218:[Lnet/minecraft/class_2056;named inventoryLnet/minecraft/inventory/SimpleInventory;inventory:[Lnet/minecraft/item/ItemStack;
-
listeners
- Mappings:
Namespace Name Mixin selector official dLoq;d:Ljava/util/List;intermediary field_7219Lnet/minecraft/class_1727;field_7219:Ljava/util/List;named listenersLnet/minecraft/inventory/SimpleInventory;listeners:Ljava/util/List;
-
hasCustomName
private boolean hasCustomName- Mappings:
Namespace Name Mixin selector official eLoq;e:Zintermediary field_7220Lnet/minecraft/class_1727;field_7220:Znamed hasCustomNameLnet/minecraft/inventory/SimpleInventory;hasCustomName:Z
-
-
Constructor Details
-
SimpleInventory
- Mappings:
Namespace Name Mixin selector official <init>Loq;<init>(Ljava/lang/String;ZI)Vintermediary <init>Lnet/minecraft/class_1727;<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>Loq;<init>(Leu;I)Vintermediary <init>Lnet/minecraft/class_1727;<init>(Lnet/minecraft/class_1444;I)Vnamed <init>Lnet/minecraft/inventory/SimpleInventory;<init>(Lnet/minecraft/text/Text;I)V
-
-
Method Details
-
addListener
- Mappings:
Namespace Name Mixin selector official aLoq;a(Loh;)Vintermediary method_6772Lnet/minecraft/class_1727;method_6772(Lnet/minecraft/class_1719;)Vnamed addListenerLnet/minecraft/inventory/SimpleInventory;addListener(Lnet/minecraft/inventory/SimpleInventoryListener;)V
-
removeListener
- Mappings:
Namespace Name Mixin selector official bLoq;b(Loh;)Vintermediary method_6774Lnet/minecraft/class_1727;method_6774(Lnet/minecraft/class_1719;)Vnamed removeListenerLnet/minecraft/inventory/SimpleInventory;removeListener(Lnet/minecraft/inventory/SimpleInventoryListener;)V
-
getInvStack
- Specified by:
getInvStackin interfaceInventory- Mappings:
Namespace Name Mixin selector official aLog;a(I)Lzx;intermediary method_6736Lnet/minecraft/class_1718;method_6736(I)Lnet/minecraft/class_2056;named getInvStackLnet/minecraft/inventory/Inventory;getInvStack(I)Lnet/minecraft/item/ItemStack;
-
takeInvStack
- Specified by:
takeInvStackin interfaceInventory- Mappings:
Namespace Name Mixin selector official aLog;a(II)Lzx;intermediary method_6737Lnet/minecraft/class_1718;method_6737(II)Lnet/minecraft/class_2056;named takeInvStackLnet/minecraft/inventory/Inventory;takeInvStack(II)Lnet/minecraft/item/ItemStack;
-
fillInventoryWith
- Mappings:
Namespace Name Mixin selector official aLoq;a(Lzx;)Lzx;intermediary method_6773Lnet/minecraft/class_1727;method_6773(Lnet/minecraft/class_2056;)Lnet/minecraft/class_2056;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 bLog;b(I)Lzx;intermediary method_6741Lnet/minecraft/class_1718;method_6741(I)Lnet/minecraft/class_2056;named removeInvStackLnet/minecraft/inventory/Inventory;removeInvStack(I)Lnet/minecraft/item/ItemStack;
-
setInvStack
- Specified by:
setInvStackin interfaceInventory- Mappings:
Namespace Name Mixin selector official aLog;a(ILzx;)Vintermediary method_6738Lnet/minecraft/class_1718;method_6738(ILnet/minecraft/class_2056;)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 o_Log;o_()Iintermediary method_6748Lnet/minecraft/class_1718;method_6748()Inamed getInvSizeLnet/minecraft/inventory/Inventory;getInvSize()I
-
getTranslationKey
- Specified by:
getTranslationKeyin interfaceNameable- Mappings:
Namespace Name Mixin selector official e_Lop;e_()Ljava/lang/String;intermediary method_6261Lnet/minecraft/class_1726;method_6261()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 l_Lop;l_()Zintermediary method_6770Lnet/minecraft/class_1726;method_6770()Znamed hasCustomNameLnet/minecraft/text/Nameable;hasCustomName()Z
-
setName
- Mappings:
Namespace Name Mixin selector official aLoq;a(Ljava/lang/String;)Vintermediary method_6771Lnet/minecraft/class_1727;method_6771(Ljava/lang/String;)Vnamed setNameLnet/minecraft/inventory/SimpleInventory;setName(Ljava/lang/String;)V
-
getName
-
getInvMaxStackAmount
public int getInvMaxStackAmount()- Specified by:
getInvMaxStackAmountin interfaceInventory- Mappings:
Namespace Name Mixin selector official q_Log;q_()Iintermediary method_6749Lnet/minecraft/class_1718;method_6749()Inamed getInvMaxStackAmountLnet/minecraft/inventory/Inventory;getInvMaxStackAmount()I
-
markDirty
public void markDirty() -
canPlayerUseInv
- Specified by:
canPlayerUseInvin interfaceInventory- Mappings:
Namespace Name Mixin selector official aLog;a(Lwn;)Zintermediary method_6739Lnet/minecraft/class_1718;method_6739(Lnet/minecraft/class_1963;)Znamed canPlayerUseInvLnet/minecraft/inventory/Inventory;canPlayerUseInv(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
onInvOpen
- Specified by:
onInvOpenin interfaceInventory- Mappings:
Namespace Name Mixin selector official bLog;b(Lwn;)Vintermediary method_6744Lnet/minecraft/class_1718;method_6744(Lnet/minecraft/class_1963;)Vnamed onInvOpenLnet/minecraft/inventory/Inventory;onInvOpen(Lnet/minecraft/entity/player/PlayerEntity;)V
-
onInvClose
- Specified by:
onInvClosein interfaceInventory- Mappings:
Namespace Name Mixin selector official cLog;c(Lwn;)Vintermediary method_6745Lnet/minecraft/class_1718;method_6745(Lnet/minecraft/class_1963;)Vnamed onInvCloseLnet/minecraft/inventory/Inventory;onInvClose(Lnet/minecraft/entity/player/PlayerEntity;)V
-
isValidInvStack
- Specified by:
isValidInvStackin interfaceInventory- Mappings:
Namespace Name Mixin selector official bLog;b(ILzx;)Zintermediary method_6743Lnet/minecraft/class_1718;method_6743(ILnet/minecraft/class_2056;)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 a_Log;a_(I)Iintermediary method_6740Lnet/minecraft/class_1718;method_6740(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 bLog;b(II)Vintermediary method_6742Lnet/minecraft/class_1718;method_6742(II)Vnamed setPropertyLnet/minecraft/inventory/Inventory;setProperty(II)V
-
getProperties
public int getProperties()- Specified by:
getPropertiesin interfaceInventory- Mappings:
Namespace Name Mixin selector official gLog;g()Iintermediary method_6746Lnet/minecraft/class_1718;method_6746()Inamed getPropertiesLnet/minecraft/inventory/Inventory;getProperties()I
-
clear
public void clear()
-