deprecate JavaBlockState#hasBlockEntity

This commit is contained in:
onebeastchris 2024-06-19 02:20:47 +02:00
parent 85f9346152
commit 82724b4020
2 changed files with 8 additions and 3 deletions

View file

@ -73,7 +73,10 @@ public interface JavaBlockState {
* Gets whether the block state has block entity
*
* @return whether the block state has block entity
* @deprecated Does not have an effect. If you were using this to
* set piston behavior, use {@link #pistonBehavior()} instead.
*/
@Deprecated(forRemoval = true)
boolean hasBlockEntity();
/**
@ -104,6 +107,11 @@ public interface JavaBlockState {
Builder pistonBehavior(@Nullable String pistonBehavior);
/**
* @deprecated Does not have an effect. If you were using this to
* * set piston behavior, use {@link #pistonBehavior(String)} instead.
*/
@Deprecated
Builder hasBlockEntity(boolean hasBlockEntity);
JavaBlockState build();

View file

@ -435,9 +435,6 @@ public final class BlockRegistryPopulator {
if (!javaBlockState.canBreakWithHand()) {
builder.requiresCorrectToolForDrops();
}
if (javaBlockState.hasBlockEntity()) {
builder.setBlockEntity(javaBlockState.block().blockEntityType());
}
String cleanJavaIdentifier = BlockUtils.getCleanIdentifier(javaBlockState.identifier());
String pickItem = javaBlockState.pickItem();
Block block = new Block(cleanJavaIdentifier, builder) {