DivineRPG (Official)

DivineRPG (Official)

2M Downloads

TileEntityStupidSpawner does not check if someone is near it

krwminer opened this issue ยท 4 comments

commented

Doesn't this mean that it will spawn all the time until the area is full of mobs?

In the Overworld this makes it easy to setup mob grinders.
In Arcana this could be a big problem as there are so many spawners.

commented

Well you can't obtain them to make overworld grinders. They don't spawn if there are greater than 6 (I think) mobs near them. I guess it couldn't hurt to add a required player radius.

commented

They are used in in the Divine Dungeons, that was what I meant for Overworld Grinders.

commented

Whoops. Yeah I'll definitely fix this.

commented

Also minor coding point, but it is best to not even start the spawning check loops if c > 8.
And you might want to use the bounds check like the one from EntityLiving to make sure you do not spawn things in walls:
return this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty() && !this.worldObj.isAnyLiquid(this.boundingBox);