Class PlayerInventory

java.lang.Object
net.minecraft.entity.player.PlayerInventory
All Implemented Interfaces:
Inventory, Nameable

public class PlayerInventory
extends Object
implements Inventory
Mappings:
Namespace Name
official wm
intermediary net/minecraft/class_1962
named net/minecraft/entity/player/PlayerInventory
  • Field Details

    • main

      public ItemStack[] main
      Mappings:
      Namespace Name Mixin selector
      official a Lwm;a:[Lzx;
      intermediary field_8314 Lnet/minecraft/class_1962;field_8314:[Lnet/minecraft/class_2056;
      named main Lnet/minecraft/entity/player/PlayerInventory;main:[Lnet/minecraft/item/ItemStack;
    • armor

      public ItemStack[] armor
      Mappings:
      Namespace Name Mixin selector
      official b Lwm;b:[Lzx;
      intermediary field_8315 Lnet/minecraft/class_1962;field_8315:[Lnet/minecraft/class_2056;
      named armor Lnet/minecraft/entity/player/PlayerInventory;armor:[Lnet/minecraft/item/ItemStack;
    • selectedSlot

      public int selectedSlot
      Mappings:
      Namespace Name Mixin selector
      official c Lwm;c:I
      intermediary field_8316 Lnet/minecraft/class_1962;field_8316:I
      named selectedSlot Lnet/minecraft/entity/player/PlayerInventory;selectedSlot:I
    • player

      public PlayerEntity player
      Mappings:
      Namespace Name Mixin selector
      official d Lwm;d:Lwn;
      intermediary field_8317 Lnet/minecraft/class_1962;field_8317:Lnet/minecraft/class_1963;
      named player Lnet/minecraft/entity/player/PlayerInventory;player:Lnet/minecraft/entity/player/PlayerEntity;
    • cursorStack

      private ItemStack cursorStack
      Mappings:
      Namespace Name Mixin selector
      official f Lwm;f:Lzx;
      intermediary field_8319 Lnet/minecraft/class_1962;field_8319:Lnet/minecraft/class_2056;
      named cursorStack Lnet/minecraft/entity/player/PlayerInventory;cursorStack:Lnet/minecraft/item/ItemStack;
    • dirty

      public boolean dirty
      Mappings:
      Namespace Name Mixin selector
      official e Lwm;e:Z
      intermediary field_8318 Lnet/minecraft/class_1962;field_8318:Z
      named dirty Lnet/minecraft/entity/player/PlayerInventory;dirty:Z
  • Constructor Details

    • PlayerInventory

      public PlayerInventory​(PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lwm;<init>(Lwn;)V
      intermediary <init> Lnet/minecraft/class_1962;<init>(Lnet/minecraft/class_1963;)V
      named <init> Lnet/minecraft/entity/player/PlayerInventory;<init>(Lnet/minecraft/entity/player/PlayerEntity;)V
  • Method Details

    • getMainHandStack

      public ItemStack getMainHandStack()
      Mappings:
      Namespace Name Mixin selector
      official h Lwm;h()Lzx;
      intermediary method_7964 Lnet/minecraft/class_1962;method_7964()Lnet/minecraft/class_2056;
      named getMainHandStack Lnet/minecraft/entity/player/PlayerInventory;getMainHandStack()Lnet/minecraft/item/ItemStack;
    • getHotbarSize

      public static int getHotbarSize()
      Mappings:
      Namespace Name Mixin selector
      official i Lwm;i()I
      intermediary method_7965 Lnet/minecraft/class_1962;method_7965()I
      named getHotbarSize Lnet/minecraft/entity/player/PlayerInventory;getHotbarSize()I
    • method_7958

      private int method_7958​(Item item)
      Mappings:
      Namespace Name Mixin selector
      official c Lwm;c(Lzw;)I
      intermediary method_7958 Lnet/minecraft/class_1962;method_7958(Lnet/minecraft/class_2054;)I
      named method_7958 Lnet/minecraft/entity/player/PlayerInventory;method_7958(Lnet/minecraft/item/Item;)I
    • method_7949

      @Environment(CLIENT) private int method_7949​(Item item, int int2)
      Mappings:
      Namespace Name Mixin selector
      official a Lwm;a(Lzw;I)I
      intermediary method_7949 Lnet/minecraft/class_1962;method_7949(Lnet/minecraft/class_2054;I)I
      named method_7949 Lnet/minecraft/entity/player/PlayerInventory;method_7949(Lnet/minecraft/item/Item;I)I
    • method_7961

      private int method_7961​(ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official d Lwm;d(Lzx;)I
      intermediary method_7961 Lnet/minecraft/class_1962;method_7961(Lnet/minecraft/class_2056;)I
      named method_7961 Lnet/minecraft/entity/player/PlayerInventory;method_7961(Lnet/minecraft/item/ItemStack;)I
    • method_7966

      public int method_7966()
      Mappings:
      Namespace Name Mixin selector
      official j Lwm;j()I
      intermediary method_7966 Lnet/minecraft/class_1962;method_7966()I
      named method_7966 Lnet/minecraft/entity/player/PlayerInventory;method_7966()I
    • method_7951

      @Environment(CLIENT) public void method_7951​(Item item, int int2, boolean bool, boolean bool2)
      Mappings:
      Namespace Name Mixin selector
      official a Lwm;a(Lzw;IZZ)V
      intermediary method_7951 Lnet/minecraft/class_1962;method_7951(Lnet/minecraft/class_2054;IZZ)V
      named method_7951 Lnet/minecraft/entity/player/PlayerInventory;method_7951(Lnet/minecraft/item/Item;IZZ)V
    • method_7960

      @Environment(CLIENT) public void method_7960​(int int2)
      Mappings:
      Namespace Name Mixin selector
      official d Lwm;d(I)V
      intermediary method_7960 Lnet/minecraft/class_1962;method_7960(I)V
      named method_7960 Lnet/minecraft/entity/player/PlayerInventory;method_7960(I)V
    • method_7950

      public int method_7950​(Item item, int int2, int int3, CompoundTag compoundTag)
      Mappings:
      Namespace Name Mixin selector
      official a Lwm;a(Lzw;IILdn;)I
      intermediary method_7950 Lnet/minecraft/class_1962;method_7950(Lnet/minecraft/class_2054;IILnet/minecraft/class_1405;)I
      named method_7950 Lnet/minecraft/entity/player/PlayerInventory;method_7950(Lnet/minecraft/item/Item;IILnet/minecraft/nbt/CompoundTag;)I
    • method_7963

      private int method_7963​(ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official e Lwm;e(Lzx;)I
      intermediary method_7963 Lnet/minecraft/class_1962;method_7963(Lnet/minecraft/class_2056;)I
      named method_7963 Lnet/minecraft/entity/player/PlayerInventory;method_7963(Lnet/minecraft/item/ItemStack;)I
    • updateItems

      public void updateItems()
      Mappings:
      Namespace Name Mixin selector
      official k Lwm;k()V
      intermediary method_7967 Lnet/minecraft/class_1962;method_7967()V
      named updateItems Lnet/minecraft/entity/player/PlayerInventory;updateItems()V
    • method_7948

      public boolean method_7948​(Item item)
      Mappings:
      Namespace Name Mixin selector
      official a Lwm;a(Lzw;)Z
      intermediary method_7948 Lnet/minecraft/class_1962;method_7948(Lnet/minecraft/class_2054;)Z
      named method_7948 Lnet/minecraft/entity/player/PlayerInventory;method_7948(Lnet/minecraft/item/Item;)Z
    • method_7956

      public boolean method_7956​(Item item)
      Mappings:
      Namespace Name Mixin selector
      official b Lwm;b(Lzw;)Z
      intermediary method_7956 Lnet/minecraft/class_1962;method_7956(Lnet/minecraft/class_2054;)Z
      named method_7956 Lnet/minecraft/entity/player/PlayerInventory;method_7956(Lnet/minecraft/item/Item;)Z
    • insertStack

      public boolean insertStack​(ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official a Lwm;a(Lzx;)Z
      intermediary method_7952 Lnet/minecraft/class_1962;method_7952(Lnet/minecraft/class_2056;)Z
      named insertStack Lnet/minecraft/entity/player/PlayerInventory;insertStack(Lnet/minecraft/item/ItemStack;)Z
    • takeInvStack

      public ItemStack takeInvStack​(int slot, int amount)
      Specified by:
      takeInvStack in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(II)Lzx;
      intermediary method_6737 Lnet/minecraft/class_1718;method_6737(II)Lnet/minecraft/class_2056;
      named takeInvStack Lnet/minecraft/inventory/Inventory;takeInvStack(II)Lnet/minecraft/item/ItemStack;
    • removeInvStack

      public ItemStack removeInvStack​(int slot)
      Specified by:
      removeInvStack in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official b Log;b(I)Lzx;
      intermediary method_6741 Lnet/minecraft/class_1718;method_6741(I)Lnet/minecraft/class_2056;
      named removeInvStack Lnet/minecraft/inventory/Inventory;removeInvStack(I)Lnet/minecraft/item/ItemStack;
    • setInvStack

      public void setInvStack​(int slot, ItemStack stack)
      Specified by:
      setInvStack in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(ILzx;)V
      intermediary method_6738 Lnet/minecraft/class_1718;method_6738(ILnet/minecraft/class_2056;)V
      named setInvStack Lnet/minecraft/inventory/Inventory;setInvStack(ILnet/minecraft/item/ItemStack;)V
    • getMiningSpeed

      public float getMiningSpeed​(Block block)
      Mappings:
      Namespace Name Mixin selector
      official a Lwm;a(Lafh;)F
      intermediary method_7946 Lnet/minecraft/class_1962;method_7946(Lnet/minecraft/class_160;)F
      named getMiningSpeed Lnet/minecraft/entity/player/PlayerInventory;getMiningSpeed(Lnet/minecraft/block/Block;)F
    • serialize

      public ListTag serialize​(ListTag tag)
      Mappings:
      Namespace Name Mixin selector
      official a Lwm;a(Ldu;)Ldu;
      intermediary method_7947 Lnet/minecraft/class_1962;method_7947(Lnet/minecraft/class_1411;)Lnet/minecraft/class_1411;
      named serialize Lnet/minecraft/entity/player/PlayerInventory;serialize(Lnet/minecraft/nbt/ListTag;)Lnet/minecraft/nbt/ListTag;
    • deserialize

      public void deserialize​(ListTag listTag)
      Mappings:
      Namespace Name Mixin selector
      official b Lwm;b(Ldu;)V
      intermediary method_7954 Lnet/minecraft/class_1962;method_7954(Lnet/minecraft/class_1411;)V
      named deserialize Lnet/minecraft/entity/player/PlayerInventory;deserialize(Lnet/minecraft/nbt/ListTag;)V
    • getInvSize

      public int getInvSize()
      Specified by:
      getInvSize in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official o_ Log;o_()I
      intermediary method_6748 Lnet/minecraft/class_1718;method_6748()I
      named getInvSize Lnet/minecraft/inventory/Inventory;getInvSize()I
    • getInvStack

      public ItemStack getInvStack​(int slot)
      Specified by:
      getInvStack in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(I)Lzx;
      intermediary method_6736 Lnet/minecraft/class_1718;method_6736(I)Lnet/minecraft/class_2056;
      named getInvStack Lnet/minecraft/inventory/Inventory;getInvStack(I)Lnet/minecraft/item/ItemStack;
    • getTranslationKey

      public String getTranslationKey()
      Specified by:
      getTranslationKey in interface Nameable
      Mappings:
      Namespace Name Mixin selector
      official e_ Lop;e_()Ljava/lang/String;
      intermediary method_6261 Lnet/minecraft/class_1726;method_6261()Ljava/lang/String;
      named getTranslationKey Lnet/minecraft/text/Nameable;getTranslationKey()Ljava/lang/String;
    • hasCustomName

      public boolean hasCustomName()
      Specified by:
      hasCustomName in interface Nameable
      Mappings:
      Namespace Name Mixin selector
      official l_ Lop;l_()Z
      intermediary method_6770 Lnet/minecraft/class_1726;method_6770()Z
      named hasCustomName Lnet/minecraft/text/Nameable;hasCustomName()Z
    • getName

      public Text getName()
      Specified by:
      getName in interface Nameable
      Mappings:
      Namespace Name Mixin selector
      official f_ Lop;f_()Leu;
      intermediary method_133 Lnet/minecraft/class_1726;method_133()Lnet/minecraft/class_1444;
      named getName Lnet/minecraft/text/Nameable;getName()Lnet/minecraft/text/Text;
    • getInvMaxStackAmount

      public int getInvMaxStackAmount()
      Specified by:
      getInvMaxStackAmount in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official q_ Log;q_()I
      intermediary method_6749 Lnet/minecraft/class_1718;method_6749()I
      named getInvMaxStackAmount Lnet/minecraft/inventory/Inventory;getInvMaxStackAmount()I
    • canToolBreak

      public boolean canToolBreak​(Block block)
      Mappings:
      Namespace Name Mixin selector
      official b Lwm;b(Lafh;)Z
      intermediary method_7953 Lnet/minecraft/class_1962;method_7953(Lnet/minecraft/class_160;)Z
      named canToolBreak Lnet/minecraft/entity/player/PlayerInventory;canToolBreak(Lnet/minecraft/block/Block;)Z
    • getArmor

      public ItemStack getArmor​(int slot)
      Mappings:
      Namespace Name Mixin selector
      official e Lwm;e(I)Lzx;
      intermediary method_7962 Lnet/minecraft/class_1962;method_7962(I)Lnet/minecraft/class_2056;
      named getArmor Lnet/minecraft/entity/player/PlayerInventory;getArmor(I)Lnet/minecraft/item/ItemStack;
    • getArmorProtectionValue

      public int getArmorProtectionValue()
      Mappings:
      Namespace Name Mixin selector
      official m Lwm;m()I
      intermediary method_7968 Lnet/minecraft/class_1962;method_7968()I
      named getArmorProtectionValue Lnet/minecraft/entity/player/PlayerInventory;getArmorProtectionValue()I
    • damageArmor

      public void damageArmor​(float armor)
      Mappings:
      Namespace Name Mixin selector
      official a Lwm;a(F)V
      intermediary method_7945 Lnet/minecraft/class_1962;method_7945(F)V
      named damageArmor Lnet/minecraft/entity/player/PlayerInventory;damageArmor(F)V
    • dropAll

      public void dropAll()
      Mappings:
      Namespace Name Mixin selector
      official n Lwm;n()V
      intermediary method_7969 Lnet/minecraft/class_1962;method_7969()V
      named dropAll Lnet/minecraft/entity/player/PlayerInventory;dropAll()V
    • markDirty

      public void markDirty()
      Specified by:
      markDirty in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official p_ Log;p_()V
      intermediary method_1103 Lnet/minecraft/class_1718;method_1103()V
      named markDirty Lnet/minecraft/inventory/Inventory;markDirty()V
    • setCursorStack

      public void setCursorStack​(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official b Lwm;b(Lzx;)V
      intermediary method_7957 Lnet/minecraft/class_1962;method_7957(Lnet/minecraft/class_2056;)V
      named setCursorStack Lnet/minecraft/entity/player/PlayerInventory;setCursorStack(Lnet/minecraft/item/ItemStack;)V
    • getCursorStack

      public ItemStack getCursorStack()
      Mappings:
      Namespace Name Mixin selector
      official p Lwm;p()Lzx;
      intermediary method_7970 Lnet/minecraft/class_1962;method_7970()Lnet/minecraft/class_2056;
      named getCursorStack Lnet/minecraft/entity/player/PlayerInventory;getCursorStack()Lnet/minecraft/item/ItemStack;
    • canPlayerUseInv

      public boolean canPlayerUseInv​(PlayerEntity player)
      Specified by:
      canPlayerUseInv in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Lwn;)Z
      intermediary method_6739 Lnet/minecraft/class_1718;method_6739(Lnet/minecraft/class_1963;)Z
      named canPlayerUseInv Lnet/minecraft/inventory/Inventory;canPlayerUseInv(Lnet/minecraft/entity/player/PlayerEntity;)Z
    • contains

      public boolean contains​(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official c Lwm;c(Lzx;)Z
      intermediary method_7959 Lnet/minecraft/class_1962;method_7959(Lnet/minecraft/class_2056;)Z
      named contains Lnet/minecraft/entity/player/PlayerInventory;contains(Lnet/minecraft/item/ItemStack;)Z
    • onInvOpen

      public void onInvOpen​(PlayerEntity player)
      Specified by:
      onInvOpen in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official b Log;b(Lwn;)V
      intermediary method_6744 Lnet/minecraft/class_1718;method_6744(Lnet/minecraft/class_1963;)V
      named onInvOpen Lnet/minecraft/inventory/Inventory;onInvOpen(Lnet/minecraft/entity/player/PlayerEntity;)V
    • onInvClose

      public void onInvClose​(PlayerEntity player)
      Specified by:
      onInvClose in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official c Log;c(Lwn;)V
      intermediary method_6745 Lnet/minecraft/class_1718;method_6745(Lnet/minecraft/class_1963;)V
      named onInvClose Lnet/minecraft/inventory/Inventory;onInvClose(Lnet/minecraft/entity/player/PlayerEntity;)V
    • isValidInvStack

      public boolean isValidInvStack​(int slot, ItemStack stack)
      Specified by:
      isValidInvStack in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official b Log;b(ILzx;)Z
      intermediary method_6743 Lnet/minecraft/class_1718;method_6743(ILnet/minecraft/class_2056;)Z
      named isValidInvStack Lnet/minecraft/inventory/Inventory;isValidInvStack(ILnet/minecraft/item/ItemStack;)Z
    • copy

      public void copy​(PlayerInventory inventory)
      Mappings:
      Namespace Name Mixin selector
      official b Lwm;b(Lwm;)V
      intermediary method_7955 Lnet/minecraft/class_1962;method_7955(Lnet/minecraft/class_1962;)V
      named copy Lnet/minecraft/entity/player/PlayerInventory;copy(Lnet/minecraft/entity/player/PlayerInventory;)V
    • getProperty

      public int getProperty​(int key)
      Specified by:
      getProperty in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official a_ Log;a_(I)I
      intermediary method_6740 Lnet/minecraft/class_1718;method_6740(I)I
      named getProperty Lnet/minecraft/inventory/Inventory;getProperty(I)I
    • setProperty

      public void setProperty​(int id, int value)
      Specified by:
      setProperty in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official b Log;b(II)V
      intermediary method_6742 Lnet/minecraft/class_1718;method_6742(II)V
      named setProperty Lnet/minecraft/inventory/Inventory;setProperty(II)V
    • getProperties

      public int getProperties()
      Specified by:
      getProperties in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official g Log;g()I
      intermediary method_6746 Lnet/minecraft/class_1718;method_6746()I
      named getProperties Lnet/minecraft/inventory/Inventory;getProperties()I
    • clear

      public void clear()
      Specified by:
      clear in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official l Log;l()V
      intermediary method_6747 Lnet/minecraft/class_1718;method_6747()V
      named clear Lnet/minecraft/inventory/Inventory;clear()V