Package net.minecraft.screen
Class CraftingScreenHandler
java.lang.Object
net.minecraft.screen.ScreenHandler
net.minecraft.screen.AbstractRecipeScreenHandler<CraftingInventory>
net.minecraft.screen.CraftingScreenHandler
public class CraftingScreenHandler extends AbstractRecipeScreenHandler<CraftingInventory>
-
Field Summary
Fields Modifier and Type Field Description private ScreenHandlerContextcontextprivate CraftingInventoryinputprivate PlayerEntityplayerprivate CraftingResultInventoryresultFields inherited from class net.minecraft.screen.ScreenHandler
slots, syncId -
Constructor Summary
Constructors Constructor Description CraftingScreenHandler(int syncId, PlayerInventory playerInventory)CraftingScreenHandler(int syncId, PlayerInventory playerInventory, ScreenHandlerContext context) -
Method Summary
Modifier and Type Method Description booleancanInsertIntoSlot(ItemStack stack, Slot slot)booleancanUse(PlayerEntity player)voidclearCraftingSlots()voidclose(PlayerEntity player)RecipeBookCategorygetCategory()intgetCraftingHeight()intgetCraftingResultSlotIndex()intgetCraftingSlotCount()intgetCraftingWidth()booleanmatches(Recipe<? super CraftingInventory> recipe)voidonContentChanged(Inventory inventory)voidpopulateRecipeFinder(RecipeFinder finder)ItemStacktransferSlot(PlayerEntity player, int index)protected static voidupdateResult(int syncId, World world, PlayerEntity player, CraftingInventory craftingInventory, CraftingResultInventory resultInventory)Methods inherited from class net.minecraft.screen.AbstractRecipeScreenHandler
fillInputSlotsMethods inherited from class net.minecraft.screen.ScreenHandler
addListener, addProperties, addProperty, addSlot, calculateComparatorOutput, calculateComparatorOutput, calculateStackSize, canInsertIntoSlot, canInsertItemIntoSlot, canStacksCombine, 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
-
input
-
result
-
context
-
player
-
-
Constructor Details
-
CraftingScreenHandler
-
CraftingScreenHandler
public CraftingScreenHandler(int syncId, PlayerInventory playerInventory, ScreenHandlerContext context)
-
-
Method Details
-
updateResult
protected static void updateResult(int syncId, World world, PlayerEntity player, CraftingInventory craftingInventory, CraftingResultInventory resultInventory) -
onContentChanged
- Overrides:
onContentChangedin classScreenHandler
-
populateRecipeFinder
- Specified by:
populateRecipeFinderin classAbstractRecipeScreenHandler<CraftingInventory>
-
clearCraftingSlots
public void clearCraftingSlots()- Specified by:
clearCraftingSlotsin classAbstractRecipeScreenHandler<CraftingInventory>
-
matches
- Specified by:
matchesin classAbstractRecipeScreenHandler<CraftingInventory>
-
close
- Overrides:
closein classScreenHandler
-
canUse
- Specified by:
canUsein classScreenHandler
-
transferSlot
- Overrides:
transferSlotin classScreenHandler
-
canInsertIntoSlot
- Overrides:
canInsertIntoSlotin classScreenHandler
-
getCraftingResultSlotIndex
public int getCraftingResultSlotIndex()- Specified by:
getCraftingResultSlotIndexin classAbstractRecipeScreenHandler<CraftingInventory>
-
getCraftingWidth
public int getCraftingWidth()- Specified by:
getCraftingWidthin classAbstractRecipeScreenHandler<CraftingInventory>
-
getCraftingHeight
public int getCraftingHeight()- Specified by:
getCraftingHeightin classAbstractRecipeScreenHandler<CraftingInventory>
-
getCraftingSlotCount
@Environment(CLIENT) public int getCraftingSlotCount()- Specified by:
getCraftingSlotCountin classAbstractRecipeScreenHandler<CraftingInventory>
-
getCategory
- Specified by:
getCategoryin classAbstractRecipeScreenHandler<CraftingInventory>
-