We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prismarine-block/index.js
Line 129 in a5171e6
Hello,
I think that the effectLevel function is not working properly (at least in 1.16.1)
function effectLevel (effect, effects) { const e = effects[effectsByName[effect]] return e ? e.amplifier : -1 }
Content of effects (in my case) from https://github.com/PrismarineJS/mineflayer/blob/8f729c2f00620b3277dcebd510e5c4b278413d32/lib/plugins/digging.js#L104 :
{ '3': { id: 3, amplifier: 1, duration: 340 }, '10': { id: 10, amplifier: 0, duration: 340 }, '11': { id: 11, amplifier: 0, duration: 340 } }
Content of effectsByName
{ Speed: { id: 1, name: 'Speed', displayName: 'Speed', type: 'good' }, Slowness: { id: 2, name: 'Slowness', displayName: 'Slowness', type: 'bad' }, Haste: { id: 3, name: 'Haste', displayName: 'Haste', type: 'good' }, MiningFatigue: { id: 4, name: 'MiningFatigue', displayName: 'Mining Fatigue', type: 'bad' }, Strength: { id: 5, name: 'Strength', displayName: 'Strength', type: 'good' }, InstantHealth: { id: 6, name: 'InstantHealth', displayName: 'Instant Health', type: 'good' }, ......
effects[effectsByName[effect]] is equal to null. It needs the id of the effect. The fix would be effects[effectsByName[effect].id]
effects[effectsByName[effect].id]
function effectLevel (effect, effects) { const e = effects[effectsByName[effect].id] return e ? e.amplifier : -1 }
Bye
The text was updated successfully, but these errors were encountered:
Fix effectLevel not working in digTime. Issue PrismarineJS#16
6670927
Fix effectLevel not working in digTime. Issue #16 (#21)
6d91f3e
fixed now
Sorry, something went wrong.
No branches or pull requests
prismarine-block/index.js
Line 129 in a5171e6
Hello,
I think that the effectLevel function is not working properly (at least in 1.16.1)
Content of effects (in my case) from
https://github.com/PrismarineJS/mineflayer/blob/8f729c2f00620b3277dcebd510e5c4b278413d32/lib/plugins/digging.js#L104 :
Content of effectsByName
effects[effectsByName[effect]] is equal to null. It needs the id of the effect.
The fix would be
effects[effectsByName[effect].id]
Bye
The text was updated successfully, but these errors were encountered: