29 lines
936 B
Java
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);
|
|
}
|
|
}
|
|
|