Create config option to place non-source liquid blocks when buckets break holding liquid
Lordician opened this issue ยท 8 comments
Issue Description
I am using this mod with Better With mods (and some other mods) in my own custom pack, but noticed an issue using the wooden bucket in conjunction with the settings.
What Happens
The wooden bucket broke and dropped a water source at my feet.
What You Expect to Happen
I expected it to break and drop a bit of water (same amount as when you right click with it), but not a full source block, according to the HCBuckets setting of the Better With Mods mod.
Script
-none-
Crash Log
-none-
Affected Versions
Do not use latest
; please supply accurate version numbers.
- Minecraft: 1.12.2
- Forge: forge1.12.2-14.23.5.2836
- Dropt: dropt-1.12.2-1.14.0
- Pyrotech: pyrotech-1.0.2
- Athenaeum: athenaeum-1.12.2-1.17.1
- Better With Mods: BetterWithMods-1.12-2.3.20-1027
The wooden bucket broke and dropped a water source at my feet.
This is the intended, stand-alone behavior of the Pyrotech buckets.
If the other mod is trying to modify that behavior, I'll have to look at what it's trying to do and why it's failing.
From what i see, Better With Mods only modifies the onUseFluidContainer
event.
Maybe i have to put this issue on the Better With Mods part now i look at it closer.
I'm not familiar with HCBuckets or BWM for that matter. From what you said though, it sounds like it modifies what happens when you place a liquid from a bucket into the world, ie. making it place a non-source block of the liquid. Do I have that right?
By default, when a wooden bucket is filled with water, it will lose durability over time and, once that durability is exhausted, it will spill its contents onto the ground in the form of a source block of the liquid it's carrying. This also happens when a clay or stone bucket is filled with a hot liquid; the bucket breaks and spills its contents.
I could look into adding a config option for the buckets that would make the buckets place a non-source liquid block when broken instead of the full source block.
Is this what you're after?
You are right that it modifies liquid holders to place a non-source block instead of a source block on right click.
Your proposed solution would work wonders for me. I suppose you cannot fake the onusefluidcontainer event on the block at the feet of the player when the bucket breaks? That would be an actual fix as far as I can see, but your proposed solution is fine too.
I will first look into using the event and if that doesn't work, fallback to the solution above.
No worries.
Firing the FillBucketEvent
wouldn't work in some situations, like the player being in the air or in / above liquid. I'll most likely be implementing the config options.
It looks like BWM uses the FillBucketEvent
to intercept the bucket fill / place logic.