Class PlayerRecipeMonitor

java.lang.Object
net.glowstone.inventory.crafting.PlayerRecipeMonitor

public final class PlayerRecipeMonitor extends Object
  • Constructor Details

    • PlayerRecipeMonitor

      public PlayerRecipeMonitor(GlowPlayer player)
      Creates an instance associated with the given player and with an empty recipe book.
      Parameters:
      player - the player
  • Method Details

    • createInitMessage

      public UnlockRecipesMessage createInitMessage()
      Creates a message to send this recipe book's state to the client.
      Returns:
      an UnlockRecipesMessage containing this recipe book's state
    • read

      public void read(CompoundTag playerData)
      Restores state from an NBT tag.
      Parameters:
      playerData - an NBT tag containing a compound subtag named recipeBook
    • write

      public void write(CompoundTag playerData)
      Populates a recipeBook compound subtag and adds it to the given tag.
      Parameters:
      playerData - a compound tag describing the player
    • getPlayer

      public GlowPlayer getPlayer()
    • getRecipes

      public Set<String> getRecipes()
    • getToBeDisplayed

      public Set<String> getToBeDisplayed()
    • isBookOpen

      public boolean isBookOpen()
    • isFilterCraftable

      public boolean isFilterCraftable()
    • setBookOpen

      public void setBookOpen(boolean bookOpen)
    • setFilterCraftable

      public void setFilterCraftable(boolean filterCraftable)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object