minecraft_25w45a_unobfuscated/net/minecraft/util/datafix/fixes/EntityElderGuardianSplitFix.java
2025-11-24 22:52:51 +03:00

29 lines
936 B
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.mojang.datafixers.schemas.Schema
* com.mojang.datafixers.util.Pair
* com.mojang.serialization.Dynamic
*/
package net.minecraft.util.datafix.fixes;
import com.mojang.datafixers.schemas.Schema;
import com.mojang.datafixers.util.Pair;
import com.mojang.serialization.Dynamic;
import java.util.Objects;
import net.minecraft.util.datafix.fixes.SimpleEntityRenameFix;
public class EntityElderGuardianSplitFix
extends SimpleEntityRenameFix {
public EntityElderGuardianSplitFix(Schema outputSchema, boolean changesType) {
super("EntityElderGuardianSplitFix", outputSchema, changesType);
}
@Override
protected Pair<String, Dynamic<?>> getNewNameAndTag(String name, Dynamic<?> tag) {
return Pair.of((Object)(Objects.equals(name, "Guardian") && tag.get("Elder").asBoolean(false) ? "ElderGuardian" : name), tag);
}
}