Class StonecutterScreenHandler
- Mappings:
Namespace Name official byhintermediary net/minecraft/class_3971named net/minecraft/screen/StonecutterScreenHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<StonecuttingRecipe>(package private) Runnableprivate final ScreenHandlerContextstatic final intstatic final intprivate static final intprivate static final intprivate static final intprivate static final intfinal Inventory(package private) final Slotprivate ItemStack(package private) long(package private) final CraftingResultInventory(package private) final Slotprivate final Propertyprivate final WorldFields 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
ConstructorsConstructorDescriptionStonecutterScreenHandler(int syncId, PlayerInventory playerInventory) StonecutterScreenHandler(int syncId, PlayerInventory playerInventory, ScreenHandlerContext context) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCraft()booleancanInsertIntoSlot(ItemStack stack, Slot slot) Returns whetherstackcan be inserted toslot.booleancanUse(PlayerEntity player) Returns whether the screen handler can be used.voidclose(PlayerEntity player) Closes this screen handler.intintgetType()Returns the screen handler type.private booleanisInBounds(int id) booleanonButtonClick(PlayerEntity player, int id) Called whenplayerclicks a button withid.voidonContentChanged(Inventory inventory) Called when a slot's content has changed.(package private) voidvoidsetContentsChangedListener(Runnable contentsChangedListener) transferSlot(PlayerEntity player, int index) Transfers (or "quick-moves") the stack at slotindexto other slots of the screen handler that belong to a different inventory.private voidupdateInput(Inventory input, ItemStack stack) Methods inherited from class net.minecraft.screen.ScreenHandler
addListener, addProperties, addProperty, addSlot, calculateComparatorOutput, calculateComparatorOutput, calculateStackSize, canInsertIntoSlot, canInsertItemIntoSlot, canUse, checkDataCount, checkSize, copySharedSlots, disableSyncing, dropInventory, enableSyncing, endQuickCraft, getCursorStack, getRevision, getSlot, getSlotIndex, getStacks, insertItem, isValid, nextRevision, onSlotClick, packQuickCraftData, removeListener, sendContentUpdates, setCursorStack, setPreviousCursorStack, setPreviousTrackedSlot, setPreviousTrackedSlotMutable, setProperty, setStackInSlot, shouldQuickCraftContinue, syncState, unpackQuickCraftButton, unpackQuickCraftStage, updateSlotStacks, updateSyncHandler, updateToClient
-
Field Details
-
field_30842
public static final int field_30842- See Also:
- Mappings:
Namespace Name Mixin selector official kLbyh;k:Iintermediary field_30842Lnet/minecraft/class_3971;field_30842:Inamed field_30842Lnet/minecraft/screen/StonecutterScreenHandler;field_30842:I
-
field_30843
public static final int field_30843- See Also:
- Mappings:
Namespace Name Mixin selector official lLbyh;l:Iintermediary field_30843Lnet/minecraft/class_3971;field_30843:Inamed field_30843Lnet/minecraft/screen/StonecutterScreenHandler;field_30843:I
-
field_30844
private static final int field_30844- See Also:
- Mappings:
Namespace Name Mixin selector official pLbyh;p:Iintermediary field_30844Lnet/minecraft/class_3971;field_30844:Inamed field_30844Lnet/minecraft/screen/StonecutterScreenHandler;field_30844:I
-
field_30845
private static final int field_30845- See Also:
- Mappings:
Namespace Name Mixin selector official qLbyh;q:Iintermediary field_30845Lnet/minecraft/class_3971;field_30845:Inamed field_30845Lnet/minecraft/screen/StonecutterScreenHandler;field_30845:I
-
field_30846
private static final int field_30846- See Also:
- Mappings:
Namespace Name Mixin selector official rLbyh;r:Iintermediary field_30846Lnet/minecraft/class_3971;field_30846:Inamed field_30846Lnet/minecraft/screen/StonecutterScreenHandler;field_30846:I
-
field_30847
private static final int field_30847- See Also:
- Mappings:
Namespace Name Mixin selector official sLbyh;s:Iintermediary field_30847Lnet/minecraft/class_3971;field_30847:Inamed field_30847Lnet/minecraft/screen/StonecutterScreenHandler;field_30847:I
-
context
- Mappings:
Namespace Name Mixin selector official tLbyh;t:Lbwx;intermediary field_17630Lnet/minecraft/class_3971;field_17630:Lnet/minecraft/class_3914;named contextLnet/minecraft/screen/StonecutterScreenHandler;context:Lnet/minecraft/screen/ScreenHandlerContext;
-
selectedRecipe
- Mappings:
Namespace Name Mixin selector official uLbyh;u:Lbxc;intermediary field_17631Lnet/minecraft/class_3971;field_17631:Lnet/minecraft/class_3915;named selectedRecipeLnet/minecraft/screen/StonecutterScreenHandler;selectedRecipe:Lnet/minecraft/screen/Property;
-
world
- Mappings:
Namespace Name Mixin selector official vLbyh;v:Lcgx;intermediary field_17632Lnet/minecraft/class_3971;field_17632:Lnet/minecraft/class_1937;named worldLnet/minecraft/screen/StonecutterScreenHandler;world:Lnet/minecraft/world/World;
-
availableRecipes
- Mappings:
Namespace Name Mixin selector official wLbyh;w:Ljava/util/List;intermediary field_17633Lnet/minecraft/class_3971;field_17633:Ljava/util/List;named availableRecipesLnet/minecraft/screen/StonecutterScreenHandler;availableRecipes:Ljava/util/List;
-
inputStack
- Mappings:
Namespace Name Mixin selector official xLbyh;x:Lcax;intermediary field_17634Lnet/minecraft/class_3971;field_17634:Lnet/minecraft/class_1799;named inputStackLnet/minecraft/screen/StonecutterScreenHandler;inputStack:Lnet/minecraft/item/ItemStack;
-
lastTakeTime
long lastTakeTime- Mappings:
Namespace Name Mixin selector official yLbyh;y:Jintermediary field_17635Lnet/minecraft/class_3971;field_17635:Jnamed lastTakeTimeLnet/minecraft/screen/StonecutterScreenHandler;lastTakeTime:J
-
inputSlot
- Mappings:
Namespace Name Mixin selector official mLbyh;m:Lbyd;intermediary field_17627Lnet/minecraft/class_3971;field_17627:Lnet/minecraft/class_1735;named inputSlotLnet/minecraft/screen/StonecutterScreenHandler;inputSlot:Lnet/minecraft/screen/slot/Slot;
-
outputSlot
- Mappings:
Namespace Name Mixin selector official nLbyh;n:Lbyd;intermediary field_17628Lnet/minecraft/class_3971;field_17628:Lnet/minecraft/class_1735;named outputSlotLnet/minecraft/screen/StonecutterScreenHandler;outputSlot:Lnet/minecraft/screen/slot/Slot;
-
contentsChangedListener
Runnable contentsChangedListener- Mappings:
Namespace Name Mixin selector official zLbyh;z:Ljava/lang/Runnable;intermediary field_17636Lnet/minecraft/class_3971;field_17636:Ljava/lang/Runnable;named contentsChangedListenerLnet/minecraft/screen/StonecutterScreenHandler;contentsChangedListener:Ljava/lang/Runnable;
-
input
- Mappings:
Namespace Name Mixin selector official oLbyh;o:Lbac;intermediary field_17629Lnet/minecraft/class_3971;field_17629:Lnet/minecraft/class_1263;named inputLnet/minecraft/screen/StonecutterScreenHandler;input:Lnet/minecraft/inventory/Inventory;
-
output
- Mappings:
Namespace Name Mixin selector official ALbyh;A:Lbxy;intermediary field_19173Lnet/minecraft/class_3971;field_19173:Lnet/minecraft/class_1731;named outputLnet/minecraft/screen/StonecutterScreenHandler;output:Lnet/minecraft/inventory/CraftingResultInventory;
-
-
Constructor Details
-
StonecutterScreenHandler
- Mappings:
Namespace Name Mixin selector official <init>Lbyh;<init>(ILbub;)Vintermediary <init>Lnet/minecraft/class_3971;<init>(ILnet/minecraft/class_1661;)Vnamed <init>Lnet/minecraft/screen/StonecutterScreenHandler;<init>(ILnet/minecraft/entity/player/PlayerInventory;)V
-
StonecutterScreenHandler
public StonecutterScreenHandler(int syncId, PlayerInventory playerInventory, ScreenHandlerContext context) - Mappings:
Namespace Name Mixin selector official <init>Lbyh;<init>(ILbub;Lbwx;)Vintermediary <init>Lnet/minecraft/class_3971;<init>(ILnet/minecraft/class_1661;Lnet/minecraft/class_3914;)Vnamed <init>Lnet/minecraft/screen/StonecutterScreenHandler;<init>(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/screen/ScreenHandlerContext;)V
-
-
Method Details
-
getSelectedRecipe
public int getSelectedRecipe()- Mappings:
Namespace Name Mixin selector official lLbyh;l()Iintermediary method_17862Lnet/minecraft/class_3971;method_17862()Inamed getSelectedRecipeLnet/minecraft/screen/StonecutterScreenHandler;getSelectedRecipe()I
-
getAvailableRecipes
- Mappings:
Namespace Name Mixin selector official mLbyh;m()Ljava/util/List;intermediary method_17863Lnet/minecraft/class_3971;method_17863()Ljava/util/List;named getAvailableRecipesLnet/minecraft/screen/StonecutterScreenHandler;getAvailableRecipes()Ljava/util/List;
-
getAvailableRecipeCount
public int getAvailableRecipeCount()- Mappings:
Namespace Name Mixin selector official nLbyh;n()Iintermediary method_17864Lnet/minecraft/class_3971;method_17864()Inamed getAvailableRecipeCountLnet/minecraft/screen/StonecutterScreenHandler;getAvailableRecipeCount()I
-
canCraft
public boolean canCraft()- Mappings:
Namespace Name Mixin selector official oLbyh;o()Zintermediary method_17865Lnet/minecraft/class_3971;method_17865()Znamed canCraftLnet/minecraft/screen/StonecutterScreenHandler;canCraft()Z
-
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 official aLbwm;a(Lbuc;)Zintermediary method_7597Lnet/minecraft/class_1703;method_7597(Lnet/minecraft/class_1657;)Znamed canUseLnet/minecraft/screen/ScreenHandler;canUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
onButtonClick
Called whenplayerclicks a button withid."Button click" is an abstract concept; it does not have to be triggered by a button. Examples of button clicks include selecting a recipe for a stonecutter, turning a page of a lectern's book, or selecting an enchantment on an enchanting table. Buttons are identified by an integer.
- Overrides:
onButtonClickin classScreenHandler- Returns:
- whether the button click is handled successfully
- Mappings:
Namespace Name Mixin selector official bLbwm;b(Lbuc;I)Zintermediary method_7604Lnet/minecraft/class_1703;method_7604(Lnet/minecraft/class_1657;I)Znamed onButtonClickLnet/minecraft/screen/ScreenHandler;onButtonClick(Lnet/minecraft/entity/player/PlayerEntity;I)Z
-
isInBounds
private boolean isInBounds(int id) - Mappings:
Namespace Name Mixin selector official eLbyh;e(I)Zintermediary method_30160Lnet/minecraft/class_3971;method_30160(I)Znamed isInBoundsLnet/minecraft/screen/StonecutterScreenHandler;isInBounds(I)Z
-
onContentChanged
Called when a slot's content has changed.This is not called by default; subclasses that override this method should also use a custom
InventorywhosemarkDirtymethod is overridden to call this method as a backing inventory of the slot.This can be used to update the output slot when input changes.
- Overrides:
onContentChangedin classScreenHandler- Mappings:
Namespace Name Mixin selector official aLbwm;a(Lbac;)Vintermediary method_7609Lnet/minecraft/class_1703;method_7609(Lnet/minecraft/class_1263;)Vnamed onContentChangedLnet/minecraft/screen/ScreenHandler;onContentChanged(Lnet/minecraft/inventory/Inventory;)V
-
updateInput
- Mappings:
Namespace Name Mixin selector official aLbyh;a(Lbac;Lcax;)Vintermediary method_17855Lnet/minecraft/class_3971;method_17855(Lnet/minecraft/class_1263;Lnet/minecraft/class_1799;)Vnamed updateInputLnet/minecraft/screen/StonecutterScreenHandler;updateInput(Lnet/minecraft/inventory/Inventory;Lnet/minecraft/item/ItemStack;)V
-
populateResult
void populateResult()- Mappings:
Namespace Name Mixin selector official pLbyh;p()Vintermediary method_17866Lnet/minecraft/class_3971;method_17866()Vnamed populateResultLnet/minecraft/screen/StonecutterScreenHandler;populateResult()V
-
getType
Returns the screen handler type.A screen handler must have associated screen handler type to open it.
- Overrides:
getTypein classScreenHandler- Returns:
- the screen handler type
- Mappings:
Namespace Name Mixin selector official aLbwm;a()Lbxq;intermediary method_17358Lnet/minecraft/class_1703;method_17358()Lnet/minecraft/class_3917;named getTypeLnet/minecraft/screen/ScreenHandler;getType()Lnet/minecraft/screen/ScreenHandlerType;
-
setContentsChangedListener
- Mappings:
Namespace Name Mixin selector official aLbyh;a(Ljava/lang/Runnable;)Vintermediary method_17859Lnet/minecraft/class_3971;method_17859(Ljava/lang/Runnable;)Vnamed setContentsChangedListenerLnet/minecraft/screen/StonecutterScreenHandler;setContentsChangedListener(Ljava/lang/Runnable;)V
-
canInsertIntoSlot
Returns whetherstackcan be inserted toslot.Subclasses should override this to return
falseif the slot is used for output.- Overrides:
canInsertIntoSlotin classScreenHandler- Returns:
- whether
stackcan be inserted toslot - Mappings:
Namespace Name Mixin selector official aLbwm;a(Lcax;Lbyd;)Zintermediary method_7613Lnet/minecraft/class_1703;method_7613(Lnet/minecraft/class_1799;Lnet/minecraft/class_1735;)Znamed canInsertIntoSlotLnet/minecraft/screen/ScreenHandler;canInsertIntoSlot(Lnet/minecraft/item/ItemStack;Lnet/minecraft/screen/slot/Slot;)Z
-
transferSlot
Transfers (or "quick-moves") the stack at slotindexto other slots of the screen handler that belong to a different inventory.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.- Specified by:
transferSlotin classScreenHandler- Returns:
ItemStack.EMPTYwhen no stack can be transferred, otherwise the original stack- See Also:
- Mappings:
Namespace Name Mixin selector official aLbwm;a(Lbuc;I)Lcax;intermediary method_7601Lnet/minecraft/class_1703;method_7601(Lnet/minecraft/class_1657;I)Lnet/minecraft/class_1799;named transferSlotLnet/minecraft/screen/ScreenHandler;transferSlot(Lnet/minecraft/entity/player/PlayerEntity;I)Lnet/minecraft/item/ItemStack;
-
close
Closes this screen handler.To close a screen handler, call
PlayerEntity.closeHandledScreen()on the server instead of this method.This drops the cursor stack by default. Subclasses that have slots not backed by a persistent inventory should call
ScreenHandler.dropInventory(net.minecraft.entity.player.PlayerEntity, net.minecraft.inventory.Inventory)to drop the stacks.- Overrides:
closein classScreenHandler- Mappings:
Namespace Name Mixin selector official bLbwm;b(Lbuc;)Vintermediary method_7595Lnet/minecraft/class_1703;method_7595(Lnet/minecraft/class_1657;)Vnamed closeLnet/minecraft/screen/ScreenHandler;close(Lnet/minecraft/entity/player/PlayerEntity;)V
-