public class PlayerScreenHandler extends AbstractRecipeScreenHandler<CraftingInventory>
| Modifier and Type | Field and Description |
|---|---|
static Identifier |
BLOCK_ATLAS_TEXTURE |
private CraftingInventory |
craftingInput |
private CraftingResultInventory |
craftingResult |
private static Identifier[] |
EMPTY_ARMOR_SLOT_TEXTURES |
static Identifier |
EMPTY_BOOTS_SLOT_TEXTURE |
static Identifier |
EMPTY_CHESTPLATE_SLOT_TEXTURE |
static Identifier |
EMPTY_HELMET_SLOT_TEXTURE |
static Identifier |
EMPTY_LEGGINGS_SLOT_TEXTURE |
static Identifier |
EMPTY_OFFHAND_ARMOR_SLOT |
private static EquipmentSlot[] |
EQUIPMENT_SLOT_ORDER |
boolean |
onServer |
private PlayerEntity |
owner |
slots, syncId| Constructor and Description |
|---|
PlayerScreenHandler(PlayerInventory inventory,
boolean onServer,
PlayerEntity owner) |
| 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) |
CraftingInventory |
method_29281() |
void |
onContentChanged(Inventory inventory) |
void |
populateRecipeFinder(RecipeFinder finder) |
ItemStack |
transferSlot(PlayerEntity player,
int index) |
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, updateSlotStackspublic static final Identifier BLOCK_ATLAS_TEXTURE
public static final Identifier EMPTY_HELMET_SLOT_TEXTURE
public static final Identifier EMPTY_CHESTPLATE_SLOT_TEXTURE
public static final Identifier EMPTY_LEGGINGS_SLOT_TEXTURE
public static final Identifier EMPTY_BOOTS_SLOT_TEXTURE
public static final Identifier EMPTY_OFFHAND_ARMOR_SLOT
private static final Identifier[] EMPTY_ARMOR_SLOT_TEXTURES
private static final EquipmentSlot[] EQUIPMENT_SLOT_ORDER
private final CraftingInventory craftingInput
private final CraftingResultInventory craftingResult
public final boolean onServer
private final PlayerEntity owner
public PlayerScreenHandler(PlayerInventory inventory, boolean onServer, PlayerEntity owner)
public 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 onContentChanged(Inventory inventory)
onContentChanged in class ScreenHandlerpublic 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>public CraftingInventory method_29281()
@Environment(value=CLIENT) public RecipeBookCategory getCategory()
getCategory in class AbstractRecipeScreenHandler<CraftingInventory>