File tree Expand file tree Collapse file tree
src/main/java/com/aetherteam/aether/entity/monster/dungeon/boss Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151import net .minecraft .world .entity .monster .Enemy ;
5252import net .minecraft .world .entity .player .Player ;
5353import net .minecraft .world .level .Explosion ;
54+ import net .minecraft .world .level .GameRules ;
5455import net .minecraft .world .level .Level ;
5556import net .minecraft .world .level .ServerLevelAccessor ;
5657import net .minecraft .world .level .block .Block ;
5758import net .minecraft .world .level .block .Blocks ;
5859import net .minecraft .world .level .block .state .BlockState ;
5960import net .minecraft .world .phys .AABB ;
6061import net .minecraft .world .phys .Vec3 ;
62+ import net .minecraft .world .phys .shapes .Shapes ;
6163import org .jetbrains .annotations .Nullable ;
6264
6365import 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 )
You can’t perform that action at this time.
0 commit comments