Fix textures, add slime chunks/enderman spawning, new tiles, wall model, mob caps & despawn#15
Conversation
…model fix Agent-Logs-Url: https://github.com/sriail/MCPE-WASM/sessions/a797dda0-b68b-4ec5-a52f-2b22f93ddb4e Co-authored-by: sriail <225764385+sriail@users.noreply.github.com>
Agent-Logs-Url: https://github.com/sriail/MCPE-WASM/sessions/a797dda0-b68b-4ec5-a52f-2b22f93ddb4e Co-authored-by: sriail <225764385+sriail@users.noreply.github.com>
|
@copilot currently the game is looking good, but bugs still persist: first, enderman are not spawning at night or in caves, and slimes don't spawn or look like slimes (spawning on the surface) update the slime, ensure that the zombie is still a mob, and make it function properly (only changed the texture, not behavior or actions) the texture needs to be mapped, needs to only spawn in caves in slime chucks, and need to appropriately split on death according to the slime mob, model, and behavior from https://github.com/sriail/MinecraftConsoles. |
…despawn Agent-Logs-Url: https://github.com/sriail/MCPE-WASM/sessions/47831b05-a769-472b-9a30-6abef38e0961 Co-authored-by: sriail <225764385+sriail@users.noreply.github.com>
Addressed in commit Slime spawning — Removed the swamp-surface spawn path entirely. Slimes now only spawn underground (y < 40) in slime chunks using the vanilla chunk-hash algorithm. The zombie texture/behavior is untouched; only the Door textures — Birch and spruce door
Wall model — Added Andesite in hand — Emerald icon — Mob spawning — Chunk scan radius doubled (4 → 8 chunks), hostile cap raised to 32, passive cap to 24. Mobs in unloaded chunks or more than 128 blocks from any player are despawned every ~10 seconds (200 ticks). |
|
the game spawns WAY TO MANY Mobs, and should only save them around once every 30 s ont once per tick 2index.js:1 Time to save 50 entities: 0.000000 s. Size: 10440 bytes |
Agent-Logs-Url: https://github.com/sriail/MCPE-WASM/sessions/eaaec3d4-d6f7-4332-827b-9fcc2d86fc2b Co-authored-by: sriail <225764385+sriail@users.noreply.github.com>
Fixed in commit Root cause — entity save on every chunk eviction: Additional changes:
|
|
@copilot the game spawns WAY TO MANY Mobs, and should only save them around once every 30 s ont once per tick 2index.js:1 Time to save 50 entities: 0.000000 s. Size: 10440 bytes |



saveEntities(level, chunk)called on every chunk eviction was rewriting the full entities.dat file hundreds of times per second — now skipped when a non-NULL chunk is passed (entities are stored in a single file; per-chunk eviction saves are redundant)(tickCount + entityId) % 400to spread the cost across ticks rather than checking all mobs on the same tick; despawn radius tightened to 96 blocks (6 chunks)