We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04d99a1 commit a515c19Copy full SHA for a515c19
src/legacy/api/EventAPI.cpp
@@ -816,7 +816,7 @@ void EnableEventListener(int eventId) {
816
IF_LISTENED(EVENT_TYPES::onMobSpawned) {
817
CallEventVoid(
818
EVENT_TYPES::onMobSpawned,
819
- EntityClass::newEntity(ev.mob()),
+ EntityClass::newEntity(ev.mob().has_value() ? ev.mob().as_ptr() : nullptr),
820
FloatPos::newPos(ev.pos(), ev.blockSource().getDimensionId())
821
);
822
}
0 commit comments