Class PlayerRecipeModel

java.lang.Object
net.raphimc.viabedrock.protocol.model.PlayerRecipeModel

public final class PlayerRecipeModel extends Object
One backend's recipe query, selected output and collections, independent of screen presentation.
  • Constructor Details

    • PlayerRecipeModel

      public PlayerRecipeModel(ItemRewriter items, CraftingDataTracker recipes, Container owner, boolean filtering, boolean includeCursor, byte[] query)
      Filtering is the effective backend policy; profile preferences belong to the screen controller.
    • PlayerRecipeModel

      public PlayerRecipeModel(ItemRewriter items, CraftingDataTracker recipes, PlayerRecipeContext owner, boolean filtering, boolean includeCursor, byte[] query)
  • Method Details

    • replaceCatalog

      public void replaceCatalog(ItemRewriter items)
      New catalog sources do not reconstruct the backend or recapture its installed ability policies.
    • availability

      public int availability(CreativeInventoryModel.View view, BedrockItem output)
    • reinstallPolicies

      public void reinstallPolicies(boolean filtering)
      Explicit callback installation captures current search abilities without replacing collection sources or expansion.
    • tick

      public boolean tick(int leftTab)
    • refresh

      public void refresh(CreativeInventoryModel.View view, boolean resetExpansion)
    • updateQuery

      public boolean updateQuery(String query)
    • updateQuery

      public boolean updateQuery(byte[] query)
      Raw equality retains selection. Every raw change refreshes search, even when normalization produces identical text.
    • query

      public byte[] query()
    • selectOutput

      public void selectOutput(BedrockItem output)
    • outputCount

      public int outputCount(BedrockItem output)
      Native count text reads output quantity, never the collection's availability state.
    • selectedOutput

      public BedrockItem selectedOutput()
    • collections

      public CreativeInventoryModel collections()