mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-04-01 01:05:27 +02:00
Fixed incorrect eye height after dismounting. Fixes #190
This commit is contained in:
parent
69149570c4
commit
2ff66e3824
1 changed files with 4 additions and 4 deletions
|
@ -12,6 +12,7 @@ import net.minecraft.entity.EntityPose;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
@Mixin(ClientPlayerEntity.class)
|
@Mixin(ClientPlayerEntity.class)
|
||||||
|
@ -21,13 +22,12 @@ abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity implem
|
||||||
private Pony pony;
|
private Pony pony;
|
||||||
|
|
||||||
@Inject(method = "startRiding(Lnet/minecraft/entity/Entity;Z)Z", at = @At("RETURN"))
|
@Inject(method = "startRiding(Lnet/minecraft/entity/Entity;Z)Z", at = @At("RETURN"))
|
||||||
public void onStartRiding(Entity entity, boolean bl, CallbackInfoReturnable<Boolean> info) {
|
private void onStartRiding(Entity entity, boolean bl, CallbackInfoReturnable<Boolean> info) {
|
||||||
calculateDimensions();
|
calculateDimensions();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Inject(method = "dismountVehicle()Z", at = @At("RETURN"))
|
||||||
public void stopRiding() {
|
private void onStopRiding(CallbackInfo info) {
|
||||||
super.stopRiding();
|
|
||||||
calculateDimensions();
|
calculateDimensions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue