Skip to content

Commit

Permalink
chore: updated neoforge griefing check for new event API
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed Jun 5, 2024
1 parent 857e20d commit 7e17f98
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import dev.ftb.mods.ftblibrary.math.ChunkDimPos;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.monster.EnderMan;
import net.neoforged.bus.api.Event;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.common.NeoForge;
Expand Down Expand Up @@ -48,7 +47,7 @@ private void mobGriefing(EntityMobGriefingEvent event) {
ClaimedChunkImpl cc = ClaimedChunkManagerImpl.getInstance().getChunk(new ChunkDimPos(event.getEntity()));

if (cc != null && !cc.allowMobGriefing()) {
event.setResult(Event.Result.DENY);
event.setCanGrief(false);
}
}
}
Expand Down

0 comments on commit 7e17f98

Please sign in to comment.