Made you look, not infinite xp, but fix it!

Buildable.
LGPL!
This commit is contained in:
Jason Mitchell authored and Jason Mitchell committed 2021-12-02 22:45:42 -08:00
1 parent 5333c14329
commit fe4ab6a67a
12 files changed
+950 -83

No files matched your search

@@ -107,7 +107,7 @@ public class Magnet extends ItemDE {
for (EntityXPOrb orb : xp) {
if (!world.isRemote) {
if (orb.field_70532_c == 0) {
if (orb.field_70532_c == 0 && orb.isEntityAlive()) {
if (MinecraftForge.EVENT_BUS.post(new PlayerPickupXpEvent(player, orb))) continue;
world.playSoundAtEntity(player, "random.orb", 0.1F, 0.5F * ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.8F));
player.onItemPickup(orb, 1);