Package net.minecraft.world.inventory
Class ArmorSlot
java.lang.Object
net.minecraft.world.inventory.Slot
net.minecraft.world.inventory.ArmorSlot
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResourceLocation
private final LivingEntity
private final EquipmentSlot
-
Constructor Summary
ConstructorsConstructorDescriptionArmorSlot
(Container pContainer, LivingEntity pOwner, EquipmentSlot pSlot, int pSlotIndex, int pX, int pY, ResourceLocation pEmptyIcon) -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
isActive()
boolean
Return whether this slot's stack can be taken from this slot.boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.void
setByPlayer
(ItemStack pNewStack, ItemStack pOldStack) Methods inherited from class net.minecraft.world.inventory.Slot
allowModification, checkTakeAchievements, getContainerSlot, getItem, getMaxStackSize, getSlotIndex, hasItem, isFake, isHighlightable, isSameInventory, onQuickCraft, onQuickCraft, onSwapCraft, onTake, remove, safeInsert, safeInsert, safeTake, set, setBackground, setByPlayer, setChanged, tryRemove
-
Field Details
-
owner
-
slot
-
emptyIcon
-
-
Constructor Details
-
ArmorSlot
public ArmorSlot(Container pContainer, LivingEntity pOwner, EquipmentSlot pSlot, int pSlotIndex, int pX, int pY, @Nullable ResourceLocation pEmptyIcon)
-
-
Method Details
-
setByPlayer
- Overrides:
setByPlayer
in classSlot
-
getMaxStackSize
public int getMaxStackSize()- Overrides:
getMaxStackSize
in classSlot
-
mayPlace
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel. -
isActive
public boolean isActive() -
mayPickup
Return whether this slot's stack can be taken from this slot. -
getNoItemIcon
- Overrides:
getNoItemIcon
in classSlot
-