Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoccyMilch committed Jul 16, 2024
1 parent 6804841 commit 2151200
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,31 @@
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.vehicle.AbstractMinecart;
import net.minecraft.world.entity.vehicle.VehicleEntity;
import net.minecraft.world.level.Level;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.*;
import org.spongepowered.asm.mixin.gen.Invoker;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyVariable;
import org.spongepowered.asm.mixin.injection.Redirect;

import java.lang.annotation.Target;

@Mixin(AbstractMinecart.class)
public abstract class AbstractMinecartMixin extends Entity {
public abstract class AbstractMinecartMixin extends Entity
{

public AbstractMinecartMixin(EntityType<?> type, Level level) {
super(type, level);
}

/**
* @author ChoccyMilch
* @reason Trying to see if I can make mine carts faster.
*/
@Overwrite
protected double getMaxSpeed() {
return (this.isInWater() ? 40.0D : 80) / 20.0D;
return (this.isInWater() ? 40.0D : 4.0D) / 8.0D;

}

}
6 changes: 1 addition & 5 deletions src/main/resources/fasterminecart.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
"minVersion": "0.8",
"package": "com.shibamilk.fasterminecart.mixin",
"compatibilityLevel": "JAVA_17",
"overwrites": {
"conformVisibility": true,
"requireAnnotations": false
},
"mixins": [
"entity.AbstractMinecartMixin.java"
"entity.AbstractMinecartMixin"
],
"client": ["entity.AbstractMinecartMixin"],
"server": ["entity.AbstractMinecartMixin"],
Expand Down

0 comments on commit 2151200

Please sign in to comment.