38 lines
1.1 KiB
Java
38 lines
1.1 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* com.mojang.datafixers.DSL
|
|
* com.mojang.datafixers.Typed
|
|
* com.mojang.datafixers.schemas.Schema
|
|
* com.mojang.serialization.Dynamic
|
|
*/
|
|
package net.minecraft.util.datafix.fixes;
|
|
|
|
import com.mojang.datafixers.DSL;
|
|
import com.mojang.datafixers.Typed;
|
|
import com.mojang.datafixers.schemas.Schema;
|
|
import com.mojang.serialization.Dynamic;
|
|
import net.minecraft.util.datafix.fixes.NamedEntityFix;
|
|
import net.minecraft.util.datafix.fixes.References;
|
|
|
|
public class StriderGravityFix
|
|
extends NamedEntityFix {
|
|
public StriderGravityFix(Schema outputSchema, boolean changesType) {
|
|
super(outputSchema, changesType, "StriderGravityFix", References.ENTITY, "minecraft:strider");
|
|
}
|
|
|
|
public Dynamic<?> fixTag(Dynamic<?> input) {
|
|
if (input.get("NoGravity").asBoolean(false)) {
|
|
return input.set("NoGravity", input.createBoolean(false));
|
|
}
|
|
return input;
|
|
}
|
|
|
|
@Override
|
|
protected Typed<?> fix(Typed<?> entity) {
|
|
return entity.update(DSL.remainderFinder(), this::fixTag);
|
|
}
|
|
}
|
|
|