Package net.minecraft.screen
Class CrafterScreenHandler
java.lang.Object
net.minecraft.screen.ScreenHandler
net.minecraft.screen.CrafterScreenHandler
- All Implemented Interfaces:
ScreenHandlerListener
- Mappings:
Namespace Name named net/minecraft/screen/CrafterScreenHandlerintermediary net/minecraft/class_8881official cqj
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate final RecipeInputInventoryprivate final PlayerEntityprivate final PropertyDelegateprivate final CraftingResultInventoryFields inherited from class net.minecraft.screen.ScreenHandler
EMPTY_SPACE_SLOT_INDEX, field_30731, field_30732, field_30733, field_30734, field_30735, field_30736, field_30737, slots, syncId -
Constructor Summary
ConstructorsConstructorDescriptionCrafterScreenHandler(int syncId, PlayerInventory playerInventory) CrafterScreenHandler(int syncId, PlayerInventory playerInventory, RecipeInputInventory inputInventory, PropertyDelegate propertyDelegate) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddSlots(PlayerInventory playerInventory) booleancanUse(PlayerEntity player) Returns whether the screen handler can be used.booleanisSlotDisabled(int slot) booleanvoidonPropertyUpdate(ScreenHandler handler, int property, int value) voidonSlotUpdate(ScreenHandler handler, int slotId, ItemStack stack) quickMove(PlayerEntity player, int slot) Quick-moves the stack atslotto other slots of the screen handler that belong to a different inventory or another section of the same inventory.voidsetSlotEnabled(int slot, boolean enabled) private voidMethods inherited from class net.minecraft.screen.ScreenHandler
addListener, addProperties, addProperty, addSlot, calculateComparatorOutput, calculateComparatorOutput, calculateStackSize, canInsertIntoSlot, canInsertIntoSlot, canInsertItemIntoSlot, canUse, checkDataCount, checkSize, copySharedSlots, disableSyncing, dropInventory, enableSyncing, endQuickCraft, getCursorStack, getRevision, getSlot, getSlotIndex, getStacks, getType, insertItem, isValid, nextRevision, onButtonClick, onClosed, onContentChanged, onSlotClick, packQuickCraftData, removeListener, sendContentUpdates, setCursorStack, setPreviousCursorStack, setPreviousTrackedSlot, setPreviousTrackedSlotMutable, setProperty, setStackInSlot, shouldQuickCraftContinue, syncState, unpackQuickCraftButton, unpackQuickCraftStage, updateSlotStacks, updateSyncHandler, updateToClient
-
Field Details
-
field_46781
protected static final int field_46781- See Also:
- Mappings:
Namespace Name Mixin selector named field_46781Lnet/minecraft/screen/CrafterScreenHandler;field_46781:Iintermediary field_46781Lnet/minecraft/class_8881;field_46781:Iofficial kLcqj;k:I
-
field_46782
private static final int field_46782- See Also:
- Mappings:
Namespace Name Mixin selector named field_46782Lnet/minecraft/screen/CrafterScreenHandler;field_46782:Iintermediary field_46782Lnet/minecraft/class_8881;field_46782:Iofficial lLcqj;l:I
-
field_46783
private static final int field_46783- See Also:
- Mappings:
Namespace Name Mixin selector named field_46783Lnet/minecraft/screen/CrafterScreenHandler;field_46783:Iintermediary field_46783Lnet/minecraft/class_8881;field_46783:Iofficial mLcqj;m:I
-
field_46784
private static final int field_46784- See Also:
- Mappings:
Namespace Name Mixin selector named field_46784Lnet/minecraft/screen/CrafterScreenHandler;field_46784:Iintermediary field_46784Lnet/minecraft/class_8881;field_46784:Iofficial nLcqj;n:I
-
field_46785
private static final int field_46785- See Also:
- Mappings:
Namespace Name Mixin selector named field_46785Lnet/minecraft/screen/CrafterScreenHandler;field_46785:Iintermediary field_46785Lnet/minecraft/class_8881;field_46785:Iofficial oLcqj;o:I
-
resultInventory
- Mappings:
Namespace Name Mixin selector named resultInventoryLnet/minecraft/screen/CrafterScreenHandler;resultInventory:Lnet/minecraft/inventory/CraftingResultInventory;intermediary field_46780Lnet/minecraft/class_8881;field_46780:Lnet/minecraft/class_1731;official pLcqj;p:Lcrl;
-
propertyDelegate
- Mappings:
Namespace Name Mixin selector named propertyDelegateLnet/minecraft/screen/CrafterScreenHandler;propertyDelegate:Lnet/minecraft/screen/PropertyDelegate;intermediary field_46786Lnet/minecraft/class_8881;field_46786:Lnet/minecraft/class_3913;official qLcqj;q:Lcqf;
-
player
- Mappings:
Namespace Name Mixin selector named playerLnet/minecraft/screen/CrafterScreenHandler;player:Lnet/minecraft/entity/player/PlayerEntity;intermediary field_46787Lnet/minecraft/class_8881;field_46787:Lnet/minecraft/class_1657;official rLcqj;r:Lcmx;
-
inputInventory
- Mappings:
Namespace Name Mixin selector named inputInventoryLnet/minecraft/screen/CrafterScreenHandler;inputInventory:Lnet/minecraft/inventory/RecipeInputInventory;intermediary field_46788Lnet/minecraft/class_8881;field_46788:Lnet/minecraft/class_8566;official sLcqj;s:Lcql;
-
-
Constructor Details
-
CrafterScreenHandler
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/screen/CrafterScreenHandler;<init>(ILnet/minecraft/entity/player/PlayerInventory;)Vintermediary <init>Lnet/minecraft/class_8881;<init>(ILnet/minecraft/class_1661;)Vofficial <init>Lcqj;<init>(ILcmw;)V
-
CrafterScreenHandler
public CrafterScreenHandler(int syncId, PlayerInventory playerInventory, RecipeInputInventory inputInventory, PropertyDelegate propertyDelegate) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/screen/CrafterScreenHandler;<init>(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/inventory/RecipeInputInventory;Lnet/minecraft/screen/PropertyDelegate;)Vintermediary <init>Lnet/minecraft/class_8881;<init>(ILnet/minecraft/class_1661;Lnet/minecraft/class_8566;Lnet/minecraft/class_3913;)Vofficial <init>Lcqj;<init>(ILcmw;Lcql;Lcqf;)V
-
-
Method Details
-
addSlots
- Mappings:
Namespace Name Mixin selector named addSlotsLnet/minecraft/screen/CrafterScreenHandler;addSlots(Lnet/minecraft/entity/player/PlayerInventory;)Vintermediary method_54459Lnet/minecraft/class_8881;method_54459(Lnet/minecraft/class_1661;)Vofficial aLcqj;a(Lcmw;)V
-
setSlotEnabled
public void setSlotEnabled(int slot, boolean enabled) - Mappings:
Namespace Name Mixin selector named setSlotEnabledLnet/minecraft/screen/CrafterScreenHandler;setSlotEnabled(IZ)Vintermediary method_54458Lnet/minecraft/class_8881;method_54458(IZ)Vofficial aLcqj;a(IZ)V
-
isSlotDisabled
public boolean isSlotDisabled(int slot) - Mappings:
Namespace Name Mixin selector named isSlotDisabledLnet/minecraft/screen/CrafterScreenHandler;isSlotDisabled(I)Zintermediary method_54461Lnet/minecraft/class_8881;method_54461(I)Zofficial eLcqj;e(I)Z
-
isTriggered
public boolean isTriggered()- Mappings:
Namespace Name Mixin selector named isTriggeredLnet/minecraft/screen/CrafterScreenHandler;isTriggered()Zintermediary method_54462Lnet/minecraft/class_8881;method_54462()Zofficial lLcqj;l()Z
-
quickMove
Quick-moves the stack atslotto other slots of the screen handler that belong to a different inventory or another section of the same inventory. For example, items can be quick-moved between a chest's slots and the player inventory or between the main player inventory and the hotbar.Subclasses should call
ScreenHandler.insertItem(net.minecraft.item.ItemStack, int, int, boolean), and if the insertion was successful, clear the slot (if the stack is exhausted) or mark it as dirty. See the vanilla subclasses for basic implementation.Quick-moving is also known as "shift-clicking" since it's usually triggered using Shift+left click.
- Specified by:
quickMovein classScreenHandler- Parameters:
slot- the index of the slot to quick-move from- Returns:
ItemStack.EMPTYwhen no stack can be transferred, otherwise the original stack- See Also:
- Mappings:
Namespace Name Mixin selector named quickMoveLnet/minecraft/screen/ScreenHandler;quickMove(Lnet/minecraft/entity/player/PlayerEntity;I)Lnet/minecraft/item/ItemStack;intermediary method_7601Lnet/minecraft/class_1703;method_7601(Lnet/minecraft/class_1657;I)Lnet/minecraft/class_1799;official bLcpu;b(Lcmx;I)Lcuq;
-
canUse
Returns whether the screen handler can be used.Subclasses should call #canUse(ScreenHandlerContext, PlayerEntity, Block)} or implement the check itself. The implementation should check that the player is near the screen handler's source position (e.g. block position) and that the source (e.g. block) is not destroyed.
- Specified by:
canUsein classScreenHandler- Returns:
- whether the screen handler can be used
- Mappings:
Namespace Name Mixin selector named canUseLnet/minecraft/screen/ScreenHandler;canUse(Lnet/minecraft/entity/player/PlayerEntity;)Zintermediary method_7597Lnet/minecraft/class_1703;method_7597(Lnet/minecraft/class_1657;)Zofficial bLcpu;b(Lcmx;)Z
-
updateResult
private void updateResult()- Mappings:
Namespace Name Mixin selector named updateResultLnet/minecraft/screen/CrafterScreenHandler;updateResult()Vintermediary method_54464Lnet/minecraft/class_8881;method_54464()Vofficial nLcqj;n()V
-
getInputInventory
- Mappings:
Namespace Name Mixin selector named getInputInventoryLnet/minecraft/screen/CrafterScreenHandler;getInputInventory()Lnet/minecraft/inventory/Inventory;intermediary method_54463Lnet/minecraft/class_8881;method_54463()Lnet/minecraft/class_1263;official mLcqj;m()Lbqk;
-
onSlotUpdate
- Specified by:
onSlotUpdatein interfaceScreenHandlerListener- Mappings:
Namespace Name Mixin selector named onSlotUpdateLnet/minecraft/screen/ScreenHandlerListener;onSlotUpdate(Lnet/minecraft/screen/ScreenHandler;ILnet/minecraft/item/ItemStack;)Vintermediary method_7635Lnet/minecraft/class_1712;method_7635(Lnet/minecraft/class_1703;ILnet/minecraft/class_1799;)Vofficial aLcqh;a(Lcpu;ILcuq;)V
-
onPropertyUpdate
- Specified by:
onPropertyUpdatein interfaceScreenHandlerListener- Mappings:
Namespace Name Mixin selector named onPropertyUpdateLnet/minecraft/screen/ScreenHandlerListener;onPropertyUpdate(Lnet/minecraft/screen/ScreenHandler;II)Vintermediary method_7633Lnet/minecraft/class_1712;method_7633(Lnet/minecraft/class_1703;II)Vofficial aLcqh;a(Lcpu;II)V
-