Skip to content

Commit

Permalink
Fix #85
Browse files Browse the repository at this point in the history
  • Loading branch information
dima-dencep committed Jul 31, 2024
1 parent e30f19b commit 15284b2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ loom.platform = neoforge
minecraft_version=1.21
yarn_mappings=1.21+build.1
yarn_patch=1.21+build.4
loader_version=21.0.114-beta
loader_version=21.0.146

# Mod Properties
mod_version=0.5.7d
mod_version=0.5.7e
maven_group=com.github.dima_dencep.mods
archives_base_name=rubidium-extra

# Dependencies
nanoliveconfig_version=2.3.2
oculus_version=1.20.1-1.6.9
embeddium_version=1.0.7-beta.335+mc1.21
oculus_version=1.20.1-1.7.0
embeddium_version=1.0.8-beta.338+mc1.21
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package me.flashyreese.mods.sodiumextra.compat;

import me.flashyreese.mods.sodiumextra.client.SodiumExtraClientMod;
import net.coderbot.iris.vertices.IrisVertexFormats;
import net.irisshaders.iris.vertices.IrisVertexFormats;
import net.irisshaders.iris.api.v0.IrisApi;
import net.minecraft.client.render.VertexFormat;
import net.neoforged.fml.loading.LoadingModList;

public class IrisCompat {
private static final boolean irisPresent = LoadingModList.get().getModFileById("oculus") != null;
private static final boolean irisPresent = LoadingModList.get().getModFileById("oculus") != null ||
LoadingModList.get().getModFileById("iris") != null;

public static boolean isRenderingShadowPass() {
if (irisPresent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ public void preRender(DrawContext context, CallbackInfo ci) {
}
}

@WrapOperation(method = "drawGameInformation", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/DebugHud;drawText(Lnet/minecraft/client/gui/DrawContext;Ljava/util/List;Z)V"))
public void sodiumExtra$redirectDrawLeftText(DebugHud instance, DrawContext context, List<String> text, boolean left, Operation<Void> original) {
@WrapOperation(method = "drawLeftText", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/DebugHud;collectGameInformationText()Ljava/util/List;"))
public List<String> sodiumExtra$redirectDrawLeftText(DebugHud instance, Operation<List<String>> original) {
if (this.rebuild) {
this.leftTextCache.clear();
this.leftTextCache.addAll(text);
this.leftTextCache.addAll(original.call(instance));
}
original.call(instance, context, this.leftTextCache, left);
return this.leftTextCache;
}

@WrapOperation(method = "drawSystemInformation", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/DebugHud;drawText(Lnet/minecraft/client/gui/DrawContext;Ljava/util/List;Z)V"))
public void sodiumExtra$redirectDrawRightText(DebugHud instance, DrawContext context, List<String> text, boolean left, Operation<Void> original) {
@WrapOperation(method = "drawRightText", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/DebugHud;collectSystemInformationText()Ljava/util/List;"))
public List<String> sodiumExtra$redirectDrawRightText(DebugHud instance, Operation<List<String>> original) {
if (this.rebuild) {
this.rightTextCache.clear();
this.rightTextCache.addAll(text);
this.rightTextCache.addAll(original.call(instance));
}
original.call(instance, context, this.rightTextCache, left);
return this.rightTextCache;
}
}

0 comments on commit 15284b2

Please sign in to comment.