mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-18 16:02:19 +01:00
CameraMixin change for compatibility
This commit is contained in:
parent
1ec63c1511
commit
9c78331911
1 changed files with 5 additions and 6 deletions
|
@ -4,6 +4,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
|||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import com.simibubi.create.content.logistics.trains.CameraDistanceModifier;
|
||||
|
@ -26,15 +27,13 @@ public abstract class CameraMixin {
|
|||
throw new AssertionError();
|
||||
}
|
||||
|
||||
@Inject(
|
||||
@ModifyArg(
|
||||
method = "Lnet/minecraft/client/Camera;setup(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/world/entity/Entity;ZZF)V",
|
||||
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Camera;move(DDD)V", ordinal = 0),
|
||||
cancellable = true
|
||||
index = 0
|
||||
)
|
||||
public void modifySetup(BlockGetter pLevel, Entity pEntity, boolean pDetached, boolean pThirdPersonReverse, float pPartialTick, CallbackInfo ci) {
|
||||
move(-this.getMaxZoom(4.0D * CameraDistanceModifier.getMultiplier(AnimationTickHolder.getPartialTicks())), 0, 0);
|
||||
ci.cancel();
|
||||
public double modifyCameraOffset(double originalValue) {
|
||||
return -this.getMaxZoom(4.0D * CameraDistanceModifier.getMultiplier(AnimationTickHolder.getPartialTicks()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue