Paper
Paper copied to clipboard
feat: Add Multiply total operation
This allows the use of proper multiplication values, as none of the pre-existing bukkit enums properly convey the way to do this. And as exampled by me, The multiply_scalar_1 operation is frankly quite dumb, why add 1 to the users pre-existing input its just asking for unwanted pain while trying to figure out why the players health it 36 and not 18.
Why don't you just substract 1 to the value in your attribute modifier ? 😅
I am currently, but the fact that it took me 4 hours of messing with operations, asking the paper dev channel and it seeming like no one really knows to just say subtract 1 from it, then finally finding my answer by looking at the source code where its actually handled. I think this means in reality that having a better defined operation like multiply total makes sense as you can see that, understand it and role with it.
fromId needs patching to cater for the offset; I probs just wouldn't place them in there, and just add an if block inside of the else block for those special cased IDs
fromId needs patching to cater for the offset; I probs just wouldn't place them in there, and just add an if block inside of the else block for those special cased IDs
Should this be like just an if (id == 103) or like what?
Should this be like just an if (id == 103) or like what?
Yup
Should this be like just an if (id == 103) or like what?
Yup
Should it be removed from the OPERATIONS array aswell?
I would imagine so, as it's gonna create an oddity when you can lookup a value with two different IDs
Ima bit iffy on this myself as this is an entirely new attribute type that we need to upkeep… all for just not subtracting 1? This feels like with documentation this can be fixed?
Thank you for your contribution, however, as specified above, it’s really better to improve the documentation here instead of adding our own new type entirely.
This would require up keeping as this introduces a new type entirely. And in general, not even clients will know how to handle this special type.
Closing.