[QUESTION] Fill water bottle with drone
duncanwebb opened this issue ยท 9 comments
Minecraft Version
1.16.4
Forge Version
35.1.7
Mod Version
pneumaticcraft-repressurized-1.16.4-2.7.2-86
Describe your problem, including steps to reproduce it
Is it possible to fill a bottle with water using a drone?
I've tried right-clicking a tank or a water source block with click item and click block.
Drones can now fill water bottles in build 88. Would appreciate if you could give this build a good testing (including making sure that other right-click functionality still works as expected!)
Thanks, I couldn't get this to work. I assume that right-click item on a water source block with the "up" setting.
The only funny I've seen so far is clicking a number of air canisters into a charging stations puts one in the charging station and the others go into the off hand. Here I was trying to get empty the air out of canisters, so they would stack. For some reason air canisters are not stacking even when they are either full of empty. There must be some NBT information that is different.
Slightly off-topic - Would it be possible to craft an item that results in the item without air and NBT data? Items with air don't work in JEI recipes.
This definitely works (I just tested it):
That's in "Use Item" mode, clicking side UP, and I limited the number of bottles it imports at a time to 1 (you could import more, but any filled bottles which don't fit in the drone's inventory will be dropped on the ground - inventory upgrades would be useful). The drone happily zips between the chest and pool, taking empty bottles, filling them and depositing the filled bottles.
The only funny I've seen so far is clicking a number of air canisters into a charging stations puts one in the charging station and the others go into the off hand.
Intended. The charging station charging slot can accept only a single item at a time (for obvious reasons). But the offhand slot is also available in the charging station GUI for shift-clicking into, so any excess canisters will go in there. It's just the way shift-clicking works.
Here I was trying to get empty the air out of canisters, so they would stack. For some reason air canisters are not stacking even when they are either full of empty. There must be some NBT information that is different.
Yeah, it's likely NBT isn't completely cleared when air is drained out. There's probably still an "air: 0" tag on there. There's a handy /dumpNBT
command (added by PNC, requires op status) you can use to inspect your held item.
Slightly off-topic - Would it be possible to craft an item that results in the item without air and NBT data? Items with air don't work in JEI recipes.
You mean self-craft recipes to reset the NBT?
This definitely works (I just tested it):
Now I tried it again and it works. Pretty sure I did exactly as you did but didn't save the program. I tried with and without an item piece containing a glass bottle and with click item and click block. Today I'm using build 90 and yesterday build 89. Again many thanks for the change.
inventory upgrades would be useful
Indeed, they are, the brewing drone has four inventory upgrades.
I'm still testing the right click behaviour. Right-clicking a PPP with a tank of memory essence filled the PPP's tank, filled the spawner core shell, moved the memory essence to the output tank and right-clicked the PPP with the same tank. What was odd was that the right click removed the liquid in the output tank and placed the rest of the memory essence in the input tank. Again maybe that this is the expected behaviour.
There's probably still an "air: 0" tag on there
Many thanks for the /dumpNBT command, I knew I'd seen the NBT of an item somewhere but my memory failed me.
One set has air:29 and the others have air:30
You mean self-craft recipes to reset the NBT?
Danger is with any of the code around right-clicking, fixing one thing often breaks another... so a lot of testing is going to be needed.
Sounds to me like eventually refactoring the code to use a "State Chart" might help there. Not sure though, this is something I've done in web dev so I'm not sure how it would apply to a minecraft mod from a technical perspective.
Click Item on a water source block should work. If it's not, I'll need to look into that...
Right-clicking a bottle on a tank (at least PNC tanks) does not do anything. I could add that functionality, but need to decide how much water should be taken from the tank. A water bottle is technically 1/3 of a bucket, so 333 or 334 mB... not great. And of course, filling a water bottle from a source block doesn't use the water at all.
Just tested, it doesn't work. I think I can see why, so it shouldn't be too hard to fix. Danger is with any of the code around right-clicking, fixing one thing often breaks another... so a lot of testing is going to be needed.