Package net.minecraft.screen
Class PlayerScreenHandler
java.lang.Object
net.minecraft.screen.ScreenHandler
net.minecraft.screen.AbstractRecipeScreenHandler<CraftingInventory>
net.minecraft.screen.PlayerScreenHandler
public class PlayerScreenHandler extends AbstractRecipeScreenHandler<CraftingInventory>
-
Field Summary
Fields Modifier and Type Field 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
Fields inherited from class net.minecraft.screen.ScreenHandler
slots, syncId
-
Constructor Summary
Constructors Constructor Description PlayerScreenHandler(PlayerInventory inventory, boolean onServer, PlayerEntity owner)
-
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)
CraftingInventory
method_29281()
void
onContentChanged(Inventory inventory)
void
populateRecipeFinder(RecipeFinder finder)
ItemStack
transferSlot(PlayerEntity player, int index)
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, 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
-
BLOCK_ATLAS_TEXTURE
-
EMPTY_HELMET_SLOT_TEXTURE
-
EMPTY_CHESTPLATE_SLOT_TEXTURE
-
EMPTY_LEGGINGS_SLOT_TEXTURE
-
EMPTY_BOOTS_SLOT_TEXTURE
-
EMPTY_OFFHAND_ARMOR_SLOT
-
EMPTY_ARMOR_SLOT_TEXTURES
-
EQUIPMENT_SLOT_ORDER
-
craftingInput
-
craftingResult
-
onServer
public final boolean onServer -
owner
-
-
Constructor Details
-
PlayerScreenHandler
-
-
Method Details
-
populateRecipeFinder
- Specified by:
populateRecipeFinder
in classAbstractRecipeScreenHandler<CraftingInventory>
-
clearCraftingSlots
public void clearCraftingSlots()- Specified by:
clearCraftingSlots
in classAbstractRecipeScreenHandler<CraftingInventory>
-
matches
- Specified by:
matches
in classAbstractRecipeScreenHandler<CraftingInventory>
-
onContentChanged
- Overrides:
onContentChanged
in classScreenHandler
-
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
@Environment(CLIENT) public int getCraftingSlotCount()- Specified by:
getCraftingSlotCount
in classAbstractRecipeScreenHandler<CraftingInventory>
-
method_29281
-
getCategory
- Specified by:
getCategory
in classAbstractRecipeScreenHandler<CraftingInventory>
-