Class PoolExtension

java.lang.Object
org.moddingx.libx.sandbox.structure.PoolExtension

public class PoolExtension extends Object
Specifies an extension to a template pool.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<net.minecraft.core.Holder<PoolExtension>>
     
    static final com.mojang.serialization.Codec<PoolExtension>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PoolExtension(net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool> pool, boolean required, List<com.mojang.datafixers.util.Pair<net.minecraft.world.level.levelgen.structure.pools.StructurePoolElement,Integer>> elements)
     
    PoolExtension(net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool> pool, List<com.mojang.datafixers.util.Pair<net.minecraft.world.level.levelgen.structure.pools.StructurePoolElement,Integer>> elements)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<com.mojang.datafixers.util.Pair<net.minecraft.world.level.levelgen.structure.pools.StructurePoolElement,Integer>>
    Gets the list of elements and weights to extend the template pool.
    net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool>
    Gets the pool id to extend.
    boolean
    Gets whether the extension is required.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DIRECT_CODEC

      public static final com.mojang.serialization.Codec<PoolExtension> DIRECT_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<net.minecraft.core.Holder<PoolExtension>> CODEC
  • Constructor Details

    • PoolExtension

      public PoolExtension(net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool> pool, List<com.mojang.datafixers.util.Pair<net.minecraft.world.level.levelgen.structure.pools.StructurePoolElement,Integer>> elements)
    • PoolExtension

      public PoolExtension(net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool> pool, boolean required, List<com.mojang.datafixers.util.Pair<net.minecraft.world.level.levelgen.structure.pools.StructurePoolElement,Integer>> elements)
  • Method Details

    • pool

      public net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool> pool()
      Gets the pool id to extend.
    • required

      public boolean required()
      Gets whether the extension is required. Required extensions will throw an exception if the target pool does not exist.
    • elements

      public List<com.mojang.datafixers.util.Pair<net.minecraft.world.level.levelgen.structure.pools.StructurePoolElement,Integer>> elements()
      Gets the list of elements and weights to extend the template pool.