Class ArmorSidePanelSlot

java.lang.Object
net.minecraft.world.inventory.Slot
com.hbm_m.armormod.menu.ArmorSidePanelSlot

public class ArmorSidePanelSlot extends net.minecraft.world.inventory.Slot
  • Field Summary

    Fields inherited from class net.minecraft.world.inventory.Slot

    container, index, x, y
  • Constructor Summary

    Constructors
    Constructor
    Description
    ArmorSidePanelSlot(net.minecraft.world.entity.player.Inventory pContainer, int pIndex, int pX, int pY, net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.EquipmentSlot slotType)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    boolean
    mayPlace(net.minecraft.world.item.ItemStack stack)
     
    void
    onTake(net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.item.ItemStack pStack)
    Вызывается, когда игрок забирает предмет из слота.
    void
    set(net.minecraft.world.item.ItemStack pStack)
    Переопределяем метод set, чтобы отловить момент установки предмета.

    Methods inherited from class net.minecraft.world.inventory.Slot

    allowModification, checkTakeAchievements, getContainerSlot, getItem, getMaxStackSize, getNoItemIcon, getSlotIndex, hasItem, isActive, isHighlightable, isSameInventory, mayPickup, onQuickCraft, onQuickCraft, onSwapCraft, remove, safeInsert, safeInsert, safeTake, setBackground, setByPlayer, setChanged, tryRemove

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ArmorSidePanelSlot

      public ArmorSidePanelSlot(net.minecraft.world.entity.player.Inventory pContainer, int pIndex, int pX, int pY, net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.EquipmentSlot slotType)
  • Method Details

    • onTake

      public void onTake(net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.item.ItemStack pStack)
      Вызывается, когда игрок забирает предмет из слота. Это наше событие "снятия" брони.
      Overrides:
      onTake in class net.minecraft.world.inventory.Slot
    • set

      public void set(net.minecraft.world.item.ItemStack pStack)
      Переопределяем метод set, чтобы отловить момент установки предмета. Это наше событие "надевания" брони.
      Overrides:
      set in class net.minecraft.world.inventory.Slot
    • mayPlace

      public boolean mayPlace(net.minecraft.world.item.ItemStack stack)
      Overrides:
      mayPlace in class net.minecraft.world.inventory.Slot
    • getMaxStackSize

      public int getMaxStackSize()
      Overrides:
      getMaxStackSize in class net.minecraft.world.inventory.Slot