This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
forked from Strangerrrs/Raven-bS
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Kefpull <[email protected]>
- Loading branch information
Showing
74 changed files
with
1,215 additions
and
577 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package keystrokesmod.event; | ||
|
||
import keystrokesmod.utility.Utils; | ||
import lombok.*; | ||
import net.minecraftforge.fml.common.eventhandler.Event; | ||
|
||
import static keystrokesmod.Raven.mc; | ||
|
||
@Getter | ||
public class EyeHeightEvent extends Event { | ||
private double y; | ||
private boolean set; | ||
|
||
public EyeHeightEvent(double eyeHeight) { | ||
setEyeHeight(eyeHeight); | ||
} | ||
|
||
public double getEyeHeight() { | ||
return 1.62 - (mc.thePlayer.lastTickPosY + | ||
(((mc.thePlayer.posY - mc.thePlayer.lastTickPosY) * Utils.getTimer().renderPartialTicks)) - y); | ||
} | ||
|
||
public void setEyeHeight(double targetEyeHeight) { | ||
this.y = targetEyeHeight - 1.62 + mc.thePlayer.lastTickPosY + | ||
((mc.thePlayer.posY - mc.thePlayer.lastTickPosY) * (double) Utils.getTimer().renderPartialTicks); | ||
} | ||
|
||
public void setY(double y) { | ||
this.y = y; | ||
this.set = true; | ||
} | ||
} |
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,8 @@ | ||
package keystrokesmod.event; | ||
|
||
import net.minecraftforge.fml.common.eventhandler.Cancelable; | ||
import net.minecraftforge.fml.common.eventhandler.Event; | ||
|
||
@Cancelable | ||
public class FOVUpdateEvent extends Event { | ||
} |
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
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
16 changes: 16 additions & 0 deletions
16
src/main/java/keystrokesmod/mixins/impl/gui/MixinGuiMultiplayer.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,16 @@ | ||
package keystrokesmod.mixins.impl.gui; | ||
|
||
|
||
import net.minecraft.client.gui.GuiMultiplayer; | ||
import net.minecraft.client.gui.GuiScreen; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(GuiMultiplayer.class) | ||
public class MixinGuiMultiplayer extends GuiScreen { | ||
|
||
@Redirect(method = "drawScreen", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiMultiplayer;drawDefaultBackground()V")) | ||
public void onDrawDefaultBackground(GuiMultiplayer instance) { | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/keystrokesmod/mixins/impl/gui/MixinGuiSlot.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,25 @@ | ||
package keystrokesmod.mixins.impl.gui; | ||
|
||
|
||
import keystrokesmod.module.ModuleManager; | ||
import keystrokesmod.utility.render.BackgroundUtils; | ||
import net.minecraft.client.gui.GuiSlot; | ||
import net.minecraft.client.renderer.Tessellator; | ||
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(GuiSlot.class) | ||
public class MixinGuiSlot { | ||
|
||
@Inject(method = "drawContainerBackground", at = @At("HEAD"), cancellable = true, remap = false) | ||
public void onDrawContainerBackground(Tessellator p_drawContainerBackground_1_, CallbackInfo ci) { | ||
if (!ModuleManager.clientTheme.isEnabled() || !ModuleManager.clientTheme.background.isToggled()) | ||
return; | ||
|
||
BackgroundUtils.renderBackground((GuiSlot) (Object) this); | ||
|
||
ci.cancel(); | ||
} | ||
} |
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
Oops, something went wrong.