public final class PlayerRecipeMonitor extends Object
Constructor and Description |
---|
PlayerRecipeMonitor(GlowPlayer player)
Creates an instance associated with the given player and with an empty recipe book.
|
Modifier and Type | Method and Description |
---|---|
UnlockRecipesMessage |
createInitMessage()
Creates a message to send this recipe book's state to the client.
|
boolean |
equals(Object o) |
GlowPlayer |
getPlayer() |
Set<String> |
getRecipes() |
Set<String> |
getToBeDisplayed() |
int |
hashCode() |
boolean |
isBookOpen() |
boolean |
isFilterCraftable() |
void |
read(CompoundTag playerData)
Restores state from an NBT tag.
|
void |
setBookOpen(boolean bookOpen) |
void |
setFilterCraftable(boolean filterCraftable) |
String |
toString() |
void |
write(CompoundTag playerData)
Populates a recipeBook compound subtag and adds it to the given tag.
|
public PlayerRecipeMonitor(GlowPlayer player)
player
- the playerpublic UnlockRecipesMessage createInitMessage()
UnlockRecipesMessage
containing this recipe book's statepublic void read(CompoundTag playerData)
playerData
- an NBT tag containing a compound subtag named recipeBookpublic void write(CompoundTag playerData)
playerData
- a compound tag describing the playerpublic GlowPlayer getPlayer()
public boolean isBookOpen()
public boolean isFilterCraftable()
public void setBookOpen(boolean bookOpen)
public void setFilterCraftable(boolean filterCraftable)
Copyright © 2021. All rights reserved.