mirror of
https://github.com/PuzzleMC/Puzzle.git
synced 2025-12-16 11:55:09 +01:00
Compare commits
3 Commits
7caadedcf1
...
1.21.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97117ea46a | ||
|
|
ee274fcefd | ||
|
|
74de5ba33c |
@@ -57,6 +57,7 @@ public class PuzzleOptionListWidget extends MidnightConfig.MidnightConfigListWid
|
|||||||
public boolean centered() {return true;}
|
public boolean centered() {return true;}
|
||||||
public String category() {return "";}
|
public String category() {return "";}
|
||||||
public String name() {return "";}
|
public String name() {return "";}
|
||||||
|
public String url() {return "";}
|
||||||
public String requiredMod() {return "";}
|
public String requiredMod() {return "";}
|
||||||
};
|
};
|
||||||
var entry = new MidnightConfig.ButtonEntry(buttons, text, info);
|
var entry = new MidnightConfig.ButtonEntry(buttons, text, info);
|
||||||
|
|||||||
@@ -7,13 +7,9 @@ import com.mojang.blaze3d.platform.DestFactor;
|
|||||||
import com.mojang.blaze3d.platform.SourceFactor;
|
import com.mojang.blaze3d.platform.SourceFactor;
|
||||||
import eu.midnightdust.lib.util.MidnightColorUtil;
|
import eu.midnightdust.lib.util.MidnightColorUtil;
|
||||||
import eu.midnightdust.lib.util.PlatformFunctions;
|
import eu.midnightdust.lib.util.PlatformFunctions;
|
||||||
import net.minecraft.client.gui.screen.SplashOverlay;
|
|
||||||
import net.minecraft.client.render.RenderLayer;
|
|
||||||
import net.minecraft.client.render.RenderPhase;
|
|
||||||
import net.minecraft.client.texture.NativeImageBackedTexture;
|
import net.minecraft.client.texture.NativeImageBackedTexture;
|
||||||
import net.minecraft.client.texture.TextureContents;
|
import net.minecraft.client.texture.TextureContents;
|
||||||
import net.minecraft.resource.*;
|
import net.minecraft.resource.*;
|
||||||
import net.minecraft.util.TriState;
|
|
||||||
import net.minecraft.util.Util;
|
import net.minecraft.util.Util;
|
||||||
import net.puzzlemc.core.config.PuzzleConfig;
|
import net.puzzlemc.core.config.PuzzleConfig;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
@@ -45,7 +41,7 @@ public class PuzzleSplashScreen {
|
|||||||
public static Path BACKGROUND_TEXTURE = Paths.get(CONFIG_PATH + "/splash_background.png");
|
public static Path BACKGROUND_TEXTURE = Paths.get(CONFIG_PATH + "/splash_background.png");
|
||||||
private static MinecraftClient client = MinecraftClient.getInstance();
|
private static MinecraftClient client = MinecraftClient.getInstance();
|
||||||
private static boolean keepBackground = false;
|
private static boolean keepBackground = false;
|
||||||
private static RenderLayer CUSTOM_LOGO_LAYER;
|
private static RenderPipeline CUSTOM_LOGO_PIPELINE;
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
if (!CONFIG_PATH.exists()) { // Run when config directory is nonexistent //
|
if (!CONFIG_PATH.exists()) { // Run when config directory is nonexistent //
|
||||||
@@ -59,8 +55,8 @@ public class PuzzleSplashScreen {
|
|||||||
buildRenderLayer();
|
buildRenderLayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static RenderLayer getCustomLogoRenderLayer() {
|
public static RenderPipeline getCustomLogoRenderPipeline() {
|
||||||
return CUSTOM_LOGO_LAYER;
|
return CUSTOM_LOGO_PIPELINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void buildRenderLayer() {
|
public static void buildRenderLayer() {
|
||||||
@@ -85,10 +81,7 @@ public class PuzzleSplashScreen {
|
|||||||
.withDepthWrite(false);
|
.withDepthWrite(false);
|
||||||
CUSTOM_LOGO_PIPELINE_BUILDER = blendFunction != null ? CUSTOM_LOGO_PIPELINE_BUILDER.withBlend(blendFunction) : CUSTOM_LOGO_PIPELINE_BUILDER.withoutBlend();
|
CUSTOM_LOGO_PIPELINE_BUILDER = blendFunction != null ? CUSTOM_LOGO_PIPELINE_BUILDER.withBlend(blendFunction) : CUSTOM_LOGO_PIPELINE_BUILDER.withoutBlend();
|
||||||
|
|
||||||
CUSTOM_LOGO_LAYER = RenderLayer.of("mojang_logo_puzzle", 786432, CUSTOM_LOGO_PIPELINE_BUILDER.build(),
|
CUSTOM_LOGO_PIPELINE = CUSTOM_LOGO_PIPELINE_BUILDER.build();
|
||||||
RenderLayer.MultiPhaseParameters.builder()
|
|
||||||
.texture(new RenderPhase.Texture(SplashOverlay.LOGO, TriState.DEFAULT, false))
|
|
||||||
.build(false));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,12 @@ package net.puzzlemc.splashscreen.mixin;
|
|||||||
|
|
||||||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
||||||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
||||||
|
import com.mojang.blaze3d.pipeline.RenderPipeline;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
import net.minecraft.client.gl.RenderPipelines;
|
||||||
import net.minecraft.client.gui.DrawContext;
|
import net.minecraft.client.gui.DrawContext;
|
||||||
import net.minecraft.client.gui.screen.Overlay;
|
import net.minecraft.client.gui.screen.Overlay;
|
||||||
import net.minecraft.client.gui.screen.SplashOverlay;
|
import net.minecraft.client.gui.screen.SplashOverlay;
|
||||||
import net.minecraft.client.render.*;
|
|
||||||
import net.minecraft.client.texture.NativeImage;
|
import net.minecraft.client.texture.NativeImage;
|
||||||
import net.minecraft.client.texture.NativeImageBackedTexture;
|
import net.minecraft.client.texture.NativeImageBackedTexture;
|
||||||
import net.minecraft.client.texture.TextureManager;
|
import net.minecraft.client.texture.TextureManager;
|
||||||
@@ -26,7 +27,6 @@ import java.io.FileInputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.function.IntSupplier;
|
import java.util.function.IntSupplier;
|
||||||
|
|
||||||
import static net.puzzlemc.splashscreen.PuzzleSplashScreen.BACKGROUND;
|
import static net.puzzlemc.splashscreen.PuzzleSplashScreen.BACKGROUND;
|
||||||
@@ -63,11 +63,11 @@ public abstract class MixinSplashScreen extends Overlay {
|
|||||||
return (!PuzzleConfig.resourcepackSplashScreen || PuzzleConfig.progressBarBackgroundColor == 15675965) ? instance.getAsInt() : PuzzleConfig.backgroundColor | 255 << 24;
|
return (!PuzzleConfig.resourcepackSplashScreen || PuzzleConfig.progressBarBackgroundColor == 15675965) ? instance.getAsInt() : PuzzleConfig.backgroundColor | 255 << 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
@WrapOperation(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;drawTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIFFIIIIIII)V"))
|
@WrapOperation(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;drawTexture(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/util/Identifier;IIFFIIIIIII)V"))
|
||||||
private void puzzle$modifyRenderLayer(DrawContext instance, Function<Identifier, RenderLayer> renderLayers, Identifier sprite, int x, int y, float u, float v, int width, int height, int regionWidth, int regionHeight, int textureWidth, int textureHeight, int color, Operation<Void> original) {
|
private void puzzle$modifyRenderLayer(DrawContext instance, RenderPipeline pipeline, Identifier sprite, int x, int y, float u, float v, int width, int height, int regionWidth, int regionHeight, int textureWidth, int textureHeight, int color, Operation<Void> original) {
|
||||||
if (PuzzleConfig.resourcepackSplashScreen)
|
if (PuzzleConfig.resourcepackSplashScreen)
|
||||||
instance.drawTexture(id -> PuzzleSplashScreen.getCustomLogoRenderLayer(), sprite, x, y, u, v, width, height, regionWidth, regionHeight, textureWidth, textureHeight, color);
|
instance.drawTexture(PuzzleSplashScreen.getCustomLogoRenderPipeline(), sprite, x, y, u, v, width, height, regionWidth, regionHeight, textureWidth, textureHeight, color);
|
||||||
else instance.drawTexture(renderLayers, sprite, x, y, u, v, width, height, textureWidth, textureHeight, color);
|
else instance.drawTexture(pipeline, sprite, x, y, u, v, width, height, textureWidth, textureHeight, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;getScaledWindowWidth()I", ordinal = 2))
|
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;getScaledWindowWidth()I", ordinal = 2))
|
||||||
@@ -82,14 +82,12 @@ public abstract class MixinSplashScreen extends Overlay {
|
|||||||
if (f >= 1.0F) s = 1.0F - MathHelper.clamp(f - 1.0F, 0.0F, 1.0F);
|
if (f >= 1.0F) s = 1.0F - MathHelper.clamp(f - 1.0F, 0.0F, 1.0F);
|
||||||
else if (reloading) s = MathHelper.clamp(g, 0.0F, 1.0F);
|
else if (reloading) s = MathHelper.clamp(g, 0.0F, 1.0F);
|
||||||
else s = 1.0F;
|
else s = 1.0F;
|
||||||
context.getMatrices().translate(0, 0, 1f);
|
context.drawTexture(RenderPipelines.GUI_TEXTURED, BACKGROUND, 0, 0, 0, 0, width, height, width, height, ColorHelper.getWhite(s));
|
||||||
context.drawTexture(RenderLayer::getGuiTextured, BACKGROUND, 0, 0, 0, 0, width, height, width, height, ColorHelper.getWhite(s));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "renderProgressBar", at = @At("HEAD"))
|
@Inject(method = "renderProgressBar", at = @At("HEAD"))
|
||||||
private void puzzle$addProgressBarBackground(DrawContext context, int minX, int minY, int maxX, int maxY, float opacity, CallbackInfo ci) {
|
private void puzzle$addProgressBarBackground(DrawContext context, int minX, int minY, int maxX, int maxY, float opacity, CallbackInfo ci) {
|
||||||
context.getMatrices().translate(0, 0, 1f);
|
|
||||||
if (!PuzzleConfig.resourcepackSplashScreen || PuzzleConfig.progressBarBackgroundColor == 15675965) return;
|
if (!PuzzleConfig.resourcepackSplashScreen || PuzzleConfig.progressBarBackgroundColor == 15675965) return;
|
||||||
long l = Util.getMeasuringTimeMs();
|
long l = Util.getMeasuringTimeMs();
|
||||||
float f = this.reloadCompleteTime > -1L ? (float)(l - this.reloadCompleteTime) / 1000.0F : -1.0F;
|
float f = this.reloadCompleteTime > -1L ? (float)(l - this.reloadCompleteTime) / 1000.0F : -1.0F;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"puzzle.text.update_available":"Uma atualização está disponível!",
|
"puzzle.text.update_available":"Uma atualização está disponível!",
|
||||||
"puzzle.screen.title":"Puzzle Definições",
|
"puzzle.screen.title":"Configurações do Puzzle",
|
||||||
"puzzle.page.graphics":"Gráficas",
|
"puzzle.page.graphics":"Gráficas",
|
||||||
"puzzle.page.resources":"Recursos",
|
"puzzle.page.resources":"Recursos",
|
||||||
"puzzle.page.performance":"Desempenho",
|
"puzzle.page.performance":"Desempenho",
|
||||||
@@ -8,16 +8,19 @@
|
|||||||
"puzzle.option.check_for_updates":"Verifique se há atualizações",
|
"puzzle.option.check_for_updates":"Verifique se há atualizações",
|
||||||
"puzzle.option.check_for_updates.tooltip":"Ativa o verificador de atualização integrado do Puzzle",
|
"puzzle.option.check_for_updates.tooltip":"Ativa o verificador de atualização integrado do Puzzle",
|
||||||
"puzzle.option.show_version_info":"Mostrar informações da versão do Puzzle",
|
"puzzle.option.show_version_info":"Mostrar informações da versão do Puzzle",
|
||||||
"puzzle.option.show_version_info.tooltip":"Mostrar informações sobre o atual\nVersão do Puzzle e status de atualização em\na tela de título e o menu F3",
|
"puzzle.option.show_version_info.tooltip":"Mostrar informações sobre o atual\nversão do Puzzle e status de atualização em\n Tela de Título e o Menu F3",
|
||||||
"puzzle.option.resourcepack_splash_screen":"Use a tela inicial do pacote de recursos",
|
"puzzle.option.resourcepack_splash_screen":"Use a tela inicial do pacote de recursos",
|
||||||
"puzzle.option.resourcepack_splash_screen.tooltip":"Permite que os pacotes de recursos mudem a aparência\ndo carregamento do Minecraft/splash\ntela usando o formato OptiFine",
|
"puzzle.option.resourcepack_splash_screen.tooltip":"Permite que os pacotes de recursos mudem a aparência\ndo carregamento do Minecraft/splash\ntela usando o formato OptiFine",
|
||||||
"puzzle.option.better_splash_screen_blend":"Melhor combinação do logotipo da tela inicial",
|
"puzzle.option.better_splash_screen_blend":"Melhor combinação do logotipo da tela inicial",
|
||||||
"puzzle.option.better_splash_screen_blend.tooltip":"Muda o tipo de mistura usado\npelo logotipo na tela inicial\npara trabalhar melhor com logotipos coloridos personalizados",
|
"puzzle.option.better_splash_screen_blend.tooltip":"Muda o tipo de mistura usado\npelo logotipo na tela inicial\npara trabalhar melhor com logotipos coloridos personalizados",
|
||||||
"puzzle.option.unlimited_model_rotations":"Rotações de modelo ilimitadas",
|
"puzzle.option.unlimited_model_rotations":"Rotações de Modelo Ilimitadas",
|
||||||
"puzzle.option.unlimited_model_rotations.tooltip":"Desbloqueia rotação total de 360° em modelos de itens/blocos personalizados",
|
"puzzle.option.unlimited_model_rotations.tooltip":"Desbloqueia rotação total de 360° em modelos de itens/blocos personalizados",
|
||||||
"puzzle.option.bigger_custom_models":"Modelos personalizados maiores",
|
"puzzle.option.bigger_custom_models":"Modelos Personalizados Maiores",
|
||||||
"puzzle.option.bigger_custom_models.tooltip":"Aumenta o limite de\ntamanhos de modelo de bloco/item personalizados\nde 3x3x3 a 5x5x5",
|
"puzzle.option.bigger_custom_models.tooltip":"Aumenta o limite de\ntamanhos de modelo de bloco/item personalizados\nde 3x3x3 a 5x5x5",
|
||||||
"puzzle.midnightconfig.title":"Configuração avançada do Puzzle",
|
"puzzle.midnightconfig.title":"Configuração Avançada do Puzzle",
|
||||||
|
"puzzle.midnightconfig.category.gui":"GUI",
|
||||||
|
"puzzle.midnightconfig.category.features":"Recursos",
|
||||||
|
"puzzle.midnightconfig.category.internal":"Interno",
|
||||||
"puzzle.midnightconfig.tooltip":"Opções apenas para usuários avançados",
|
"puzzle.midnightconfig.tooltip":"Opções apenas para usuários avançados",
|
||||||
|
|
||||||
"cullleaves.puzzle.option.enabled": "Abate de Folhas",
|
"cullleaves.puzzle.option.enabled": "Abate de Folhas",
|
||||||
@@ -34,6 +37,6 @@
|
|||||||
"config.dynamicfps.run_gc_on_unfocus.tooltip": "Execute um coletor de lixo enquanto\nMinecraft não está focado em\nliberar um pouco de RAM",
|
"config.dynamicfps.run_gc_on_unfocus.tooltip": "Execute um coletor de lixo enquanto\nMinecraft não está focado em\nliberar um pouco de RAM",
|
||||||
"config.dynamicfps.unfocused_volume.tooltip": "O volume que o jogo deve reproduzir\nsom enquanto desfocado\n(ou seja, outra janela é selecionada)",
|
"config.dynamicfps.unfocused_volume.tooltip": "O volume que o jogo deve reproduzir\nsom enquanto desfocado\n(ou seja, outra janela é selecionada)",
|
||||||
"config.dynamicfps.hidden_volume.tooltip": "O volume que o jogo deve reproduzir\nsom em enquanto não visível\n(ou seja, minimizado, coberto por outras janelas\nem em outra área de trabalho virtual)",
|
"config.dynamicfps.hidden_volume.tooltip": "O volume que o jogo deve reproduzir\nsom em enquanto não visível\n(ou seja, minimizado, coberto por outras janelas\nem em outra área de trabalho virtual)",
|
||||||
"entity_texture_features.puzzle.emissive_type.brighter": "§eMais brilhante",
|
"entity_texture_features.puzzle.emissive_type.brighter": "§eMais Brilhante",
|
||||||
"entity_texture_features.puzzle.emissive_type.default": "§6Padrão"
|
"entity_texture_features.puzzle.emissive_type.default": "§6Padrão"
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
# Done to increase the memory available to gradle.
|
# Done to increase the memory available to gradle.
|
||||||
org.gradle.jvmargs=-Xmx2G
|
org.gradle.jvmargs=-Xmx2G
|
||||||
|
|
||||||
minecraft_version=1.21.5
|
minecraft_version=1.21.6
|
||||||
supported_versions=
|
supported_versions=
|
||||||
yarn_mappings=1.21.5+build.1
|
yarn_mappings=1.21.6+build.1
|
||||||
enabled_platforms=fabric,neoforge
|
enabled_platforms=fabric,neoforge
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 2.1.0
|
mod_version = 2.1.1
|
||||||
maven_group = net.puzzlemc
|
maven_group = net.puzzlemc
|
||||||
archives_base_name = puzzle
|
archives_base_name = puzzle
|
||||||
release_type=release
|
release_type=release
|
||||||
@@ -15,15 +15,15 @@ curseforge_id=563977
|
|||||||
modrinth_id=3IuO68q1
|
modrinth_id=3IuO68q1
|
||||||
|
|
||||||
# Modloaders
|
# Modloaders
|
||||||
fabric_loader_version=0.16.10
|
fabric_loader_version=0.16.14
|
||||||
fabric_api_version=0.119.5+1.21.5
|
fabric_api_version=0.127.0+1.21.6
|
||||||
|
|
||||||
neoforge_version=21.5.3-beta
|
neoforge_version=21.6.0-beta
|
||||||
yarn_mappings_patch_neoforge_version = 1.21+build.4
|
yarn_mappings_patch_neoforge_version = 1.21+build.4
|
||||||
|
|
||||||
# Libraries
|
# Libraries
|
||||||
midnightlib_version = 1.7.0+1.21.4
|
midnightlib_version = 1.7.4+1.21.6
|
||||||
modmenu_version = 13.0.0-beta.1
|
modmenu_version = 15.0.0-beta.1
|
||||||
|
|
||||||
# Mod Integrations
|
# Mod Integrations
|
||||||
cull_leaves_version = 3.0.2-fabric
|
cull_leaves_version = 3.0.2-fabric
|
||||||
|
|||||||
Reference in New Issue
Block a user