TinyModularThings / UniqueEnchantments

Have some Unique Enchantments for yourself
https://www.curseforge.com/minecraft/mc-mods/unique-enchantments
Other
18 stars 16 forks source link

[1.16.5] Compatibility Issue - Crashes checking arrow enchantment level if the AbstractArrowEntity was provided null enchantment level #55

Closed Kaleidio closed 2 years ago

Kaleidio commented 2 years ago

An mcreator mod called Not Enough Tridents used bad coding practice which resulted in any attributes of the entity they did not believe needed changed to contain nulls. However, it should be possible in your code, to add failsafes if any of your arrow attribute checks return null to work around this. Considering this is more their fault than yours I don't mind if you don't fix this, just wanted to make you aware it did happen.

Note also that it only ended up crashing after I threw the trident exactly twice, the first trident behaved normally. So I'm not 100% sure on all the details of this besides what my initial research found.

https://pastebin.com/qVKQNGRU

Speiger commented 2 years ago

I am sorry, but we are not going to support this mods rule breaking. This is like one of the cardinal rules of minecraft and if we can't trust even these then nothing is trustable in code.

What I suggest is you report this to the dev directly and ask him to fix this issue. In general, nothing against the mod creator, but using MC Creator to create logic of any form is a terrible idea. I have seen the code it creates, and for logic of any kind its the worst tool you can use.

Now if it is only for decoration then MCCreator is fine, the code looks ugly but since there is no logic being executed in the background there is no performance problems with said mods.

(XKDeko is a great example of a good MCCreator mod in terms of performance)

Kaleidio commented 2 years ago

No problem. I cannot get in touch as the developer does not accept issue requests in a manner that is easy to reach out for. Closing issue.

Speiger commented 2 years ago

He has a discord server advertised in his curseforge page. Or write a comment on curseforge.

Kaleidio commented 2 years ago

Said discord and curseforge page are both extremely inactive and heavily overmoderated. This will be difficult to even get their attention, or even be allowed to talk to them. I have attempted a post and we'll see if that works.

Kaleidio commented 2 years ago

Developer has expressed they cannot fix it as they don't know enough about coding. The probable cause is because their "trident" extends an Arrow entity rather than a Trident entity which can cause many problems.

Speiger commented 2 years ago

Good to know. But no this is not correct. Their implementation explicitly returns null while vanillas returns ItemStack.EMPTY