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 ScreenHandlerContext
context
private CraftingInventory
input
private PlayerEntity
player
private CraftingResultInventory
result
Fields 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 boolean
canInsertIntoSlot(ItemStack stack, Slot slot)
boolean
canUse(PlayerEntity player)
void
clearCraftingSlots()
void
close(PlayerEntity player)
RecipeBookCategory
getCategory()
int
getCraftingHeight()
int
getCraftingResultSlotIndex()
int
getCraftingSlotCount()
int
getCraftingWidth()
boolean
matches(Recipe<? super CraftingInventory> recipe)
boolean
method_32339(int int2)
void
onContentChanged(Inventory inventory)
void
populateRecipeFinder(RecipeFinder finder)
ItemStack
transferSlot(PlayerEntity player, int index)
protected static void
updateResult(int syncId, World world, PlayerEntity player, CraftingInventory craftingInventory, CraftingResultInventory resultInventory)
Methods inherited from class net.minecraft.screen.AbstractRecipeScreenHandler
fillInputSlots
Methods inherited from class net.minecraft.screen.ScreenHandler
addListener, addProperties, addProperty, addSlot, calculateComparatorOutput, calculateComparatorOutput, calculateStackSize, 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
-
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:
onContentChanged
in classScreenHandler
-
populateRecipeFinder
- Specified by:
populateRecipeFinder
in classAbstractRecipeScreenHandler<CraftingInventory>
-
clearCraftingSlots
public void clearCraftingSlots()- Specified by:
clearCraftingSlots
in classAbstractRecipeScreenHandler<CraftingInventory>
-
matches
- Specified by:
matches
in classAbstractRecipeScreenHandler<CraftingInventory>
-
close
- Overrides:
close
in classScreenHandler
-
canUse
- Specified by:
canUse
in classScreenHandler
-
transferSlot
- Overrides:
transferSlot
in classScreenHandler
-
canInsertIntoSlot
- Overrides:
canInsertIntoSlot
in classScreenHandler
-
getCraftingResultSlotIndex
public int getCraftingResultSlotIndex()- Specified by:
getCraftingResultSlotIndex
in classAbstractRecipeScreenHandler<CraftingInventory>
-
getCraftingWidth
public int getCraftingWidth()- Specified by:
getCraftingWidth
in classAbstractRecipeScreenHandler<CraftingInventory>
-
getCraftingHeight
public int getCraftingHeight()- Specified by:
getCraftingHeight
in classAbstractRecipeScreenHandler<CraftingInventory>
-
getCraftingSlotCount
public int getCraftingSlotCount()- Specified by:
getCraftingSlotCount
in classAbstractRecipeScreenHandler<CraftingInventory>
-
getCategory
- Specified by:
getCategory
in classAbstractRecipeScreenHandler<CraftingInventory>
-
method_32339
public boolean method_32339(int int2)- Specified by:
method_32339
in classAbstractRecipeScreenHandler<CraftingInventory>
-