|
1 | 1 | package me.juancarloscp52.bedrockify.mixin.client.features.panoramaBackground; |
2 | 2 |
|
| 3 | +import com.mojang.blaze3d.systems.RenderSystem; |
3 | 4 | import me.juancarloscp52.bedrockify.client.features.panoramaBackground.BedrockifyRotatingCubeMapRenderer; |
| 5 | +import net.minecraft.block.Blocks; |
| 6 | +import net.minecraft.block.IceBlock; |
4 | 7 | import net.minecraft.client.gui.RotatingCubeMapRenderer; |
5 | 8 | import net.minecraft.client.gui.screen.Screen; |
6 | 9 | import net.minecraft.client.gui.screen.TitleScreen; |
|
11 | 14 | import org.spongepowered.asm.mixin.Final; |
12 | 15 | import org.spongepowered.asm.mixin.Mixin; |
13 | 16 | 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; |
18 | 19 |
|
19 | 20 |
|
20 | 21 | @Mixin(TitleScreen.class) |
@@ -42,10 +43,18 @@ private void renderCubeMap(RotatingCubeMapRenderer renderer, float delta, float |
42 | 43 | BedrockifyRotatingCubeMapRenderer.getInstance().render(MathHelper.clamp(f, 0.0F, 1.0F), true); |
43 | 44 | } |
44 | 45 |
|
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; |
49 | 58 | } |
50 | 59 |
|
51 | 60 | } |
0 commit comments