Skip to content

Commit

Permalink
1.21.3
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Nov 23, 2024
1 parent bb18529 commit 81dfe5c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 46 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
## Changelog
- update to 1.21.1
- update to 1.21.3

This file was deleted.

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ yarn_mappings=1.21.3+build.2
mappings_patch=1.21+build.4

archives_base_name=ObsidianUI
mod_version=0.2.9
mod_version=0.2.10
maven_group=org.thinkingstudio.obsidianui

fabric_loader_version=0.16.9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import net.minecraft.client.MinecraftClient;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.EventPriority;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.loading.FMLLoader;
import net.neoforged.neoforge.client.event.ClientTickEvent;
Expand All @@ -27,10 +26,8 @@
@Mod(value = ObsidianUI.MODID, dist = Dist.CLIENT)
public class ObsidianUINeoForge {
public ObsidianUINeoForge() {
IEventBus forgeEventBus = NeoForge.EVENT_BUS;

if (FMLLoader.getDist().isClient()) {
forgeEventBus.addListener(EventPriority.HIGHEST, RenderGuiEvent.Post.class, event -> {
NeoForge.EVENT_BUS.addListener(EventPriority.HIGHEST, RenderGuiEvent.Post.class, event -> {
var drawContext = event.getGuiGraphics();
var tickDelta = event.getPartialTick();

Expand All @@ -39,18 +36,18 @@ public ObsidianUINeoForge() {
hud.render(drawContext, tickDelta);
});
});
forgeEventBus.addListener(EventPriority.HIGHEST, ClientTickEvent.Post.class, event -> {
NeoForge.EVENT_BUS.addListener(EventPriority.HIGHEST, ClientTickEvent.Post.class, event -> {
if (!HudManager.canRenderHuds(MinecraftClient.getInstance()))
return;
HudManager.HUDS.forEach((id, hud) -> {
if (hud.isEnabled() && hud.isVisible() && hud.hasTicks())
hud.tick();
});
});
forgeEventBus.addListener(EventPriority.HIGHEST, OpenScreenCallbackEvent.Post.class, event -> {
NeoForge.EVENT_BUS.addListener(EventPriority.HIGHEST, OpenScreenCallbackEvent.Post.class, event -> {
HudManager.initAll(event.getClient(), event.getClient().getWindow().getScaledWidth(), event.getClient().getWindow().getScaledHeight());
});
forgeEventBus.addListener(EventPriority.HIGHEST, ResolutionChangeCallbackEvent.class, event -> {
NeoForge.EVENT_BUS.addListener(EventPriority.HIGHEST, ResolutionChangeCallbackEvent.class, event -> {
HudManager.initAll(event.getClient(), event.getClient().getWindow().getScaledWidth(), event.getClient().getWindow().getScaledHeight());
});
}
Expand Down

0 comments on commit 81dfe5c

Please sign in to comment.