EntityMinecartMixin.java (594B)
1 package ambos.oldbugs.mixin; 2 3 import net.minecraft.core.entity.vehicle.EntityMinecart; 4 import org.spongepowered.asm.mixin.Mixin; 5 import org.spongepowered.asm.mixin.injection.At; 6 import org.spongepowered.asm.mixin.injection.ModifyVariable; 7 8 import ambos.oldbugs.OldBugs; 9 10 @Mixin(value = EntityMinecart.class, remap = false) 11 final class EntityMinecartMixin { 12 @ModifyVariable(method = "push", at = @At(value = "STORE"), ordinal = 6) 13 private double change(double d6) { 14 if (OldBugs.MINECART_BOOSTERS) { 15 return 0; 16 } else { 17 return d6; 18 } 19 } 20 }