Class SlotRepairable
java.lang.Object
net.minecraft.world.inventory.Slot
org.cyclops.evilcraft.inventory.slot.SlotRepairable
public class SlotRepairable
extends net.minecraft.world.inventory.Slot
A slot that only accepts repairable items.
-
Field Summary
Fields inherited from class net.minecraft.world.inventory.Slot
container, index, x, y -
Constructor Summary
ConstructorsConstructorDescriptionSlotRepairable(net.minecraft.world.Container inventory, int index, int x, int y) Make a new instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckIsItemValid(net.minecraft.world.item.ItemStack itemStack) Check if the given item is valid for this slot type.booleanmayPlace(net.minecraft.world.item.ItemStack itemStack) Methods inherited from class net.minecraft.world.inventory.Slot
allowModification, checkTakeAchievements, getContainerSlot, getItem, getMaxStackSize, getMaxStackSize, getNoItemIcon, getSlotIndex, hasItem, initialize, isActive, isSameInventory, mayPickup, onQuickCraft, onQuickCraft, onSwapCraft, onTake, remove, safeInsert, safeInsert, safeTake, set, setBackground, setChanged, tryRemove
-
Constructor Details
-
SlotRepairable
public SlotRepairable(net.minecraft.world.Container inventory, int index, int x, int y) Make a new instance.- Parameters:
inventory- The inventory this slot will be in.index- The index of this slot.x- X coordinate.y- Y coordinate.
-
-
Method Details
-
mayPlace
public boolean mayPlace(net.minecraft.world.item.ItemStack itemStack) - Overrides:
mayPlacein classnet.minecraft.world.inventory.Slot
-
checkIsItemValid
public static boolean checkIsItemValid(net.minecraft.world.item.ItemStack itemStack) Check if the given item is valid for this slot type.- Parameters:
itemStack- The item that will be checked.- Returns:
- If the given item is valid.
-