mirror of
https://github.com/PuzzleMC/Puzzle.git
synced 2025-12-15 11:25:11 +01:00
Actually disable blending & Update example pack
- Blending will now be disabled when set to "off" instead of using the default blend function
This commit is contained in:
BIN
Puzzle_Splashscreen_Template.zip
Normal file
BIN
Puzzle_Splashscreen_Template.zip
Normal file
Binary file not shown.
@@ -81,6 +81,7 @@ public class PuzzleSplashScreen {
|
|||||||
PuzzleConfig.hasCustomSplashScreen = true;
|
PuzzleConfig.hasCustomSplashScreen = true;
|
||||||
}
|
}
|
||||||
if (properties.get("screen.loading.blend") != null) {
|
if (properties.get("screen.loading.blend") != null) {
|
||||||
|
// Recommended blend: SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO
|
||||||
PuzzleConfig.disableBlend = properties.get("screen.loading.blend").toString().equals("off");
|
PuzzleConfig.disableBlend = properties.get("screen.loading.blend").toString().equals("off");
|
||||||
PuzzleConfig.customBlendFunction = new ArrayList<>(Arrays.stream(properties.get("screen.loading.blend").toString().split(" ")).toList());
|
PuzzleConfig.customBlendFunction = new ArrayList<>(Arrays.stream(properties.get("screen.loading.blend").toString().split(" ")).toList());
|
||||||
PuzzleConfig.hasCustomSplashScreen = true;
|
PuzzleConfig.hasCustomSplashScreen = true;
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public abstract class MixinSplashScreen extends Overlay {
|
|||||||
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;blendFunc(II)V", shift = At.Shift.AFTER), remap = false)
|
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;blendFunc(II)V", shift = At.Shift.AFTER), remap = false)
|
||||||
private void puzzle$betterBlend(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
private void puzzle$betterBlend(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
||||||
if (PuzzleConfig.resourcepackSplashScreen) {
|
if (PuzzleConfig.resourcepackSplashScreen) {
|
||||||
if (PuzzleConfig.disableBlend) RenderSystem.defaultBlendFunc();
|
if (PuzzleConfig.disableBlend) RenderSystem.disableBlend();
|
||||||
else if (PuzzleConfig.customBlendFunction.size() == 4) RenderSystem.blendFuncSeparate(
|
else if (PuzzleConfig.customBlendFunction.size() == 4) RenderSystem.blendFuncSeparate(
|
||||||
GlStateManager.SrcFactor.valueOf(PuzzleConfig.customBlendFunction.get(0)),
|
GlStateManager.SrcFactor.valueOf(PuzzleConfig.customBlendFunction.get(0)),
|
||||||
GlStateManager.DstFactor.valueOf(PuzzleConfig.customBlendFunction.get(1)),
|
GlStateManager.DstFactor.valueOf(PuzzleConfig.customBlendFunction.get(1)),
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
|
|
||||||
"name": "Puzzle",
|
"name": "Puzzle",
|
||||||
"description": "Improved resourcepack capabilities.",
|
"description": "Unites optifine replacement mods in a clean & vanilla-style gui",
|
||||||
"authors": [
|
"authors": [
|
||||||
"PuzzleMC",
|
"PuzzleMC",
|
||||||
"Motschen"
|
"Motschen"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ displayName = "Puzzle"
|
|||||||
logoFile = "puzzle.png"
|
logoFile = "puzzle.png"
|
||||||
authors = "PuzzleMC, Motschen"
|
authors = "PuzzleMC, Motschen"
|
||||||
description = '''
|
description = '''
|
||||||
Improved resourcepack capabilities.
|
Unites optifine replacement mods in a clean & vanilla-style gui
|
||||||
'''
|
'''
|
||||||
|
|
||||||
[[mixins]]
|
[[mixins]]
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user