An update to this event.
Code: Select all if (Pixelmon.EVENT_BUS.post(new
PokeLootClaimedEvent((EntityPlayerMP)player, tile))) {
return true;
}
if (tile.shouldBreakBlock()) {
if (MinecraftForge.EVENT_BUS.post(new
BreakEvent(world, pos, state, player))) {
return true;
}
world.setBlockToAir(pos);
}
if (tile.isCustomDrop()) {
this.drops = tile.getCustomDrops();
} else {
this.drops = this.getRandomDrops(visibility);
}
As shown above, the code works, but the event doesn't include the drops
from the poke chest, which would be something essential for the event.
Possible fix:
Code: Select allif (tile.isCustomDrop()) {
this.drops = tile.getCustomDrops();
} else {
this.drops = this.getRandomDrops(visibility);
}
if (Pixelmon.EVENT_BUS.post(new
PokeLootClaimedEvent((EntityPlayerMP)player, tile, this.drops))) {
return true;
}