This repository was archived by the owner on Jan 18, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 51
This repository was archived by the owner on Jan 18, 2021. It is now read-only.
Random crash when spawning mobs #153
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Environment: Windows Server 2019
Official EZ release based on 1.16.20.03
The crash (screenshot below) has been happening rarely and randomly for a few versions now. It only seems to happen in my spawn area, where I have a script running which removes hostile mobs from existence as soon as they spawn. I'm guessing this is relevant based on the crash dump including something about spawning.
And the part of the script that might be triggering the crash, if it's relevant:
const spawnArea = {xnw: -318, znw: -286, xse: -124, zse: -67, ylo: 63, yhi: 255};
const hitList = ["minecraft:creeper", "minecraft:drowned", "minecraft:evocation_illager", "minecraft:husk",
"minecraft:phantom", "minecraft:pillager", "minecraft:ravager", "minecraft:silverfish",
"minecraft:slime", "minecraft:stray", "minecraft:vex", "minecraft:vindictor", "minecraft:witch",
"minecraft:zombie", "minecraft:zombie_villager", "minecraft:cave_spider", "minecraft:spider", "minecraft:zombie_villager_v2"];
system.listenForEvent("minecraft:entity_created", (eventData) => applyMonsterRules(eventData.data.entity));
function applyMonsterRules(entity) {
//if the new mob is a monster on the list and is inside the spawn area, remove it from existence
let loc = (system.getComponent(entity, "minecraft:position")).data;
if(hitList.includes(entity.__identifier__) && loc.x > spawnArea.xnw && loc.y > spawnArea.ylo && loc.z > spawnArea.znw &&
loc.x < spawnArea.xse && loc.y < spawnArea.yhi && loc.z < spawnArea.zse) {
system.destroyEntity(entity);
return;
}
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
