Skip to content

Commit

Permalink
Add BlockType#hasBlockEntity
Browse files Browse the repository at this point in the history
  • Loading branch information
Lignium authored and Faithcaio committed Oct 4, 2023
1 parent abd07aa commit ba7223a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SpongeAPI
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
package org.spongepowered.common.mixin.api.minecraft.block;

import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.EntityBlock;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockBehaviour;
import org.spongepowered.api.block.BlockSoundGroup;
Expand Down Expand Up @@ -57,4 +58,8 @@ public BlockSoundGroup soundGroup() {
return (BlockSoundGroup) this.soundType;
}

@Override
public boolean hasBlockEntity() {
return this instanceof EntityBlock;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
import net.minecraft.world.level.chunk.ImposterProtoChunk;
import net.minecraft.world.level.chunk.LevelChunk;
import net.minecraft.world.level.entity.EntityTypeTest;
import net.minecraft.world.level.lighting.LevelLightEngine;
import net.minecraft.world.level.storage.LevelData;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ public boolean isAnyOf(final BlockType... types) {
return false;
}

@Override
public boolean hasBlockEntity() {
return false;
}

@Override
public @NotNull Component asComponent() {
return null;
Expand Down

0 comments on commit ba7223a

Please sign in to comment.