Package net.minecraft.screen
Class ScreenHandler
java.lang.Object
net.minecraft.screen.ScreenHandler
- Direct Known Subclasses:
AnvilScreenHandler,BeaconScreenHandler,BrewingScreenHandler,ChestScreenHandler,CraftingScreenHandler,CreativeInventoryScreen.CreativeScreenHandler,EnchantingScreenHandler,FurnaceScreenHandler,Generic3x3ScreenHandler,HopperScreenHandler,HorseScreenHandler,PlayerScreenHandler,VillagerScreenHandler
public abstract class ScreenHandler extends Object
- Mappings:
Namespace Name official xiintermediary net/minecraft/class_1983named net/minecraft/screen/ScreenHandler
-
Field Summary
Fields Modifier and Type Field Description private shortactionIdprotected List<ScreenHandlerListener>listenersprivate intquickCraftButtonprivate Set<Slot>quickCraftSlotsprivate intquickCraftStageprivate Set<PlayerEntity>restrictedPlayersList<Slot>slotsintsyncIdList<ItemStack>trackedStacks -
Constructor Summary
Constructors Constructor Description ScreenHandler() -
Method Summary
Modifier and Type Method Description voidaddListener(ScreenHandlerListener listener)protected SlotaddSlot(Slot slot)static intcalculateComparatorOutput(BlockEntity entity)static intcalculateComparatorOutput(Inventory inventory)static voidcalculateStackSize(Set<Slot> slots, int rmode, ItemStack stack, int stackSize)booleancanInsertIntoSlot(Slot slot)booleancanInsertIntoSlot(ItemStack stack, Slot slot)static booleancanInsertItemIntoSlot(Slot slot, ItemStack stack, boolean bool)abstract booleancanUse(PlayerEntity player)voidclose(PlayerEntity player)protected voidendQuickCraft()shortgetNextActionId(PlayerInventory playerInventory)SlotgetSlot(int index)List<ItemStack>getStacks()protected booleaninsertItem(ItemStack stack, int startIndex, int endIndex, boolean fromLast)booleanisNotRestricted(PlayerEntity player)protected voidmethod_8096(int int2, int int3, boolean bool, PlayerEntity player)Slotmethod_8102(Inventory inventory, int int2)booleanonButtonClick(PlayerEntity player, int id)voidonContentChanged(Inventory inventory)ItemStackonSlotClick(int slotId, int clickData, int actionType, PlayerEntity player)static intpackClickData(int buttonId, int quickCraftStage)voidremoveListener(ScreenHandlerListener listener)voidsendContentUpdates()Sends updates to listeners if any properties or slot stacks have changed.voidsetPlayerRestriction(PlayerEntity player, boolean unrestricted)voidsetProperty(int id, int value)voidsetStackInSlot(int slot, ItemStack stack)static booleanshouldQuickCraftContinue(int int2, PlayerEntity player)ItemStacktransferSlot(PlayerEntity player, int invSlot)static intunpackButtonId(int clickData)static intunpackQuickCraftStage(int clickData)voidupdateSlotStacks(ItemStack[] stacks)
-
Field Details
-
trackedStacks
- Mappings:
Namespace Name Mixin selector official bLxi;b:Ljava/util/List;intermediary field_8439Lnet/minecraft/class_1983;field_8439:Ljava/util/List;named trackedStacksLnet/minecraft/screen/ScreenHandler;trackedStacks:Ljava/util/List;
-
slots
- Mappings:
Namespace Name Mixin selector official cLxi;c:Ljava/util/List;intermediary field_8440Lnet/minecraft/class_1983;field_8440:Ljava/util/List;named slotsLnet/minecraft/screen/ScreenHandler;slots:Ljava/util/List;
-
syncId
public int syncId- Mappings:
Namespace Name Mixin selector official dLxi;d:Iintermediary field_8441Lnet/minecraft/class_1983;field_8441:Inamed syncIdLnet/minecraft/screen/ScreenHandler;syncId:I
-
actionId
- Mappings:
Namespace Name Mixin selector official aLxi;a:Sintermediary field_8438Lnet/minecraft/class_1983;field_8438:Snamed actionIdLnet/minecraft/screen/ScreenHandler;actionId:S
-
quickCraftStage
private int quickCraftStage- Mappings:
Namespace Name Mixin selector official fLxi;f:Iintermediary field_8443Lnet/minecraft/class_1983;field_8443:Inamed quickCraftStageLnet/minecraft/screen/ScreenHandler;quickCraftStage:I
-
quickCraftButton
private int quickCraftButton- Mappings:
Namespace Name Mixin selector official gLxi;g:Iintermediary field_8444Lnet/minecraft/class_1983;field_8444:Inamed quickCraftButtonLnet/minecraft/screen/ScreenHandler;quickCraftButton:I
-
quickCraftSlots
- Mappings:
Namespace Name Mixin selector official hLxi;h:Ljava/util/Set;intermediary field_8445Lnet/minecraft/class_1983;field_8445:Ljava/util/Set;named quickCraftSlotsLnet/minecraft/screen/ScreenHandler;quickCraftSlots:Ljava/util/Set;
-
listeners
- Mappings:
Namespace Name Mixin selector official eLxi;e:Ljava/util/List;intermediary field_8442Lnet/minecraft/class_1983;field_8442:Ljava/util/List;named listenersLnet/minecraft/screen/ScreenHandler;listeners:Ljava/util/List;
-
restrictedPlayers
- Mappings:
Namespace Name Mixin selector official iLxi;i:Ljava/util/Set;intermediary field_8446Lnet/minecraft/class_1983;field_8446:Ljava/util/Set;named restrictedPlayersLnet/minecraft/screen/ScreenHandler;restrictedPlayers:Ljava/util/Set;
-
-
Constructor Details
-
ScreenHandler
public ScreenHandler()
-
-
Method Details
-
addSlot
- Mappings:
Namespace Name Mixin selector official aLxi;a(Lyg;)Lyg;intermediary method_8108Lnet/minecraft/class_1983;method_8108(Lnet/minecraft/class_2010;)Lnet/minecraft/class_2010;named addSlotLnet/minecraft/screen/ScreenHandler;addSlot(Lnet/minecraft/inventory/slot/Slot;)Lnet/minecraft/inventory/slot/Slot;
-
addListener
- Mappings:
Namespace Name Mixin selector official aLxi;a(Lxn;)Vintermediary method_8107Lnet/minecraft/class_1983;method_8107(Lnet/minecraft/class_1991;)Vnamed addListenerLnet/minecraft/screen/ScreenHandler;addListener(Lnet/minecraft/screen/ScreenHandlerListener;)V
-
removeListener
- Mappings:
Namespace Name Mixin selector official bLxi;b(Lxn;)Vintermediary method_8119Lnet/minecraft/class_1983;method_8119(Lnet/minecraft/class_1991;)Vnamed removeListenerLnet/minecraft/screen/ScreenHandler;removeListener(Lnet/minecraft/screen/ScreenHandlerListener;)V
-
getStacks
- Mappings:
Namespace Name Mixin selector official aLxi;a()Ljava/util/List;intermediary method_8093Lnet/minecraft/class_1983;method_8093()Ljava/util/List;named getStacksLnet/minecraft/screen/ScreenHandler;getStacks()Ljava/util/List;
-
sendContentUpdates
public void sendContentUpdates()Sends updates to listeners if any properties or slot stacks have changed.- Mappings:
Namespace Name Mixin selector official bLxi;b()Vintermediary method_8113Lnet/minecraft/class_1983;method_8113()Vnamed sendContentUpdatesLnet/minecraft/screen/ScreenHandler;sendContentUpdates()V
-
onButtonClick
- Mappings:
Namespace Name Mixin selector official aLxi;a(Lwn;I)Zintermediary method_8105Lnet/minecraft/class_1983;method_8105(Lnet/minecraft/class_1963;I)Znamed onButtonClickLnet/minecraft/screen/ScreenHandler;onButtonClick(Lnet/minecraft/entity/player/PlayerEntity;I)Z
-
method_8102
- Mappings:
Namespace Name Mixin selector official aLxi;a(Log;I)Lyg;intermediary method_8102Lnet/minecraft/class_1983;method_8102(Lnet/minecraft/class_1718;I)Lnet/minecraft/class_2010;named method_8102Lnet/minecraft/screen/ScreenHandler;method_8102(Lnet/minecraft/inventory/Inventory;I)Lnet/minecraft/inventory/slot/Slot;
-
getSlot
- Mappings:
Namespace Name Mixin selector official aLxi;a(I)Lyg;intermediary method_8094Lnet/minecraft/class_1983;method_8094(I)Lnet/minecraft/class_2010;named getSlotLnet/minecraft/screen/ScreenHandler;getSlot(I)Lnet/minecraft/inventory/slot/Slot;
-
transferSlot
- Mappings:
Namespace Name Mixin selector official bLxi;b(Lwn;I)Lzx;intermediary method_8118Lnet/minecraft/class_1983;method_8118(Lnet/minecraft/class_1963;I)Lnet/minecraft/class_2056;named transferSlotLnet/minecraft/screen/ScreenHandler;transferSlot(Lnet/minecraft/entity/player/PlayerEntity;I)Lnet/minecraft/item/ItemStack;
-
onSlotClick
- Mappings:
Namespace Name Mixin selector official aLxi;a(IIILwn;)Lzx;intermediary method_8095Lnet/minecraft/class_1983;method_8095(IIILnet/minecraft/class_1963;)Lnet/minecraft/class_2056;named onSlotClickLnet/minecraft/screen/ScreenHandler;onSlotClick(IIILnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/ItemStack;
-
canInsertIntoSlot
- Mappings:
Namespace Name Mixin selector official aLxi;a(Lzx;Lyg;)Zintermediary method_8111Lnet/minecraft/class_1983;method_8111(Lnet/minecraft/class_2056;Lnet/minecraft/class_2010;)Znamed canInsertIntoSlotLnet/minecraft/screen/ScreenHandler;canInsertIntoSlot(Lnet/minecraft/item/ItemStack;Lnet/minecraft/inventory/slot/Slot;)Z
-
method_8096
- Mappings:
Namespace Name Mixin selector official aLxi;a(IIZLwn;)Vintermediary method_8096Lnet/minecraft/class_1983;method_8096(IIZLnet/minecraft/class_1963;)Vnamed method_8096Lnet/minecraft/screen/ScreenHandler;method_8096(IIZLnet/minecraft/entity/player/PlayerEntity;)V
-
close
- Mappings:
Namespace Name Mixin selector official bLxi;b(Lwn;)Vintermediary method_8117Lnet/minecraft/class_1983;method_8117(Lnet/minecraft/class_1963;)Vnamed closeLnet/minecraft/screen/ScreenHandler;close(Lnet/minecraft/entity/player/PlayerEntity;)V
-
onContentChanged
- Mappings:
Namespace Name Mixin selector official aLxi;a(Log;)Vintermediary method_8101Lnet/minecraft/class_1983;method_8101(Lnet/minecraft/class_1718;)Vnamed onContentChangedLnet/minecraft/screen/ScreenHandler;onContentChanged(Lnet/minecraft/inventory/Inventory;)V
-
setStackInSlot
- Mappings:
Namespace Name Mixin selector official aLxi;a(ILzx;)Vintermediary method_8098Lnet/minecraft/class_1983;method_8098(ILnet/minecraft/class_2056;)Vnamed setStackInSlotLnet/minecraft/screen/ScreenHandler;setStackInSlot(ILnet/minecraft/item/ItemStack;)V
-
updateSlotStacks
- Mappings:
Namespace Name Mixin selector official aLxi;a([Lzx;)Vintermediary method_8112Lnet/minecraft/class_1983;method_8112([Lnet/minecraft/class_2056;)Vnamed updateSlotStacksLnet/minecraft/screen/ScreenHandler;updateSlotStacks([Lnet/minecraft/item/ItemStack;)V
-
setProperty
- Mappings:
Namespace Name Mixin selector official bLxi;b(II)Vintermediary method_8115Lnet/minecraft/class_1983;method_8115(II)Vnamed setPropertyLnet/minecraft/screen/ScreenHandler;setProperty(II)V
-
getNextActionId
- Mappings:
Namespace Name Mixin selector official aLxi;a(Lwm;)Sintermediary method_8103Lnet/minecraft/class_1983;method_8103(Lnet/minecraft/class_1962;)Snamed getNextActionIdLnet/minecraft/screen/ScreenHandler;getNextActionId(Lnet/minecraft/entity/player/PlayerInventory;)S
-
isNotRestricted
- Mappings:
Namespace Name Mixin selector official cLxi;c(Lwn;)Zintermediary method_8122Lnet/minecraft/class_1983;method_8122(Lnet/minecraft/class_1963;)Znamed isNotRestrictedLnet/minecraft/screen/ScreenHandler;isNotRestricted(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
setPlayerRestriction
- Mappings:
Namespace Name Mixin selector official aLxi;a(Lwn;Z)Vintermediary method_8106Lnet/minecraft/class_1983;method_8106(Lnet/minecraft/class_1963;Z)Vnamed setPlayerRestrictionLnet/minecraft/screen/ScreenHandler;setPlayerRestriction(Lnet/minecraft/entity/player/PlayerEntity;Z)V
-
canUse
- Mappings:
Namespace Name Mixin selector official aLxi;a(Lwn;)Zintermediary method_8104Lnet/minecraft/class_1983;method_8104(Lnet/minecraft/class_1963;)Znamed canUseLnet/minecraft/screen/ScreenHandler;canUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
insertItem
- Mappings:
Namespace Name Mixin selector official aLxi;a(Lzx;IIZ)Zintermediary method_8110Lnet/minecraft/class_1983;method_8110(Lnet/minecraft/class_2056;IIZ)Znamed insertItemLnet/minecraft/screen/ScreenHandler;insertItem(Lnet/minecraft/item/ItemStack;IIZ)Z
-
unpackQuickCraftStage
public static int unpackQuickCraftStage(int clickData)- Mappings:
Namespace Name Mixin selector official bLxi;b(I)Iintermediary method_8114Lnet/minecraft/class_1983;method_8114(I)Inamed unpackQuickCraftStageLnet/minecraft/screen/ScreenHandler;unpackQuickCraftStage(I)I
-
unpackButtonId
public static int unpackButtonId(int clickData)- Mappings:
Namespace Name Mixin selector official cLxi;c(I)Iintermediary method_8121Lnet/minecraft/class_1983;method_8121(I)Inamed unpackButtonIdLnet/minecraft/screen/ScreenHandler;unpackButtonId(I)I
-
packClickData
- Mappings:
Namespace Name Mixin selector official dLxi;d(II)Iintermediary method_8124Lnet/minecraft/class_1983;method_8124(II)Inamed packClickDataLnet/minecraft/screen/ScreenHandler;packClickData(II)I
-
shouldQuickCraftContinue
- Mappings:
Namespace Name Mixin selector official aLxi;a(ILwn;)Zintermediary method_8097Lnet/minecraft/class_1983;method_8097(ILnet/minecraft/class_1963;)Znamed shouldQuickCraftContinueLnet/minecraft/screen/ScreenHandler;shouldQuickCraftContinue(ILnet/minecraft/entity/player/PlayerEntity;)Z
-
endQuickCraft
protected void endQuickCraft()- Mappings:
Namespace Name Mixin selector official dLxi;d()Vintermediary method_8123Lnet/minecraft/class_1983;method_8123()Vnamed endQuickCraftLnet/minecraft/screen/ScreenHandler;endQuickCraft()V
-
canInsertItemIntoSlot
- Mappings:
Namespace Name Mixin selector official aLxi;a(Lyg;Lzx;Z)Zintermediary method_8109Lnet/minecraft/class_1983;method_8109(Lnet/minecraft/class_2010;Lnet/minecraft/class_2056;Z)Znamed canInsertItemIntoSlotLnet/minecraft/screen/ScreenHandler;canInsertItemIntoSlot(Lnet/minecraft/inventory/slot/Slot;Lnet/minecraft/item/ItemStack;Z)Z
-
calculateStackSize
- Mappings:
Namespace Name Mixin selector official aLxi;a(Ljava/util/Set;ILzx;I)Vintermediary method_8100Lnet/minecraft/class_1983;method_8100(Ljava/util/Set;ILnet/minecraft/class_2056;I)Vnamed calculateStackSizeLnet/minecraft/screen/ScreenHandler;calculateStackSize(Ljava/util/Set;ILnet/minecraft/item/ItemStack;I)V
-
canInsertIntoSlot
- Mappings:
Namespace Name Mixin selector official bLxi;b(Lyg;)Zintermediary method_8120Lnet/minecraft/class_1983;method_8120(Lnet/minecraft/class_2010;)Znamed canInsertIntoSlotLnet/minecraft/screen/ScreenHandler;canInsertIntoSlot(Lnet/minecraft/inventory/slot/Slot;)Z
-
calculateComparatorOutput
- Mappings:
Namespace Name Mixin selector official aLxi;a(Lakw;)Iintermediary method_8099Lnet/minecraft/class_1983;method_8099(Lnet/minecraft/class_348;)Inamed calculateComparatorOutputLnet/minecraft/screen/ScreenHandler;calculateComparatorOutput(Lnet/minecraft/block/entity/BlockEntity;)I
-
calculateComparatorOutput
- Mappings:
Namespace Name Mixin selector official bLxi;b(Log;)Iintermediary method_8116Lnet/minecraft/class_1983;method_8116(Lnet/minecraft/class_1718;)Inamed calculateComparatorOutputLnet/minecraft/screen/ScreenHandler;calculateComparatorOutput(Lnet/minecraft/inventory/Inventory;)I
-