Package net.glowstone.inventory.crafting
Class PlayerRecipeMonitor
java.lang.Object
net.glowstone.inventory.crafting.PlayerRecipeMonitor
-
Constructor Summary
ConstructorDescriptionPlayerRecipeMonitor
(GlowPlayer player) Creates an instance associated with the given player and with an empty recipe book. -
Method Summary
Modifier and TypeMethodDescriptionCreates a message to send this recipe book's state to the client.boolean
int
hashCode()
boolean
boolean
void
read
(CompoundTag playerData) Restores state from an NBT tag.void
setBookOpen
(boolean bookOpen) void
setFilterCraftable
(boolean filterCraftable) toString()
void
write
(CompoundTag playerData) Populates a recipeBook compound subtag and adds it to the given tag.
-
Constructor Details
-
PlayerRecipeMonitor
Creates an instance associated with the given player and with an empty recipe book.- Parameters:
player
- the player
-
-
Method Details
-
createInitMessage
Creates a message to send this recipe book's state to the client.- Returns:
- an
UnlockRecipesMessage
containing this recipe book's state
-
read
Restores state from an NBT tag.- Parameters:
playerData
- an NBT tag containing a compound subtag named recipeBook
-
write
Populates a recipeBook compound subtag and adds it to the given tag.- Parameters:
playerData
- a compound tag describing the player
-
getPlayer
-
getRecipes
-
getToBeDisplayed
-
isBookOpen
public boolean isBookOpen() -
isFilterCraftable
public boolean isFilterCraftable() -
setBookOpen
public void setBookOpen(boolean bookOpen) -
setFilterCraftable
public void setFilterCraftable(boolean filterCraftable) -
equals
-
hashCode
public int hashCode() -
toString
-