Skip to content

Commit 7aa6e7d

Browse files
committed
build: fix
1 parent b38b21d commit 7aa6e7d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • src/main/java/com/aetherteam/aether/entity/monster/dungeon/boss

src/main/java/com/aetherteam/aether/entity/monster/dungeon/boss/SunSpirit.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,15 @@
5151
import net.minecraft.world.entity.monster.Enemy;
5252
import net.minecraft.world.entity.player.Player;
5353
import net.minecraft.world.level.Explosion;
54+
import net.minecraft.world.level.GameRules;
5455
import net.minecraft.world.level.Level;
5556
import net.minecraft.world.level.ServerLevelAccessor;
5657
import net.minecraft.world.level.block.Block;
5758
import net.minecraft.world.level.block.Blocks;
5859
import net.minecraft.world.level.block.state.BlockState;
5960
import net.minecraft.world.phys.AABB;
6061
import net.minecraft.world.phys.Vec3;
62+
import net.minecraft.world.phys.shapes.Shapes;
6163
import org.jetbrains.annotations.Nullable;
6264

6365
import java.util.EnumSet;
@@ -185,7 +187,8 @@ public void tick() {
185187
*/
186188
private void breakBlocks() {
187189
if (this.level() instanceof ServerLevel serverLevel) {
188-
if (EventHooks.canEntityGrief(this.level(), this)) {
190+
// TODO: [Fabric Porting] Protection API?
191+
if (this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
189192
BlockPos.betweenClosedStream(this.getBoundingBox().inflate(1, 0, 1)).forEach((pos) -> {
190193
BlockState state = this.level().getBlockState(pos);
191194
if (this.isBreakable(state)

0 commit comments

Comments
 (0)