Skip to content

Commit 72ee8ba

Browse files
committed
Update deps and rerun image optimizer
1 parent be85fda commit 72ee8ba

File tree

5 files changed

+20
-17
lines changed

5 files changed

+20
-17
lines changed

build.gradle

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -586,25 +586,29 @@ task fullBuild(type: Delete) {
586586

587587
//Minimize/optimize all png files, requires optipng on the PATH
588588
// Credits: BrainStone
589+
void minimizePNGFile(File file) {
590+
long size = file.length()
591+
exec {
592+
executable "optipng"
593+
args "-q", "-o7", "-zm1-9", "-strip", "all", file
594+
}
595+
long newSize = file.length()
596+
if (newSize < size) {
597+
System.out.format("Reduced File size of %s from %d bytes to %d bytes (reduced by %.2f%%)\n",
598+
file, size, newSize, ((double) (size - newSize)) / ((double) size) * 100.0)
599+
}
600+
}
601+
589602
task optimizePng {
590603
def pngPatterns = ["**/*.png"]
591-
592604
doLast {
605+
//Ensure the logo is minimized (we add this file to each jar)
606+
minimizePNGFile(file("${projectDir}/logo.png"))
607+
//Minimize any PNGs in the source sets
593608
def sourceSets = [sourceSets.main, sourceSets.additions, sourceSets.generators, sourceSets.defense, sourceSets.tools]
594609
for (def sourceSet : sourceSets) {
595610
for (dir in sourceSet.resources.srcDirs) {
596-
fileTree(dir: dir, includes: pngPatterns).each { File file ->
597-
long size = file.length()
598-
exec {
599-
executable "optipng"
600-
args "-q", "-o7", "-zm1-9", "-strip", "all", file
601-
}
602-
long newSize = file.length()
603-
if (newSize < size) {
604-
System.out.format("Reduced File size of %s from %d bytes to %d bytes (reduced by %.2f%%)\n",
605-
file, size, newSize, ((double) (size - newSize)) / ((double) size) * 100.0)
606-
}
607-
}
611+
fileTree(dir: dir, includes: pngPatterns).each { minimizePNGFile(it) }
608612
}
609613
}
610614
}

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ org.gradle.jvmargs=-Xmx3G
55
minecraft_version=1.16.3
66
mappings_version=20200916-1.16.2
77
loader_version=34
8-
forge_version=34.1.0
8+
forge_version=34.1.10
99
mod_version=10.0.9
1010
#This determines the minimum version of forge required to use Mekanism
1111
# Only bump it whenever we need access to a feature in forge that is not available in earlier versions
12-
min_forge_version=34.0.18
12+
min_forge_version=34.1.4
1313
#This specifies what type of release it will be uploaded to curseforge as
1414
# options are: alpha, beta, release
1515
curse_release_type=release
@@ -24,7 +24,7 @@ junit_version=5.7.0
2424
quicktheories_version=0.26
2525

2626
#Mod dependencies
27-
jei_version=7.3.2.36
27+
jei_version=7.5.0.42
2828
ctm_version=1.1.1.5
2929
top_version=1.16-3.0.4-beta-7
3030
hwyla_version=1.10.11-B78_1.16.2

logo.png

-33.7 KB
Loading

src/main/java/mekanism/client/jei/MekanismJEI.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ public String apply(ItemStack stack) {
110110
@Override
111111
public String apply(ItemStack stack, UidContext context) {
112112
//Only use the old method if we are an ingredient, for recipes ignore all the NBT
113-
//Note: There are still some "issues" with this due to: https://github.com/mezz/JustEnoughItems/issues/2102
114113
return context == UidContext.Ingredient ? apply(stack) : ISubtypeInterpreter.NONE;
115114
}
116115
};
Loading

0 commit comments

Comments
 (0)