PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

50M Downloads

Drone Crafting Crafting - More elegant failure needed

MuteTiefling opened this issue ยท 6 comments

commented

Minecraft Version

1.15.2

Forge Version

forge-31.1.78

Mod Version

pneumaticcraft-repressurized-1.15.2-1.1.1-14

Describe your problem, including steps to reproduce it

This was something I had encountered before and was just reminded of it. If a drone has a crafting routine but cannot store the result of the craft due to limited inventory, it looks like it ends up in an infinite loop that brings TPS to nothing. Fixing it generally requires killing the game and enabling the option to disable drone AI before restarting.

It would be nice if this action could be made to simply skip over the craft if there's no room in the inventory.

Any other comments?

commented

https://gist.github.com/MuteTiefling/1bf9f6b13323af96751cfc4a2716e216

Going to add this here as I just got done restarting to try again. The drone had 4 inventory upgrades and should have been holding two things, some shears and 8 mystical flowers (all the same color). This attempted a craft to turn them into petals and crashed out entirely.

Edit: Actually this may be unrelated. Doing more testing here.

commented

Having trouble reproducing the TPS issue in a small test world, but my drone has definitely gotten stuck here. Also noticed the crash log is referencing FTB quests as part of the issue. I'll have to see about removing that from my main pack and testing again.

commented

The crash is almost certainly because FTB Quests doesn't know how to handle fake players; I'd raise an issue with them for that. Simplest option is just to ignore fake players (e.g. add a !(player instanceof FakePlayer) check in places like https://github.com/FTBTeam/FTB-Quests/blob/master/src/main/java/com/feed_the_beast/ftbquests/FTBQuestsEventHandler.java#L276 )

As for the drone getting stuck & TPS issues, I'll do some debugging and see what I can find.

commented

Removed FTB Quests and it's working fine now.

After further testing last night I think there's just nothing here for you to worry about, sorry.

This is the program if you're interested, however.

https://gist.github.com/MuteTiefling/598dcb874519df612b447732607ea8a8

It had four inventory upgrades and should only ever have 2 item stacks at a time. But the first crash happened after I had tossed it some leftover flowers from my inventory and I thought I was seeing the same issue I had seen with a program in 1.12 where my mining drone would crash the world when compacting things like redstone. Back then I had attributed it to inventory space because it would only ever happen after it had been mining for a while. That too may have been a weird mod interaction, however.

commented

Update: did some debugging, and I can't reproduce the TPS issues either. My test was a drone (with only one inventory upgrade) crafting wooden pickaxes; it imports the planks and the sticks and crafts and exports the wooden picks just fine.

Note: if drones don't have space for resulting items (or returned container items, like buckets), they won't hang up; they just drop excess stuff on the ground. See https://github.com/TeamPneumatic/pnc-repressurized/blob/1.15/src/main/java/me/desht/pneumaticcraft/common/progwidgets/ProgWidgetCrafting.java#L251 and https://github.com/TeamPneumatic/pnc-repressurized/blob/1.15/src/main/java/me/desht/pneumaticcraft/common/progwidgets/ProgWidgetCrafting.java#L269

Could you pastebin the program you were using when you hit the problem (and how many inventory upgrades your drone has) ?

commented

OK, fair enough. I'll close this for now, feel free to reopen if you find anything else new.