Random Things

Random Things

44M Downloads

NatureCore spawns CREATURE inside block instead of on top of it

OrdinatorStouff opened this issue ยท 0 comments

commented

Sometimes the Nature Core will spawn animals that are "inside" a block instead of on top of it.

I believe the issue is when TileEntityNatureCore.java creates a SpawnListEntry for a random block in it's range, it uses the block location and does not account for or add-in the CREATURE's height to the Y-value. The code also does not appear to check if the block above is an air block so it seems like it could be possible for animals to spawn "underground" (if for example a grass block is under any other block and hasn't reverted to dirt) it could have a creature spawned there. I have heard "suffocating" animals near a Nature Core but I have not done more extensive testing to validate this or not.

It is possible to recreate in the current version by placing a nature core 3-blocks below the surface of an otherwise solid area at least 11x11 around filled-in and through 2 or 3 below the core as well. The top layer should be grass or other biome-specific valid block for that biome's entities to spawn on. At normal tickrate of 20tps and a random selection of any block of 726 possible once every ~400 ticks at random it could potentially take hours before a top-level grass block is selected for an animal spawn.