minecraft-src/net/minecraft/util/datafix/fixes/FireResistantToDamageResistantComponentFix.java
2025-07-04 02:49:36 +03:00

15 lines
583 B
Java

package net.minecraft.util.datafix.fixes;
import com.mojang.datafixers.schemas.Schema;
import com.mojang.serialization.Dynamic;
public class FireResistantToDamageResistantComponentFix extends ItemStackComponentRemainderFix {
public FireResistantToDamageResistantComponentFix(Schema outputSchema) {
super(outputSchema, "FireResistantToDamageResistantComponentFix", "minecraft:fire_resistant", "minecraft:damage_resistant");
}
@Override
protected <T> Dynamic<T> fixComponent(Dynamic<T> tag) {
return tag.emptyMap().set("types", tag.createString("#minecraft:is_fire"));
}
}