Interface TemplatePool

All Superinterfaces:
Keyed, Wrapper
All Known Subinterfaces:
ComposedTemplatePool, ReferencedTemplatePool

@NullMarked @AsOf("3.4.0") public interface TemplatePool extends Wrapper, Keyed
The weighted set of pieces a jigsaw block draws from. A jigsaw structure starts from one pool, and every jigsaw block in a placed piece names the pool its neighbor comes from, which is how a village grows streets and houses outward from its center.
Since:
3.4.0
See Also:
  • Field Details

  • Method Details

    • reference

      @AsOf("3.4.0") static ReferencedTemplatePool reference(ResourceKey key)
      References a template pool already registered under the given key.
      Parameters:
      key - the registry key of the template pool
      Returns:
      a reference to the registered template pool
      Since:
      3.4.0
    • wrap

      @AsOf("3.4.0") default TemplatePool wrap()
      Resolves this pool's key in Minecraft's template-pool registry and decodes the registered value, keeping the key on the result.
      Returns:
      the decoded template pool
      Since:
      3.4.0
    • builder

      @AsOf("3.4.0") static ComposedTemplatePool.Builder builder()
      Creates a new builder for an authored template pool.
      Returns:
      a new builder
      Since:
      3.4.0
    • decode

      @AsOf("3.4.0") static TemplatePool decode(Object minecraftTemplatePool)
      Reads a Minecraft template pool, or a keyed template-pool holder, into a wrapper.
      Parameters:
      minecraftTemplatePool - the template pool or template-pool holder to read
      Returns:
      a reference to the template pool, or the decoded pool when it carries no key
      Since:
      3.4.0