forked from gaucho-matrero/altoclef
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from JustaSqu1d/main
feat: camera movement smoothing
- Loading branch information
Showing
3 changed files
with
34 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
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,29 @@ | ||
package adris.altoclef.mixins; | ||
|
||
import com.mojang.authlib.GameProfile; | ||
import net.minecraft.client.network.AbstractClientPlayerEntity; | ||
import net.minecraft.client.network.ClientPlayerEntity; | ||
import net.minecraft.client.world.ClientWorld; | ||
import net.minecraft.network.encryption.PlayerPublicKey; | ||
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.CallbackInfoReturnable; | ||
|
||
@Mixin(ClientPlayerEntity.class) | ||
public abstract class MixinLocalPlayer extends AbstractClientPlayerEntity { | ||
|
||
public MixinLocalPlayer(ClientWorld world, GameProfile profile, PlayerPublicKey publicKey) { | ||
super(world, profile); | ||
} | ||
|
||
@Inject(method = "getPitch", at = @At("RETURN"), cancellable = true) | ||
public void getPitch(float tickDelta, CallbackInfoReturnable<Float> cir) { | ||
cir.setReturnValue(super.getPitch(tickDelta)); | ||
} | ||
|
||
@Inject(method = "getYaw", at = @At("RETURN"), cancellable = true) | ||
public void getYaw(float tickDelta, CallbackInfoReturnable<Float> cir) { | ||
cir.setReturnValue(super.getYaw(tickDelta)); | ||
} | ||
} |
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