-
Notifications
You must be signed in to change notification settings - Fork 3
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
11 changed files
with
95 additions
and
322 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
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
50 changes: 0 additions & 50 deletions
50
src/main/java/org/polyfrost/behindyou/mixin/EntityRendererMixin.java
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
src/main/java/org/polyfrost/behindyou/mixin/MinecraftMixin.java
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
src/main/java/org/polyfrost/behindyou/mixin/Mixin_EntityRendererSetFOVLevel.java
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,20 @@ | ||
package org.polyfrost.behindyou.mixin; | ||
|
||
import net.minecraft.client.settings.GameSettings; | ||
import org.polyfrost.behindyou.BehindYou; | ||
import net.minecraft.client.renderer.EntityRenderer; | ||
import org.spongepowered.asm.mixin.*; | ||
import org.spongepowered.asm.mixin.injection.*; | ||
|
||
@Mixin(EntityRenderer.class) | ||
public class Mixin_EntityRendererSetFOVLevel { | ||
@Redirect(method = "orientCamera", at = @At(value = "FIELD", target = "Lnet/minecraft/client/settings/GameSettings;thirdPersonView:I", ordinal = 0)) | ||
private int checkAndKeepF3(GameSettings instance) { | ||
return BehindYou.INSTANCE.isFinished() ? instance.thirdPersonView : 1; | ||
} | ||
|
||
@ModifyVariable(method = "orientCamera", at = @At(value = "STORE"), ordinal = 3) | ||
private double set(double z, float partialTicks) { | ||
return BehindYou.INSTANCE.getLevel(z, partialTicks); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/org/polyfrost/behindyou/mixin/Mixin_MinecraftCapturePOVSet.java
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 org.polyfrost.behindyou.mixin; | ||
|
||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.settings.GameSettings; | ||
import org.objectweb.asm.Opcodes; | ||
import org.polyfrost.behindyou.BehindYou; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(Minecraft.class) | ||
public class Mixin_MinecraftCapturePOVSet { | ||
@Redirect(method = "runTick", at = @At(value = "FIELD", target = "Lnet/minecraft/client/settings/GameSettings;thirdPersonView:I", opcode = Opcodes.PUTFIELD)) | ||
private void capturePOVSetF5(GameSettings instance, int value) { | ||
BehindYou.INSTANCE.setPerspective(value); | ||
} | ||
|
||
@Redirect(method = "runGameLoop", at = @At(value = "FIELD", target = "Lnet/minecraft/client/settings/GameSettings;thirdPersonView:I", opcode = Opcodes.PUTFIELD)) | ||
private void capturePOVSetStuckInBlock(GameSettings instance, int value) { | ||
BehindYou.INSTANCE.setPerspective(value); | ||
} | ||
} |
Oops, something went wrong.