Expose all possible block data states (#11958)
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user