[1.20.1-1.3.4] Fuel Customization causes modular engine output 0 SU
wanquanw opened this issue ยท 7 comments
1.20.1-1.3.4, using Kubejs to load datapack and customize gasoline.
This would cause modular engine consume gasoline with working sound effects, but outputs 0 su.
Normal engine works well and output 12288su.
I'm trying to look deeper into it, will update if I find anything new.
-> modify burn_rate (0.05 -> 2) causes this problem <-
{
"fluid": "#forge:gasoline",
"sound_pitch": 0.9,
"normal": {
"speed": 96,
"strength": 12288,
"burn_rate": 2
},
"modular": {
"speed": 96,
"strength": 24576,
"burn_rate": 2
},
"huge": {
"speed": 96,
"strength": 24576,
"burn_rate": 1
},
"burner_multiplier": 1.0
}
latests.log (I failed to find useful info) : https://mclo.gs/0EHujrc
minimum mod set to reproduce:
create-1.20.1-6.0.6.jar
createdieselgenerators-1.20.1-1.3.4.jar
kubejs-forge-2001.6.5-build.16.jar (rhino-forge-2001.2.3-build.10.jar & architectury-9.2.14-forge.jar)
Update3:
Only modify strength works (6144 -> 12288)
{
"fluid": "#forge:gasoline",
"sound_pitch": 1,
"normal": {
"speed": 96.0,
"strength": 4096.0,
"burn_rate": 0.05
},
"modular": {
"speed": 96.0,
"strength": 12288.0,
"burn_rate": 0.05
},
"huge": {
"speed": 224.0,
"strength": 12288.0,
"burn_rate": 0.05
},
"burner_multiplier": 1.1
}
Update4:
Only modify burn_rate fails (0.05 -> 2)
{
"fluid": "#forge:gasoline",
"sound_pitch": 1,
"normal": {
"speed": 96.0,
"strength": 4096.0,
"burn_rate": 0.05
},
"modular": {
"speed": 96.0,
"strength": 6144.0,
"burn_rate": 2
},
"huge": {
"speed": 224.0,
"strength": 12288.0,
"burn_rate": 0.05
},
"burner_multiplier": 1.1
}
code analysis:
the major code contributed to this issue is here:
where
length refers to the length of the modular diesel engine.When the remaining tick is smaller than
length, it will consume fuels and refuel remaining ticks. Then remaining tick will be subtracted by length. However, since remaining tick refueled is scaled up (or down) by the burn rate, if the burn rate of the fuel >= 1, remaining ticks refueled will be immediately, fully consumed, making remaining ticks never reach above zero. That's why if a fuel has a burn rate no less than 1 there will be no speed generated.