make horses faster

This commit is contained in:
1e99 2024-12-03 20:57:00 +01:00
parent 54d4d203b3
commit 9a4612f7a8
4 changed files with 24 additions and 2 deletions

View file

@ -3,6 +3,7 @@
"package": "eu.e99.boringsmp.mixin",
"compatibilityLevel": "JAVA_21",
"mixins": [
"AbstractHorseEntityMixin",
"FireworkRocketItemMixin"
],
"injectors": {

View file

@ -2,7 +2,6 @@ package eu.e99.boringsmp;
import net.fabricmc.api.DedicatedServerModInitializer;
import net.minecraft.item.FireworkRocketItem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View file

@ -0,0 +1,22 @@
package eu.e99.boringsmp.mixin;
import net.minecraft.entity.passive.AbstractHorseEntity;
import net.minecraft.entity.passive.MuleEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import java.util.function.DoubleSupplier;
@Mixin(AbstractHorseEntity.class)
public class AbstractHorseEntityMixin {
/**
* @author 1e99
* @reason Increase horse speed
*/
@Overwrite
public static double getChildMovementSpeedBonus(DoubleSupplier randomDoubleGetter) {
// 30% faster
return (0.585 + randomDoubleGetter.getAsDouble() * 0.3 + randomDoubleGetter.getAsDouble() * 0.3 + randomDoubleGetter.getAsDouble() * 0.3) * 0.25;
}
}

View file

@ -17,7 +17,7 @@ public class FireworkRocketItemMixin {
/**
* @author 1e99
* @reason To remove firework elytra boosting
* @reason Remove firework elytra boosting
*/
@Overwrite
public ActionResult use(World world, PlayerEntity user, Hand hand) {