Add exception reporting event

This commit is contained in:
Joseph Hirschfeld
2016-03-03 03:15:41 -06:00
parent 1ae9ee1205
commit 68979dd492
8 changed files with 130 additions and 35 deletions

View File

@@ -68,7 +68,23 @@
if (j >= entityinsentient.getMaxSpawnClusterSize()) {
return;
}
@@ -369,7 +395,7 @@
@@ -268,6 +294,7 @@
NaturalSpawner.LOGGER.warn("Can't spawn entity of type: {}", BuiltInRegistries.ENTITY_TYPE.getKey(type));
} catch (Exception exception) {
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper - ServerExceptionEvent
}
return null;
@@ -356,6 +383,7 @@
entity = biomesettingsmobs_c.type.create(world.getLevel(), EntitySpawnReason.NATURAL);
} catch (Exception exception) {
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper - ServerExceptionEvent
continue;
}
@@ -369,7 +397,7 @@
if (entityinsentient.checkSpawnRules(world, EntitySpawnReason.CHUNK_GENERATION) && entityinsentient.checkSpawnObstruction(world)) {
groupdataentity = entityinsentient.finalizeSpawn(world, world.getCurrentDifficultyAt(entityinsentient.blockPosition()), EntitySpawnReason.CHUNK_GENERATION, groupdataentity);
@@ -77,7 +93,7 @@
flag = true;
}
}
@@ -482,10 +508,12 @@
@@ -482,10 +510,12 @@
return this.unmodifiableMobCategoryCounts;
}