Skip to content

Commit

Permalink
Merge branch '1.19.4' into 1.19.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rfresh2 committed Oct 2, 2024
2 parents 3912452 + 3d63e00 commit 9c8af5f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package xaeroplus.mixin.client;

import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.mojang.blaze3d.pipeline.RenderTarget;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.world.entity.Entity;
Expand Down Expand Up @@ -216,4 +220,24 @@ public void redirectRenderMainEntityDot(final MinimapFBORenderer instance,
public int modifyArrowOffsetY(final int offsetY) {
return Settings.REGISTRY.fixMainEntityDot.get() ? -10 : offsetY;
}

@WrapOperation(method = "renderMinimap", at = @At(
value = "INVOKE",
target = "Lcom/mojang/blaze3d/systems/RenderSystem;blendFuncSeparate(Lcom/mojang/blaze3d/platform/GlStateManager$SourceFactor;Lcom/mojang/blaze3d/platform/GlStateManager$DestFactor;Lcom/mojang/blaze3d/platform/GlStateManager$SourceFactor;Lcom/mojang/blaze3d/platform/GlStateManager$DestFactor;)V"
), remap = true) // $REMAP
public void correctBlendingForFpsLimiter(final GlStateManager.SourceFactor sourceFactor, final GlStateManager.DestFactor destFactor, final GlStateManager.SourceFactor sourceFactor2, final GlStateManager.DestFactor destFactor2, final Operation<Void> original) {
if (Settings.REGISTRY.minimapFpsLimiter.get()) {
// todo: when minimap opacity is not set to 100 this is slightly different than without fps limiter
// the minimap will appear more opaque and dim than it should be
// when we are rendering to our buffering render target the blending isn't exactly the same as our BG opacity is 0
RenderSystem.blendFuncSeparate(
GlStateManager.SourceFactor.SRC_ALPHA,
GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA,
GlStateManager.SourceFactor.SRC_COLOR,
GlStateManager.DestFactor.ZERO
);
} else {
original.call(sourceFactor, destFactor, sourceFactor2, destFactor2);
}
}
}
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pluginManagement {
}
}
gradle.extra.apply {
set("mod_version", "2.24.2")
set("mod_version", "2.24.3")
set("maven_group", "xaeroplus")
set("archives_base_name", "XaeroPlus")
set("minecraft_version", "1.19.2")
Expand Down

0 comments on commit 9c8af5f

Please sign in to comment.