Silent Gear

Silent Gear

30M Downloads

Fireproof trait

Funnymeme1 opened this issue ยท 4 comments

commented

What Should Be Added or Changed?

Netherite coatings should have a "Fireproof" trait which prevents them from being destroyed in fire/lava. Maybe could apply something similar to unbreaking when taking durability loss from fire-related things?

Why Should This Be Done?

This should be done for parity with vanilla.

commented

I believe this might also be a pretty easy/simple fix, as while working on my own project with forge I wanted to add netherite-items that had this ability as well. While looking at the code for all in-game netherite items, I found that it simply works to overwrite the public boolean isImmuneToFire() in net.minecraft.item.Item and letting it return true iff the item is supposed to not burn in lava.
In case of the netherite coating, it could have a "Fireproof" trait like OP said, which simply sets this method to always return true for the item that it's on.

commented

The problem is that method doesn't have an ItemStack parameter. There's no way to tell whether it has the trait or not.

commented

Okay then I get why it would be difficult to fix... A weird solution would be to make a new Item type for all gear types and parts that have the fireproof triat.. but that would be really ugly from a programming standpoint.
Another might be to give all gear items the fireproof trait and to actively check for item entities from silentGear, making them burn when they should (basically overwriting the forge/vanilla functionality of burning items)

commented

But yeah, that will also be difficult, since it might require some code to change in the ItemEntity..