mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Fix undead causing chunkloading leading to extensive lag (#8583)
This commit is contained in:
1 parent
da82705e86
commit
2fb8b2eb18
1 file changed
+2
@@ -1161,6 +1161,8 @@ public class ForgeHooks
|
||||
|
||||
public static boolean canEntityDestroy(Level level, BlockPos pos, LivingEntity entity)
|
||||
{
|
||||
if (!level.isLoaded(pos))
|
||||
return false;
|
||||
BlockState state = level.getBlockState(pos);
|
||||
return ForgeEventFactory.getMobGriefingEvent(level, entity) && state.canEntityDestroy(level, pos, entity) && ForgeEventFactory.onEntityDestroyBlock(entity, pos, state);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user