Open vlad-iakovlev opened 3 months ago
Just tried suggestion 2. I replaced
if (entity.level().gameTime % 15 == 0L) {
val look = entity.lookAngle
val factor = { i: Double -> (i * 0.1 + (i * boost - i) * 0.5) }
entity.deltaMovement = entity.deltaMovement.add(
factor(look.x),
factor(look.y),
factor(look.z),
)
}
with:
val look = entity.lookAngle
val factor = { i: Double -> (i * boost * 0.01) }
entity.deltaMovement = entity.deltaMovement.add(
factor(look.x),
factor(look.y),
factor(look.z),
)
and it worked just fine. Should produce similar values for default boost 1.25.
I can create a PR if you don't mind
What happened?
I just tried your jetpack mod for Create and it works awesome. However, I noticed that elytra boost is too weak for me. I tried setting
elytraBoost
value to 2 and noticed that it works like fireworks, with delay. But it's different delay. It can ignoreUP
button click and I have to hold the button so it can be registered and processed. And usually I overboost with this setting :)Looks like it was caused by calculating deltaMovement every 15 ticks: https://github.com/PssbleTrngle/FlightLib/blob/96bb6bf3ce9aac5c62afd8e8a8e1096424d1cb0d/common/src/main/kotlin/com/possible_triangle/flightlib/logic/JetpackLogic.kt#L107
I suggest these possible solutions:
elytraBoostDelay
set to 15 when boost was processed and then updating it inonTick
method. Not sure actually if it will work, I'm not familiar with creating Minecraft mods. It could be just some other weird behaviour.Also, I think it's a good idea to limit maximum elytra speed after boost, similar to fireworks.
Mod Version
create-jetpack-fabric 4.2.0
Minecraft Version
None
Forge Version
Fabric 0.15.11 on Minecraft 1.20.1
Relevant log output
No response