-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # common/src/main/java/xaeroplus/mixin/client/MixinMinimapElementOverMapRendererHandler.java # common/src/main/java/xaeroplus/mixin/client/MixinMinimapFBORenderer.java # common/src/main/java/xaeroplus/mixin/client/MixinMinimapRenderer.java # settings.gradle.kts
- Loading branch information
Showing
15 changed files
with
124 additions
and
186 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
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
43 changes: 43 additions & 0 deletions
43
common/src/main/java/xaeroplus/mixin/client/MixinMinimapElementMapRendererHandler.java
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package xaeroplus.mixin.client; | ||
|
||
import com.mojang.blaze3d.vertex.PoseStack; | ||
import net.minecraft.client.renderer.MultiBufferSource; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
import xaero.common.minimap.render.radar.element.RadarRenderContext; | ||
import xaero.common.minimap.render.radar.element.RadarRenderer; | ||
import xaero.hud.HudSession; | ||
import xaero.hud.minimap.element.render.MinimapElementRenderInfo; | ||
import xaero.hud.minimap.element.render.MinimapElementRenderer; | ||
import xaero.hud.minimap.element.render.map.MinimapElementMapRendererHandler; | ||
import xaeroplus.Globals; | ||
|
||
@Mixin(value = MinimapElementMapRendererHandler.class, remap = false) | ||
public class MixinMinimapElementMapRendererHandler { | ||
|
||
@Redirect(method = "transformAndRenderForRenderer", at = @At( | ||
value = "INVOKE", | ||
target = "Lxaero/hud/minimap/element/render/MinimapElementRenderer;renderElement(Ljava/lang/Object;ZZDFDDLxaero/hud/minimap/element/render/MinimapElementRenderInfo;Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource$BufferSource;)Z" | ||
), remap = true) // $REMAP | ||
public boolean redirectRenderElement(final MinimapElementRenderer instance, | ||
final Object element, | ||
final boolean highlit, | ||
final boolean outOfBounds, | ||
final double optionalDepth, | ||
final float optionalScale, | ||
final double partialX, | ||
final double partialY, | ||
final MinimapElementRenderInfo minimapElementRenderInfo, | ||
final PoseStack matrixStack, | ||
final MultiBufferSource.BufferSource bufferSource) { | ||
if (instance instanceof RadarRenderer) { | ||
((RadarRenderContext) instance.getContext()).nameScale = HudSession.getCurrentSession().getHudMod().getSettings().getDotNameScale(); | ||
return instance.renderElement(element, highlit, outOfBounds, optionalDepth, | ||
optionalScale * Globals.minimapScaleMultiplier, | ||
partialX, partialY, minimapElementRenderInfo, matrixStack, bufferSource); | ||
} else { | ||
return instance.renderElement(element, highlit, outOfBounds, optionalDepth, optionalScale, partialX, partialY, minimapElementRenderInfo, matrixStack, bufferSource); | ||
} | ||
} | ||
} |
64 changes: 0 additions & 64 deletions
64
common/src/main/java/xaeroplus/mixin/client/MixinMinimapElementOverMapRendererHandler.java
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.