forked from hibiii/BoatHud
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
0e80fed
commit 2286134
Showing
13 changed files
with
78 additions
and
75 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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
# Done to increase the memory available to gradle. | ||
org.gradle.jvmargs=-Xmx1G | ||
org.gradle.jvmargs=-Xmx3G | ||
org.gradle.parallel=true | ||
|
||
# Fabric Properties | ||
# check these on https://fabricmc.net/versions.html | ||
minecraft_version=1.20.2 | ||
yarn_mappings=1.20.2+build.4 | ||
loader_version=0.14.22 | ||
# check these on https://fabricmc.net/versions.html | ||
minecraft_version=1.21 | ||
yarn_mappings=1.21+build.9 | ||
loader_version=0.16.0 | ||
|
||
# Mod Properties | ||
mod_version = 1.1.5 | ||
maven_group = hibi.boathud | ||
archives_base_name = boathud | ||
mod_version=1.1.5 | ||
maven_group=hibi.boathud | ||
archives_base_name=boathud | ||
|
||
# Dependencies | ||
fabric_version=0.88.5+1.20.2 | ||
menu_version=8.0.0-beta.2 | ||
cloth_version=12.0.107 | ||
fabric_version=0.100.7+1.21 | ||
menu_version=11.0.1 | ||
cloth_version=15.0.128 |
Binary file not shown.
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
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 |
---|---|---|
@@ -1,29 +1,36 @@ | ||
package hibi.boathud.mixin; | ||
|
||
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; | ||
|
||
import hibi.boathud.Common; | ||
import hibi.boathud.Config; | ||
import net.minecraft.client.gui.DrawContext; | ||
import net.minecraft.client.gui.hud.InGameHud; | ||
import net.minecraft.client.gui.screen.ChatScreen; | ||
import net.minecraft.client.render.RenderTickCounter; | ||
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(InGameHud.class) | ||
public class InGameHudMixin { | ||
@Inject( | ||
method = "render", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "net/minecraft/client/MinecraftClient.getProfiler()Lnet/minecraft/util/profiler/Profiler;", | ||
ordinal = 8 | ||
) | ||
) | ||
public void render(DrawContext graphics, float tickDelta, CallbackInfo info) { | ||
//@Inject( | ||
// method = "render", | ||
// at = @At( | ||
// value = "INVOKE", | ||
// target = "net/minecraft/client/MinecraftClient.getProfiler()Lnet/minecraft/util/profiler/Profiler;", | ||
// ordinal = 8 | ||
// ) | ||
//) | ||
//public void render(DrawContext graphics, float tickDelta, CallbackInfo info) { | ||
// if(Config.enabled && Common.ridingBoat && !(Common.client.currentScreen instanceof ChatScreen)) { | ||
// Common.hudRenderer.render(graphics, tickDelta); | ||
// } | ||
//} | ||
|
||
@Inject(method = "renderChat", at = @At(value = "TAIL")) | ||
public void render(DrawContext context, RenderTickCounter tickCounter, CallbackInfo ci) { | ||
if(Config.enabled && Common.ridingBoat && !(Common.client.currentScreen instanceof ChatScreen)) { | ||
Common.hudRenderer.render(graphics, tickDelta); | ||
Common.hudRenderer.render(context, tickCounter.getTickDelta(false)); | ||
} | ||
} | ||
} |
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