Class SlotFixedItemInv
java.lang.Object
net.minecraft.screen.slot.Slot
alexiil.mc.lib.attributes.item.compat.SlotFixedItemInv
- All Implemented Interfaces:
Convertible
public class SlotFixedItemInv extends net.minecraft.screen.slot.Slot implements Convertible
-
Field Summary
Fields Modifier and Type Field Description FixedItemInv
inv
boolean
server
int
slotIndex
-
Constructor Summary
Constructors Constructor Description SlotFixedItemInv(net.minecraft.screen.ScreenHandler container, FixedItemInv inv, boolean server, int slotIndex, int x, int y)
-
Method Summary
Modifier and Type Method Description boolean
canInsert(net.minecraft.item.ItemStack stack)
<T> T
convertTo(java.lang.Class<T> otherType)
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)
-
Field Details
-
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
public <T> T convertTo(java.lang.Class<T> otherType)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
-