Package com.hbm_m.armormod.menu
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
ConstructorsConstructorDescriptionArmorSidePanelSlot(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 TypeMethodDescriptionintbooleanmayPlace(net.minecraft.world.item.ItemStack stack) voidonTake(net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.item.ItemStack pStack) Вызывается, когда игрок забирает предмет из слота.voidset(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
-
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:
onTakein classnet.minecraft.world.inventory.Slot
-
set
public void set(net.minecraft.world.item.ItemStack pStack) Переопределяем метод set, чтобы отловить момент установки предмета. Это наше событие "надевания" брони.- Overrides:
setin classnet.minecraft.world.inventory.Slot
-
mayPlace
public boolean mayPlace(net.minecraft.world.item.ItemStack stack) - Overrides:
mayPlacein classnet.minecraft.world.inventory.Slot
-
getMaxStackSize
public int getMaxStackSize()- Overrides:
getMaxStackSizein classnet.minecraft.world.inventory.Slot
-