Class class_9521
- Mappings:
Namespace Name official cquintermediary net/minecraft/class_9521named net/minecraft/class_9521
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final CraftingResultInventorystatic final intstatic final int(package private) final Slot(package private) final Slotfinal Inventoryprivate static final intprivate static final intprivate static final intprivate static final intprivate final ScreenHandlerContextprivate final Propertyprivate final Worldprivate List<RecipeEntry<class_9541>> private ItemStack(package private) long(package private) RunnableFields 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
ConstructorsConstructorDescriptionclass_9521(int int2, PlayerInventory playerInventory) class_9521(int int2, PlayerInventory playerInventory, ScreenHandlerContext screenHandlerContext) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanInsertIntoSlot(ItemStack stack, Slot slot) Returns whetherstackcan be inserted toslot.booleancanUse(PlayerEntity player) Returns whether the screen handler can be used.getType()Returns the screen handler type.private voidmethod_59008(Inventory inventory, ItemStack itemStack) voidmethod_59010(Runnable runnable) private booleanmethod_59011(int int2) intintboolean(package private) voidbooleanonButtonClick(PlayerEntity player, int id) Called whenplayerclicks a button withid.voidonClosed(PlayerEntity player) Called when this screen handler is closed.voidonContentChanged(Inventory inventory) Called when a slot's content has changed.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.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_50548
public static final int field_50548- See Also:
- Mappings:
Namespace Name Mixin selector official kLcqu;k:Iintermediary field_50548Lnet/minecraft/class_9521;field_50548:Inamed field_50548Lnet/minecraft/class_9521;field_50548:I
-
field_50549
public static final int field_50549- See Also:
- Mappings:
Namespace Name Mixin selector official lLcqu;l:Iintermediary field_50549Lnet/minecraft/class_9521;field_50549:Inamed field_50549Lnet/minecraft/class_9521;field_50549:I
-
field_50553
private static final int field_50553- See Also:
- Mappings:
Namespace Name Mixin selector official pLcqu;p:Iintermediary field_50553Lnet/minecraft/class_9521;field_50553:Inamed field_50553Lnet/minecraft/class_9521;field_50553:I
-
field_50554
private static final int field_50554- See Also:
- Mappings:
Namespace Name Mixin selector official qLcqu;q:Iintermediary field_50554Lnet/minecraft/class_9521;field_50554:Inamed field_50554Lnet/minecraft/class_9521;field_50554:I
-
field_50555
private static final int field_50555- See Also:
- Mappings:
Namespace Name Mixin selector official rLcqu;r:Iintermediary field_50555Lnet/minecraft/class_9521;field_50555:Inamed field_50555Lnet/minecraft/class_9521;field_50555:I
-
field_50556
private static final int field_50556- See Also:
- Mappings:
Namespace Name Mixin selector official sLcqu;s:Iintermediary field_50556Lnet/minecraft/class_9521;field_50556:Inamed field_50556Lnet/minecraft/class_9521;field_50556:I
-
field_50557
- Mappings:
Namespace Name Mixin selector official tLcqu;t:Lcpr;intermediary field_50557Lnet/minecraft/class_9521;field_50557:Lnet/minecraft/class_3914;named field_50557Lnet/minecraft/class_9521;field_50557:Lnet/minecraft/screen/ScreenHandlerContext;
-
field_50558
- Mappings:
Namespace Name Mixin selector official uLcqu;u:Lcpy;intermediary field_50558Lnet/minecraft/class_9521;field_50558:Lnet/minecraft/class_3915;named field_50558Lnet/minecraft/class_9521;field_50558:Lnet/minecraft/screen/Property;
-
field_50559
- Mappings:
Namespace Name Mixin selector official vLcqu;v:Ldca;intermediary field_50559Lnet/minecraft/class_9521;field_50559:Lnet/minecraft/class_1937;named field_50559Lnet/minecraft/class_9521;field_50559:Lnet/minecraft/world/World;
-
field_50560
- Mappings:
Namespace Name Mixin selector official wLcqu;w:Ljava/util/List;intermediary field_50560Lnet/minecraft/class_9521;field_50560:Ljava/util/List;named field_50560Lnet/minecraft/class_9521;field_50560:Ljava/util/List;
-
field_50561
- Mappings:
Namespace Name Mixin selector official xLcqu;x:Lcuh;intermediary field_50561Lnet/minecraft/class_9521;field_50561:Lnet/minecraft/class_1799;named field_50561Lnet/minecraft/class_9521;field_50561:Lnet/minecraft/item/ItemStack;
-
field_50562
long field_50562- Mappings:
Namespace Name Mixin selector official yLcqu;y:Jintermediary field_50562Lnet/minecraft/class_9521;field_50562:Jnamed field_50562Lnet/minecraft/class_9521;field_50562:J
-
field_50550
- Mappings:
Namespace Name Mixin selector official mLcqu;m:Lcre;intermediary field_50550Lnet/minecraft/class_9521;field_50550:Lnet/minecraft/class_1735;named field_50550Lnet/minecraft/class_9521;field_50550:Lnet/minecraft/screen/slot/Slot;
-
field_50551
- Mappings:
Namespace Name Mixin selector official nLcqu;n:Lcre;intermediary field_50551Lnet/minecraft/class_9521;field_50551:Lnet/minecraft/class_1735;named field_50551Lnet/minecraft/class_9521;field_50551:Lnet/minecraft/screen/slot/Slot;
-
field_50563
Runnable field_50563- Mappings:
Namespace Name Mixin selector official zLcqu;z:Ljava/lang/Runnable;intermediary field_50563Lnet/minecraft/class_9521;field_50563:Ljava/lang/Runnable;named field_50563Lnet/minecraft/class_9521;field_50563:Ljava/lang/Runnable;
-
field_50552
- Mappings:
Namespace Name Mixin selector official oLcqu;o:Lbpt;intermediary field_50552Lnet/minecraft/class_9521;field_50552:Lnet/minecraft/class_1263;named field_50552Lnet/minecraft/class_9521;field_50552:Lnet/minecraft/inventory/Inventory;
-
field_50547
- Mappings:
Namespace Name Mixin selector official ALcqu;A:Lcqz;intermediary field_50547Lnet/minecraft/class_9521;field_50547:Lnet/minecraft/class_1731;named field_50547Lnet/minecraft/class_9521;field_50547:Lnet/minecraft/inventory/CraftingResultInventory;
-
-
Constructor Details
-
class_9521
-
class_9521
public class_9521(int int2, PlayerInventory playerInventory, ScreenHandlerContext screenHandlerContext)
-
-
Method Details
-
method_59012
public int method_59012()- Mappings:
Namespace Name Mixin selector official lLcqu;l()Iintermediary method_59012Lnet/minecraft/class_9521;method_59012()Inamed method_59012Lnet/minecraft/class_9521;method_59012()I
-
method_59013
- Mappings:
Namespace Name Mixin selector official mLcqu;m()Ljava/util/List;intermediary method_59013Lnet/minecraft/class_9521;method_59013()Ljava/util/List;named method_59013Lnet/minecraft/class_9521;method_59013()Ljava/util/List;
-
method_59014
public int method_59014()- Mappings:
Namespace Name Mixin selector official nLcqu;n()Iintermediary method_59014Lnet/minecraft/class_9521;method_59014()Inamed method_59014Lnet/minecraft/class_9521;method_59014()I
-
method_59015
public boolean method_59015()- Mappings:
Namespace Name Mixin selector official oLcqu;o()Zintermediary method_59015Lnet/minecraft/class_9521;method_59015()Znamed method_59015Lnet/minecraft/class_9521;method_59015()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 aLcpg;a(Lcly;)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 bLcpg;b(Lcly;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
-
method_59011
private boolean method_59011(int int2) - Mappings:
Namespace Name Mixin selector official eLcqu;e(I)Zintermediary method_59011Lnet/minecraft/class_9521;method_59011(I)Znamed method_59011Lnet/minecraft/class_9521;method_59011(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 aLcpg;a(Lbpt;)Vintermediary method_7609Lnet/minecraft/class_1703;method_7609(Lnet/minecraft/class_1263;)Vnamed onContentChangedLnet/minecraft/screen/ScreenHandler;onContentChanged(Lnet/minecraft/inventory/Inventory;)V
-
method_59008
- Mappings:
Namespace Name Mixin selector official aLcqu;a(Lbpt;Lcuh;)Vintermediary method_59008Lnet/minecraft/class_9521;method_59008(Lnet/minecraft/class_1263;Lnet/minecraft/class_1799;)Vnamed method_59008Lnet/minecraft/class_9521;method_59008(Lnet/minecraft/inventory/Inventory;Lnet/minecraft/item/ItemStack;)V
-
method_59016
void method_59016()- Mappings:
Namespace Name Mixin selector official pLcqu;p()Vintermediary method_59016Lnet/minecraft/class_9521;method_59016()Vnamed method_59016Lnet/minecraft/class_9521;method_59016()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 aLcpg;a()Lcqo;intermediary method_17358Lnet/minecraft/class_1703;method_17358()Lnet/minecraft/class_3917;named getTypeLnet/minecraft/screen/ScreenHandler;getType()Lnet/minecraft/screen/ScreenHandlerType;
-
method_59010
- Mappings:
Namespace Name Mixin selector official aLcqu;a(Ljava/lang/Runnable;)Vintermediary method_59010Lnet/minecraft/class_9521;method_59010(Ljava/lang/Runnable;)Vnamed method_59010Lnet/minecraft/class_9521;method_59010(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 aLcpg;a(Lcuh;Lcre;)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
-
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 official aLcpg;a(Lcly;I)Lcuh;intermediary method_7601Lnet/minecraft/class_1703;method_7601(Lnet/minecraft/class_1657;I)Lnet/minecraft/class_1799;named quickMoveLnet/minecraft/screen/ScreenHandler;quickMove(Lnet/minecraft/entity/player/PlayerEntity;I)Lnet/minecraft/item/ItemStack;
-
onClosed
Called when this screen handler is closed.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:
onClosedin classScreenHandler- Mappings:
Namespace Name Mixin selector official bLcpg;b(Lcly;)Vintermediary method_7595Lnet/minecraft/class_1703;method_7595(Lnet/minecraft/class_1657;)Vnamed onClosedLnet/minecraft/screen/ScreenHandler;onClosed(Lnet/minecraft/entity/player/PlayerEntity;)V
-