Woot

Woot

24M Downloads

Error when PNC:R Drone kills entity

Seaniau opened this issue ยท 5 comments

commented

Minecraft Version
1.12.2

Forge Version
14.23.4.2715

Mod Version
All The Mods 3 - 5.9.8d

WOOT is ticking Pneumaticcraft Repressurized Drones when they have less than an 8-Slot inventory and kill a Mob.

See server error: https://pastebin.com/YN0Lyweb

I was sent here by the PNC:R guys, who analysed the error and provided me a workaround of upgrading the Drone to an 8+ slot inventory, which works. They advised the issue lies with WOOT.

commented

Just for info (I'm the PNC:R dev in question):

This is a bug in Woot, not PNC:R, at https://github.com/Ipsis/Woot/blob/1_12/src/main/java/ipsis/woot/event/HandlerLivingDeathEvent.java#L77

The findPrism() method is assuming the entity has a full-size inventory, which is not necessarily the case for a drone's fake player. The method should be checking the number of slots the drone's inventory has and not assuming it has at least 9.

Changing 8 to Math.min(8, entityPlayer.inventory.getSizeInventory()) on that line should fix this.

commented

My favourite bugs - one that come with code solutions :)

So the prism is only supposed to be handled by real players and only when in the hotbar. So I'll probably change the code to ignore the event for FakePlayers.

I'll be rolling out a new release this weekend to fix up a couple of other unrelated issues, so I'll make sure the FakePlayer change is in there as well.

commented

Iโ€™m new to Github, this is my first time logging an issue.
Thank you guys for being so helpful, keep up the great work โœŒ๏ธ

commented

8af9b47

Quick watch of a DireWolf video and I've confirmed, no more crashes with PNC:R.
Now ignores the fakeplayer successfully.

commented

Fixed in 1.12.2-1.4.3 which is on CurseForge