Class SlotFixedItemInv
java.lang.Object
net.minecraft.screen.slot.Slot
alexiil.mc.lib.attributes.item.compat.SlotFixedItemInv
- All Implemented Interfaces:
Convertible
-
Field Summary
Fields inherited from class net.minecraft.screen.slot.Slot
id, inventory, x, y
-
Constructor Summary
ConstructorDescriptionSlotFixedItemInv
(net.minecraft.screen.ScreenHandler container, FixedItemInv inv, boolean server, int slotIndex, int x, int y) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canInsert
(net.minecraft.item.ItemStack stack) <T> T
Attempts to provide a variant of this in the given class form.int
getMaxItemCount
(net.minecraft.item.ItemStack stack) void
setStack
(net.minecraft.item.ItemStack stack) Methods inherited from class net.minecraft.screen.slot.Slot
canTakeItems, canTakePartial, getBackgroundSprite, getIndex, getMaxItemCount, getStack, hasStack, insertStack, insertStack, isEnabled, markDirty, onCrafted, onCrafted, onQuickTransfer, onTake, onTakeItem, setStackNoCallbacks, takeStack, takeStackRange, tryTakeStackRange
-
Field Details
-
inv
-
slotIndex
public final int slotIndex -
server
public final boolean server
-
-
Constructor Details
-
SlotFixedItemInv
public SlotFixedItemInv(net.minecraft.screen.ScreenHandler container, FixedItemInv inv, boolean server, int slotIndex, int x, int y)
-
-
Method Details
-
canInsert
public boolean canInsert(net.minecraft.item.ItemStack stack) - Overrides:
canInsert
in classnet.minecraft.screen.slot.Slot
-
getMaxItemCount
public int getMaxItemCount(net.minecraft.item.ItemStack stack) - Overrides:
getMaxItemCount
in classnet.minecraft.screen.slot.Slot
-
setStack
public void setStack(net.minecraft.item.ItemStack stack) - Overrides:
setStack
in classnet.minecraft.screen.slot.Slot
-
convertTo
Description copied from interface:Convertible
Attempts to provide a variant of this in the given class form. This does not have to return "this" object if this is already an instance of the given class.Note: In order to be typesafe (and prevent crashes) it is recommended that you return
Class.cast(Object)
with the object you wish to return rather than just blindly cast to "T".- Specified by:
convertTo
in interfaceConvertible
-