make horses faster
This commit is contained in:
parent
54d4d203b3
commit
9a4612f7a8
4 changed files with 24 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
"package": "eu.e99.boringsmp.mixin",
|
||||
"compatibilityLevel": "JAVA_21",
|
||||
"mixins": [
|
||||
"AbstractHorseEntityMixin",
|
||||
"FireworkRocketItemMixin"
|
||||
],
|
||||
"injectors": {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
22
src/eu/e99/boringsmp/mixin/AbstractHorseEntityMixin.java
Normal file
22
src/eu/e99/boringsmp/mixin/AbstractHorseEntityMixin.java
Normal 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;
|
||||
}
|
||||
}
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue