-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.ninni.spawn.mixin; | ||
|
||
import net.minecraft.world.entity.EntityType; | ||
import net.minecraft.world.entity.VariantHolder; | ||
import net.minecraft.world.entity.animal.Animal; | ||
import net.minecraft.world.entity.animal.Rabbit; | ||
import net.minecraft.world.level.Level; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(Rabbit.class) | ||
public abstract class RabbitMixin extends Animal implements VariantHolder<Rabbit.Variant> { | ||
protected RabbitMixin(EntityType<? extends Animal> entityType, Level level) { | ||
super(entityType, level); | ||
} | ||
|
||
@Inject(method = "<init>", at = @At("TAIL")) | ||
private void S$init(EntityType<? extends Rabbit> entityType, Level level, CallbackInfo ci) { | ||
this.setMaxUpStep(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters