Mob Crusher generates infinite essence
ouroborus opened this issue ยท 6 comments
Industrial Foregoing Version: 1.12.1-1.5.0-83
TeslaCoreLib Version: 1.12-1.0.9
Built my first mob crusher. Noticed, upon placing it, it was already full with 8000mB essence. Pumping doesn't decrease this. No power is being provided.
Are you sure there isn't XP in the working area? It will pick up XP and turn it into essence
Erm... Possibly, but not at that rate. I have a nearby machine throwing bottles o' enchantment for pickup by another machine but this is every 4-5 seconds or so and the mob crusher appears the be generating 8000 essence per tick (i.e.: it appears to always be full, it's not possible to empty it).
It seems to only effect mob crushers whose effect area intersects with a certain (seemingly random) volume.
In this screen shot, the "something" effecting the mob crushers appear to be towards the center. (All of the mob crushers shown in the screenshot are effected. The mob crushers at the lower left and the upper right are at the edges of the effect. The mob crushers buried in the back wall, behind the chests, are also at the edge of the effect. These are not all possible locations, just a sampling.) The volume isn't cuboid. The volume seems to be around one block above the floor as crushers placed three blocks into the floor are effected.
I'm not able to reproduce this any more. I tried copying the world to single player instance and couldn't reproduce the issue. I tried copying the world the another multiplayer instance and couldn't reproduce it. I restarted the original server and the issue stopped happening. (I had rebooted it before and still had the issue. I don't know what changed this time.)
At this point I can only guess what was going on. I notice your code, here, asks for a list of xp orb entities in the volume, adds essence according to their values, then marks the orb as dead. However, there doesn't seem to be a check to see if the orb is dead in the first place. I think it might be possible for an entity to get "stuck" in a dead state and never cleaned up. If this happened, it might explain what I was seeing.
I was able to verify my suspicion. The mob crusher is not taking into account if a xp orb is dead or not and so can process a particular orb serveral times effectively creating a dup'ing situation.
In the configuration on the left, 10 bottle o' enchanting generate ~30,000mB of essence while, with the configuration on the right, 10 bottles generate 1300mB.
I suspect there were a number of dead xp orbs hanging around due to an earlier, unrelated incident and the mob crushers from earlier were repeatedly processing them.