diff --git a/doc/changelog.html b/doc/changelog.html index 680308a..1d2f9df 100644 --- a/doc/changelog.html +++ b/doc/changelog.html @@ -23,5 +23,6 @@

JourneyMap ${version} for Minecraft ${mcversion}

New in ${version}

diff --git a/gradle.properties b/gradle.properties index b53f5f6..a3f58fe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -79,6 +79,11 @@ accessTransformersFile = journeymap_at.cfg # Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled! usesMixins = false +# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main. +# This can speed up compile times thanks to not running the mixin annotation processor on all input sources. +# Mixin classes will have access to "main" classes, but not the other way around. +separateMixinSourceSet = + # Adds some debug arguments like verbose output and class export. usesMixinDebug = false @@ -111,9 +116,15 @@ minimizeShadowedDependencies = false # If disabled, won't rename the shadowed classes. relocateShadowedDependencies = true -# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories. +# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories. includeWellKnownRepositories = true +# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated +# list of strings, with the acceptable keys being(case does not matter): +# cursemaven +# modrinth +excludeWellKnownRepositories = + # Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven. # Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables. # If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle. @@ -149,7 +160,7 @@ curseForgeProjectId = 32274 # and the name is the CurseForge project slug of the other mod. # Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft # Note: UniMixins is automatically set as a required dependency if usesMixins = true. -curseForgeRelations = tool:journeymap-tools +curseForgeRelations = tool\:journeymap-tools # Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older # projects. New projects should not use this parameter. diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a80b22c..e2847c8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle index c4d0c5b..16e84e7 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,5 +17,5 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.17' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30' } diff --git a/src/main/java/journeymap/client/render/texture/TextureCache.java b/src/main/java/journeymap/client/render/texture/TextureCache.java index 6c8fb85..8df057a 100644 --- a/src/main/java/journeymap/client/render/texture/TextureCache.java +++ b/src/main/java/journeymap/client/render/texture/TextureCache.java @@ -5,6 +5,7 @@ package journeymap.client.render.texture; +import javax.imageio.ImageTypeSpecifier; import journeymap.client.io.FileHandler; import journeymap.client.io.IconSetFileHandler; import journeymap.client.io.RegionImageHandler; @@ -36,11 +37,11 @@ */ public class TextureCache { - private final Map namedTextures = Collections.synchronizedMap(new HashMap(Name.values().length + (Name.values().length / 2) + 1)); - //private final Map customTextures = Collections.synchronizedMap(new HashMap(3)); - private final Map playerSkins = Collections.synchronizedMap(new HashMap()); - private final Map entityIcons = Collections.synchronizedMap(new HashMap()); - private final Map themeImages = Collections.synchronizedMap(new HashMap()); + private final Map namedTextures = Collections.synchronizedMap(new HashMap<>(Name.values().length + (Name.values().length / 2) + 1)); + //private final Map customTextures = Collections.synchronizedMap(new HashMap<>(3)); + private final Map playerSkins = Collections.synchronizedMap(new HashMap<>()); + private final Map entityIcons = Collections.synchronizedMap(new HashMap<>()); + private final Map themeImages = Collections.synchronizedMap(new HashMap<>()); private ThreadPoolExecutor texExec = new ThreadPoolExecutor(2, 4, 15L, TimeUnit.SECONDS, new ArrayBlockingQueue(8), new JMThreadFactory("texture"), new ThreadPoolExecutor.CallerRunsPolicy()); @@ -322,7 +323,7 @@ public TextureImpl getThemeTexture(Theme theme, String iconPath, int width, int { if (alpha < 1f || img.getWidth() != width || img.getHeight() != height) { - BufferedImage tmp = new BufferedImage(width, height, img.getType()); + BufferedImage tmp = ImageTypeSpecifier.createFromRenderedImage(img).createBufferedImage(width, height); Graphics2D g = tmp.createGraphics(); g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha)); g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); @@ -363,7 +364,7 @@ public TextureImpl getScaledCopy(String texName, TextureImpl original, int width { if (alpha < 1f || img.getWidth() != width || img.getHeight() != height) { - BufferedImage tmp = new BufferedImage(width, height, img.getType()); + BufferedImage tmp = ImageTypeSpecifier.createFromRenderedImage(img).createBufferedImage(width, height); Graphics2D g = tmp.createGraphics(); g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha)); g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); @@ -424,7 +425,8 @@ public Void call() throws Exception BufferedImage img = downloadSkin(username); if (img != null) { - final BufferedImage scaledImage = new BufferedImage(24, 24, img.getType()); + final BufferedImage scaledImage = + ImageTypeSpecifier.createFromRenderedImage(img).createBufferedImage(24, 24); final Graphics2D g = RegionImageHandler.initRenderingHints(scaledImage.createGraphics()); g.drawImage(img, 0, 0, 24, 24, null); g.dispose();