Class ForgingScreenHandler
- Direct Known Subclasses:
AnvilScreenHandler,class_8050,SmithingScreenHandler
- Mappings:
Namespace Name official cbcintermediary net/minecraft/class_4861named net/minecraft/screen/ForgingScreenHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ScreenHandlerContextprivate static final intprivate static final intprivate final intprotected final Inventoryprotected final CraftingResultInventoryprotected final PlayerEntityFields 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
ConstructorsConstructorDescriptionForgingScreenHandler(@Nullable ScreenHandlerType<?> type, int syncId, PlayerInventory playerInventory, ScreenHandlerContext context) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleancanTakeOutput(PlayerEntity player, boolean present) protected abstract booleancanUse(BlockState state) booleancanUse(PlayerEntity player) Returns whether the screen handler can be used.voidclose(PlayerEntity player) Closes this screen handler.protected abstract class_8047private voidmethod_48353(PlayerInventory playerInventory) private voidmethod_48354(class_8047 class_8047) private voidmethod_48355(class_8047 class_8047) protected booleanmethod_48356(ItemStack itemStack) intmethod_48357(ItemStack itemStack) private SimpleInventorymethod_48358(int int2) private intintprivate intprivate intprivate intvoidonContentChanged(Inventory inventory) Called when a slot's content has changed.protected abstract voidonTakeOutput(PlayerEntity player, 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.abstract 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, onSlotClick, packQuickCraftData, removeListener, sendContentUpdates, setCursorStack, setPreviousCursorStack, setPreviousTrackedSlot, setPreviousTrackedSlotMutable, setProperty, setStackInSlot, shouldQuickCraftContinue, syncState, unpackQuickCraftButton, unpackQuickCraftStage, updateSlotStacks, updateSyncHandler, updateToClient
-
Field Details
-
field_41901
private static final int field_41901- See Also:
- Mappings:
Namespace Name Mixin selector official kLcbc;k:Iintermediary field_41901Lnet/minecraft/class_4861;field_41901:Inamed field_41901Lnet/minecraft/screen/ForgingScreenHandler;field_41901:I
-
field_41902
private static final int field_41902- See Also:
- Mappings:
Namespace Name Mixin selector official lLcbc;l:Iintermediary field_41902Lnet/minecraft/class_4861;field_41902:Inamed field_41902Lnet/minecraft/screen/ForgingScreenHandler;field_41902:I
-
context
- Mappings:
Namespace Name Mixin selector official oLcbc;o:Lcan;intermediary field_22481Lnet/minecraft/class_4861;field_22481:Lnet/minecraft/class_3914;named contextLnet/minecraft/screen/ForgingScreenHandler;context:Lnet/minecraft/screen/ScreenHandlerContext;
-
player
- Mappings:
Namespace Name Mixin selector official pLcbc;p:Lbxl;intermediary field_22482Lnet/minecraft/class_4861;field_22482:Lnet/minecraft/class_1657;named playerLnet/minecraft/screen/ForgingScreenHandler;player:Lnet/minecraft/entity/player/PlayerEntity;
-
input
- Mappings:
Namespace Name Mixin selector official qLcbc;q:Lbcz;intermediary field_22480Lnet/minecraft/class_4861;field_22480:Lnet/minecraft/class_1263;named inputLnet/minecraft/screen/ForgingScreenHandler;input:Lnet/minecraft/inventory/Inventory;
-
field_41903
- Mappings:
Namespace Name Mixin selector official mLcbc;m:Ljava/util/List;intermediary field_41903Lnet/minecraft/class_4861;field_41903:Ljava/util/List;named field_41903Lnet/minecraft/screen/ForgingScreenHandler;field_41903:Ljava/util/List;
-
output
- Mappings:
Namespace Name Mixin selector official rLcbc;r:Lcbq;intermediary field_22479Lnet/minecraft/class_4861;field_22479:Lnet/minecraft/class_1731;named outputLnet/minecraft/screen/ForgingScreenHandler;output:Lnet/minecraft/inventory/CraftingResultInventory;
-
field_41904
private final int field_41904- Mappings:
Namespace Name Mixin selector official nLcbc;n:Iintermediary field_41904Lnet/minecraft/class_4861;field_41904:Inamed field_41904Lnet/minecraft/screen/ForgingScreenHandler;field_41904:I
-
-
Constructor Details
-
ForgingScreenHandler
public ForgingScreenHandler(@Nullable @Nullable ScreenHandlerType<?> type, int syncId, PlayerInventory playerInventory, ScreenHandlerContext context) - Mappings:
Namespace Name Mixin selector official <init>Lcbc;<init>(Lcbi;ILbxk;Lcan;)Vintermediary <init>Lnet/minecraft/class_4861;<init>(Lnet/minecraft/class_3917;ILnet/minecraft/class_1661;Lnet/minecraft/class_3914;)Vnamed <init>Lnet/minecraft/screen/ForgingScreenHandler;<init>(Lnet/minecraft/screen/ScreenHandlerType;ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/screen/ScreenHandlerContext;)V
-
-
Method Details
-
canTakeOutput
- Mappings:
Namespace Name Mixin selector official aLcbc;a(Lbxl;Z)Zintermediary method_24927Lnet/minecraft/class_4861;method_24927(Lnet/minecraft/class_1657;Z)Znamed canTakeOutputLnet/minecraft/screen/ForgingScreenHandler;canTakeOutput(Lnet/minecraft/entity/player/PlayerEntity;Z)Z
-
onTakeOutput
- Mappings:
Namespace Name Mixin selector official aLcbc;a(Lbxl;Lcer;)Vintermediary method_24923Lnet/minecraft/class_4861;method_24923(Lnet/minecraft/class_1657;Lnet/minecraft/class_1799;)Vnamed onTakeOutputLnet/minecraft/screen/ForgingScreenHandler;onTakeOutput(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)V
-
canUse
- Mappings:
Namespace Name Mixin selector official aLcbc;a(Ldab;)Zintermediary method_24925Lnet/minecraft/class_4861;method_24925(Lnet/minecraft/class_2680;)Znamed canUseLnet/minecraft/screen/ForgingScreenHandler;canUse(Lnet/minecraft/block/BlockState;)Z
-
method_48354
- Mappings:
Namespace Name Mixin selector official aLcbc;a(Lcbd;)Vintermediary method_48354Lnet/minecraft/class_4861;method_48354(Lnet/minecraft/class_8047;)Vnamed method_48354Lnet/minecraft/screen/ForgingScreenHandler;method_48354(Lnet/minecraft/class_8047;)V
-
method_48355
- Mappings:
Namespace Name Mixin selector official bLcbc;b(Lcbd;)Vintermediary method_48355Lnet/minecraft/class_4861;method_48355(Lnet/minecraft/class_8047;)Vnamed method_48355Lnet/minecraft/screen/ForgingScreenHandler;method_48355(Lnet/minecraft/class_8047;)V
-
method_48353
- Mappings:
Namespace Name Mixin selector official aLcbc;a(Lbxk;)Vintermediary method_48353Lnet/minecraft/class_4861;method_48353(Lnet/minecraft/class_1661;)Vnamed method_48353Lnet/minecraft/screen/ForgingScreenHandler;method_48353(Lnet/minecraft/entity/player/PlayerInventory;)V
-
updateResult
public abstract void updateResult()- Mappings:
Namespace Name Mixin selector official mLcbc;m()Vintermediary method_24928Lnet/minecraft/class_4861;method_24928()Vnamed updateResultLnet/minecraft/screen/ForgingScreenHandler;updateResult()V
-
method_48352
- Mappings:
Namespace Name Mixin selector official lLcbc;l()Lcbd;intermediary method_48352Lnet/minecraft/class_4861;method_48352()Lnet/minecraft/class_8047;named method_48352Lnet/minecraft/screen/ForgingScreenHandler;method_48352()Lnet/minecraft/class_8047;
-
method_48358
- Mappings:
Namespace Name Mixin selector official eLcbc;e(I)Lbdl;intermediary method_48358Lnet/minecraft/class_4861;method_48358(I)Lnet/minecraft/class_1277;named method_48358Lnet/minecraft/screen/ForgingScreenHandler;method_48358(I)Lnet/minecraft/inventory/SimpleInventory;
-
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 aLcac;a(Lbcz;)Vintermediary method_7609Lnet/minecraft/class_1703;method_7609(Lnet/minecraft/class_1263;)Vnamed onContentChangedLnet/minecraft/screen/ScreenHandler;onContentChanged(Lnet/minecraft/inventory/Inventory;)V
-
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 bLcac;b(Lbxl;)Vintermediary method_7595Lnet/minecraft/class_1703;method_7595(Lnet/minecraft/class_1657;)Vnamed closeLnet/minecraft/screen/ScreenHandler;close(Lnet/minecraft/entity/player/PlayerEntity;)V
-
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 aLcac;a(Lbxl;)Zintermediary method_7597Lnet/minecraft/class_1703;method_7597(Lnet/minecraft/class_1657;)Znamed canUseLnet/minecraft/screen/ScreenHandler;canUse(Lnet/minecraft/entity/player/PlayerEntity;)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 aLcac;a(Lbxl;I)Lcer;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;
-
method_48356
- Mappings:
Namespace Name Mixin selector official cLcbc;c(Lcer;)Zintermediary method_48356Lnet/minecraft/class_4861;method_48356(Lnet/minecraft/class_1799;)Znamed method_48356Lnet/minecraft/screen/ForgingScreenHandler;method_48356(Lnet/minecraft/item/ItemStack;)Z
-
method_48357
- Mappings:
Namespace Name Mixin selector official dLcbc;d(Lcer;)Iintermediary method_48357Lnet/minecraft/class_4861;method_48357(Lnet/minecraft/class_1799;)Inamed method_48357Lnet/minecraft/screen/ForgingScreenHandler;method_48357(Lnet/minecraft/item/ItemStack;)I
-
method_48360
public int method_48360()- Mappings:
Namespace Name Mixin selector official oLcbc;o()Iintermediary method_48360Lnet/minecraft/class_4861;method_48360()Inamed method_48360Lnet/minecraft/screen/ForgingScreenHandler;method_48360()I
-
method_48359
private int method_48359()- Mappings:
Namespace Name Mixin selector official nLcbc;n()Iintermediary method_48359Lnet/minecraft/class_4861;method_48359()Inamed method_48359Lnet/minecraft/screen/ForgingScreenHandler;method_48359()I
-
method_48361
private int method_48361()- Mappings:
Namespace Name Mixin selector official pLcbc;p()Iintermediary method_48361Lnet/minecraft/class_4861;method_48361()Inamed method_48361Lnet/minecraft/screen/ForgingScreenHandler;method_48361()I
-
method_48362
private int method_48362()- Mappings:
Namespace Name Mixin selector official qLcbc;q()Iintermediary method_48362Lnet/minecraft/class_4861;method_48362()Inamed method_48362Lnet/minecraft/screen/ForgingScreenHandler;method_48362()I
-
method_48363
private int method_48363()- Mappings:
Namespace Name Mixin selector official rLcbc;r()Iintermediary method_48363Lnet/minecraft/class_4861;method_48363()Inamed method_48363Lnet/minecraft/screen/ForgingScreenHandler;method_48363()I
-