Interface PoolAliasBinding
- All Known Implementing Classes:
PoolAliasBinding.Direct, PoolAliasBinding.Random, PoolAliasBinding.RandomGroup
@NullMarked
@AsOf("3.4.0")
public sealed interface PoolAliasBinding
permits PoolAliasBinding.Direct, PoolAliasBinding.Random, PoolAliasBinding.RandomGroup
Swaps which template pool a jigsaw structure's pieces draw from, chosen once per structure.
- Since:
- 3.4.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA binding that always resolves the alias to the same target.static final recordA binding that resolves the alias to one weighted target.static final recordA binding that picks one weighted group of bindings and applies all of them. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic PoolAliasBindingReads a Minecraft pool alias binding.static PoolAliasBinding.Directdirect(TemplatePool alias, TemplatePool target) Always resolves the alias to the same target.static PoolAliasBinding.Randomrandom(TemplatePool alias, WeightedList<TemplatePool> targets) Resolves the alias to one weighted target.static PoolAliasBinding.RandomGrouprandomGroup(WeightedList<List<PoolAliasBinding>> groups) Picks one weighted group of bindings and applies all of them.
-
Method Details
-
direct
Always resolves the alias to the same target.- Parameters:
alias- the pool pieces nametarget- the pool they are generated from- Returns:
- a direct binding
- Since:
- 3.4.0
-
random
@AsOf("3.4.0") static PoolAliasBinding.Random random(TemplatePool alias, WeightedList<TemplatePool> targets) Resolves the alias to one weighted target.- Parameters:
alias- the pool pieces nametargets- the pools it may resolve to- Returns:
- a random binding
- Since:
- 3.4.0
-
randomGroup
@AsOf("3.4.0") static PoolAliasBinding.RandomGroup randomGroup(WeightedList<List<PoolAliasBinding>> groups) Picks one weighted group of bindings and applies all of them.- Parameters:
groups- the groups of bindings to choose between- Returns:
- a random-group binding
- Since:
- 3.4.0
-
decode
Reads a Minecraft pool alias binding.- Parameters:
minecraftBinding- the binding to read- Returns:
- the decoded binding
- Since:
- 3.4.0
-