Soul Shards: The Old Ways

Soul Shards: The Old Ways

13M Downloads

[API] API-ify Soul Cage so integration with other mods is easier.

TehNut opened this issue ยท 6 comments

commented

Requested by @ProfessorProspector for https://github.com/TechReborn/TechReborn

commented

well probably more for an addon but yes.

commented

Preferably I could just extend a BaseCage and tell it when to handle the mob spawning. Something like canSpawn() and I could return true if it has enough energy and stuff.

commented

Well I assume you would want to be able to modify speed as well

commented

ah yes, that too. I also need to add a Nicolas Soul Cage that is super fast :P

commented

I'm not sure how feasible doing it all through the API is. But I can move some checks into their own methods. So you'd extend TileEntityCage and override getCooldown() (to change spawn speed), getSpawnAmount() (to change amount of mobs spawned), and canSpawn() (if spawning is allowed). Other than those three methods (and any helper methods you need for your own stuff), the rest should be able to be left untouched.

http://paste.ubuntu.com/15623779/

commented

Yeah, looks good.