apace100 / apoli

MIT License
40 stars 46 forks source link

1.21.x/dev fire_projectile power adds unexpected velocity to projectiles #248

Open Samwell-II opened 3 months ago

Samwell-II commented 3 months ago

I am testing out Origins Fabric 1.13.0-alpha.5 and am having a hard time aiming projectiles fired using the origin:fire_projectiles power, specifically while the player is moving. It seems that the player velocity is being added to the projectile several times what it should be. I am unsure how to test this bug using Apoli directly, so my recreation steps are via the Origins mod. If there's a different way I should recreate this bug, or if it should be on the Origins bug tracker instead let me know.

I believe if you load the following power into Origins 1.13.0-alpha.5 and use it while in motion the problem is fairly obvious, but for completeness sake, here are recreatable steps.

First, create a basic fire_projectile power. I found fire charges to be an obvious offender because they aren't effected by gravity and light fire wherever they land. Here is the power I did my testing with:

{
    "type": "origins:fire_projectile",
    "cooldown": 1,
    "entity_type": "minecraft:small_fireball",
    "divergence": 0.01,
    "speed": 0.2,
    "key": {
        "key": "key.origins.primary_active",
        "continuous": true
    }
}

Attach this power to an origin and load it up with Origins 1.20.4. In creative mode, hover some 6-10 blocks off the ground and look straight down. Holding the primary_active key, move the character (not the mouse) in small circles. Note that the circle of fire below you is nearly exactly (if not exactly) the circles you traced.

Repeat the same process in Origins 1.13.0-alpha.5 and observe that the fireballs take on much more of your horizontal movement while circling resulting in a circle of fire significantly larger than you traced.

eggohito commented 3 months ago

Hmm, this might have something to do with the Power double array NBT of projectiles being replaced with the acceleration_power double NBT 🤔