Expose all possible block data states (#11958)

This commit is contained in:
masmc05
2025-01-13 00:56:56 +02:00
committed by GitHub
parent 50c2c59c4e
commit 3709150bc1
2 changed files with 31 additions and 0 deletions

View File

@ -1,5 +1,6 @@
package org.bukkit.block;
import java.util.Collection;
import java.util.function.Consumer;
import org.bukkit.Keyed;
import org.bukkit.Material;
@ -120,6 +121,7 @@ import org.bukkit.inventory.ItemType;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Unmodifiable;
/**
* While this API is in a public interface, it is not intended for use by
@ -169,6 +171,15 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
@Override
B createBlockData();
/**
* Creates a collection of {@link BlockData} instances for this block type, with all
* possible combinations of properties values.
*
* @return new block data collection
*/
@Override
@Unmodifiable @NotNull Collection<B> createBlockDataStates();
/**
* Creates a new {@link BlockData} instance for this block type, with all
* properties initialized to unspecified defaults, except for those provided
@ -3480,6 +3491,14 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
@NotNull
BlockData createBlockData();
/**
* Creates a collection of {@link BlockData} instances for this block type, with all
* possible combinations of properties values.
*
* @return new block data collection
*/
@Unmodifiable @NotNull Collection<? extends BlockData> createBlockDataStates();
/**
* Creates a new {@link BlockData} instance for this block type, with all
* properties initialized to unspecified defaults, except for those provided