public class CraftingScreenHandler extends AbstractRecipeScreenHandler<CraftingInventory>
| Modifier and Type | Field and Description |
|---|---|
private ScreenHandlerContext |
context |
private CraftingInventory |
input |
private PlayerEntity |
player |
private CraftingResultInventory |
result |
slots, syncId| Constructor and Description |
|---|
CraftingScreenHandler(int syncId,
PlayerInventory playerInventory) |
CraftingScreenHandler(int syncId,
PlayerInventory playerInventory,
ScreenHandlerContext context) |
| Modifier and Type | Method and 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) |
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) |
fillInputSlotsaddListener, 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, updateSlotStacksprivate final CraftingInventory input
private final CraftingResultInventory result
private final ScreenHandlerContext context
private final PlayerEntity player
public CraftingScreenHandler(int syncId,
PlayerInventory playerInventory)
public CraftingScreenHandler(int syncId,
PlayerInventory playerInventory,
ScreenHandlerContext context)
protected static void updateResult(int syncId,
World world,
PlayerEntity player,
CraftingInventory craftingInventory,
CraftingResultInventory resultInventory)
public void onContentChanged(Inventory inventory)
onContentChanged in class ScreenHandlerpublic void populateRecipeFinder(RecipeFinder finder)
populateRecipeFinder in class AbstractRecipeScreenHandler<CraftingInventory>public void clearCraftingSlots()
clearCraftingSlots in class AbstractRecipeScreenHandler<CraftingInventory>public boolean matches(Recipe<? super CraftingInventory> recipe)
matches in class AbstractRecipeScreenHandler<CraftingInventory>public void close(PlayerEntity player)
close in class ScreenHandlerpublic boolean canUse(PlayerEntity player)
canUse in class ScreenHandlerpublic ItemStack transferSlot(PlayerEntity player, int index)
transferSlot in class ScreenHandlerpublic boolean canInsertIntoSlot(ItemStack stack, Slot slot)
canInsertIntoSlot in class ScreenHandlerpublic int getCraftingResultSlotIndex()
getCraftingResultSlotIndex in class AbstractRecipeScreenHandler<CraftingInventory>public int getCraftingWidth()
getCraftingWidth in class AbstractRecipeScreenHandler<CraftingInventory>public int getCraftingHeight()
getCraftingHeight in class AbstractRecipeScreenHandler<CraftingInventory>@Environment(value=CLIENT) public int getCraftingSlotCount()
getCraftingSlotCount in class AbstractRecipeScreenHandler<CraftingInventory>@Environment(value=CLIENT) public RecipeBookCategory getCategory()
getCategory in class AbstractRecipeScreenHandler<CraftingInventory>