Package net.glowstone.inventory.crafting
Class PlayerRecipeMonitor
java.lang.Object
net.glowstone.inventory.crafting.PlayerRecipeMonitor
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerRecipeMonitor(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.booleaninthashCode()booleanbooleanvoidread(CompoundTag playerData) Restores state from an NBT tag.voidsetBookOpen(boolean bookOpen) voidsetFilterCraftable(boolean filterCraftable) toString()voidwrite(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
UnlockRecipesMessagecontaining 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
-