Skip to content

Commit 0076cfd

Browse files
Fix getOverlay on production
1 parent 813a7d0 commit 0076cfd

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

src/main/java/me/juancarloscp52/bedrockify/mixin/client/features/panoramaBackground/TitleScreenMixin.java

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package me.juancarloscp52.bedrockify.mixin.client.features.panoramaBackground;
22

3+
import com.mojang.blaze3d.systems.RenderSystem;
34
import me.juancarloscp52.bedrockify.client.features.panoramaBackground.BedrockifyRotatingCubeMapRenderer;
5+
import net.minecraft.block.Blocks;
6+
import net.minecraft.block.IceBlock;
47
import net.minecraft.client.gui.RotatingCubeMapRenderer;
58
import net.minecraft.client.gui.screen.Screen;
69
import net.minecraft.client.gui.screen.TitleScreen;
@@ -11,10 +14,8 @@
1114
import org.spongepowered.asm.mixin.Final;
1215
import org.spongepowered.asm.mixin.Mixin;
1316
import org.spongepowered.asm.mixin.Shadow;
14-
import org.spongepowered.asm.mixin.injection.At;
15-
import org.spongepowered.asm.mixin.injection.Inject;
16-
import org.spongepowered.asm.mixin.injection.ModifyArg;
17-
import org.spongepowered.asm.mixin.injection.Redirect;
17+
import org.spongepowered.asm.mixin.injection.*;
18+
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
1819

1920

2021
@Mixin(TitleScreen.class)
@@ -42,10 +43,18 @@ private void renderCubeMap(RotatingCubeMapRenderer renderer, float delta, float
4243
BedrockifyRotatingCubeMapRenderer.getInstance().render(MathHelper.clamp(f, 0.0F, 1.0F), true);
4344
}
4445

45-
@ModifyArg(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;setShaderTexture(ILnet/minecraft/util/Identifier;)V", ordinal = 0))
46-
private Identifier getOverlay(int i,Identifier id) {
47-
BedrockifyRotatingCubeMapRenderer.getInstance().updateOverlayId(id);
48-
return id;
46+
@Group(name = "overlayID")
47+
@ModifyArg(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;setShaderTexture(ILnet/minecraft/util/Identifier;)V", ordinal = 0, remap = false),index = 1)
48+
private Identifier getOverlayDev(Identifier identifier) {
49+
BedrockifyRotatingCubeMapRenderer.getInstance().updateOverlayId(identifier);
50+
return identifier;
51+
}
52+
53+
@Group(name = "overlayID")
54+
@ModifyArg(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;setShaderTexture(ILnet/minecraft/class_2960;)V", ordinal = 0,remap = false),index = 1)
55+
private Identifier getOverlayProd(Identifier identifier) {
56+
BedrockifyRotatingCubeMapRenderer.getInstance().updateOverlayId(identifier);
57+
return identifier;
4958
}
5059

5160
}

0 commit comments

Comments
 (0)