Magnet does not check if experience orb .isDead before pickup, can collect dead orbs in some cases
Lothrazar opened this issue ยท 3 comments
Description
When you have two different machines or items collection experience orbs, they can get picked up twice.
For example, I have a machine that collects orbs, and calls orb.setDead();
Then the magnet tool collects them, but whats missing is
if (orb.isDead) {
continue;
}
So it can collect dead orbs
Cross reference to the issue reported to me
Lothrazar/Cyclic#475
My code is open source as well so if you can think of anything else i can do to avoid this issue, let me know.
Base information
- Minecraft version: 1.12.1
- Minecraft Forge version: 14.21.1.2420
- Mod Pack: none
So my block does two things, it collects EXP orbs from world and also creates them.
Maybe its not the collection isDead as I thought, it seems like maybe when I put an exp orb in the world, the draconic magnet collects the same orb over and over and over forever. Not sure though?.
Heres my code, do i have anything weird here