Package net.minecraft.screen
Class ForgingScreenHandler
java.lang.Object
net.minecraft.screen.ScreenHandler
net.minecraft.screen.ForgingScreenHandler
- Direct Known Subclasses:
AnvilScreenHandler
,SmithingScreenHandler
public abstract class ForgingScreenHandler extends ScreenHandler
-
Field Summary
Fields Modifier and Type Field Description protected ScreenHandlerContext
context
protected Inventory
input
protected CraftingResultInventory
output
protected PlayerEntity
player
Fields inherited from class net.minecraft.screen.ScreenHandler
slots, syncId
-
Constructor Summary
Constructors Constructor Description ForgingScreenHandler(ScreenHandlerType<?> type, int syncId, PlayerInventory playerInventory, ScreenHandlerContext context)
-
Method Summary
Modifier and Type Method Description protected abstract boolean
canTakeOutput(PlayerEntity player, boolean present)
protected abstract boolean
canUse(BlockState state)
boolean
canUse(PlayerEntity player)
void
close(PlayerEntity player)
protected boolean
method_30025(ItemStack itemStack)
void
onContentChanged(Inventory inventory)
protected abstract ItemStack
onTakeOutput(PlayerEntity player, ItemStack stack)
ItemStack
transferSlot(PlayerEntity player, int index)
abstract void
updateResult()
Methods inherited from class net.minecraft.screen.ScreenHandler
addListener, addProperties, addProperty, addSlot, calculateComparatorOutput, calculateComparatorOutput, calculateStackSize, canInsertIntoSlot, canInsertIntoSlot, canInsertItemIntoSlot, canUse, checkDataCount, checkSize, dropInventory, endQuickCraft, getNextActionId, getSlot, getStacks, getType, insertItem, isNotRestricted, onButtonClick, onSlotClick, packQuickCraftData, removeListener, sendContentUpdates, setPlayerRestriction, setProperty, setStackInSlot, shouldQuickCraftContinue, unpackQuickCraftButton, unpackQuickCraftStage, updateSlotStacks
-
Field Details
-
output
-
input
-
context
-
player
-
-
Constructor Details
-
ForgingScreenHandler
public ForgingScreenHandler(@Nullable ScreenHandlerType<?> type, int syncId, PlayerInventory playerInventory, ScreenHandlerContext context)
-
-
Method Details
-
canTakeOutput
-
onTakeOutput
-
canUse
-
updateResult
public abstract void updateResult() -
onContentChanged
- Overrides:
onContentChanged
in classScreenHandler
-
close
- Overrides:
close
in classScreenHandler
-
canUse
- Specified by:
canUse
in classScreenHandler
-
method_30025
-
transferSlot
- Overrides:
transferSlot
in classScreenHandler
-