Skip to content

Commit

Permalink
Update deps and rerun image optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
pupnewfster committed Oct 5, 2020
1 parent be85fda commit 72ee8ba
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
30 changes: 17 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -586,25 +586,29 @@ task fullBuild(type: Delete) {

//Minimize/optimize all png files, requires optipng on the PATH
// Credits: BrainStone
void minimizePNGFile(File file) {
long size = file.length()
exec {
executable "optipng"
args "-q", "-o7", "-zm1-9", "-strip", "all", file
}
long newSize = file.length()
if (newSize < size) {
System.out.format("Reduced File size of %s from %d bytes to %d bytes (reduced by %.2f%%)\n",
file, size, newSize, ((double) (size - newSize)) / ((double) size) * 100.0)
}
}

task optimizePng {
def pngPatterns = ["**/*.png"]

doLast {
//Ensure the logo is minimized (we add this file to each jar)
minimizePNGFile(file("${projectDir}/logo.png"))
//Minimize any PNGs in the source sets
def sourceSets = [sourceSets.main, sourceSets.additions, sourceSets.generators, sourceSets.defense, sourceSets.tools]
for (def sourceSet : sourceSets) {
for (dir in sourceSet.resources.srcDirs) {
fileTree(dir: dir, includes: pngPatterns).each { File file ->
long size = file.length()
exec {
executable "optipng"
args "-q", "-o7", "-zm1-9", "-strip", "all", file
}
long newSize = file.length()
if (newSize < size) {
System.out.format("Reduced File size of %s from %d bytes to %d bytes (reduced by %.2f%%)\n",
file, size, newSize, ((double) (size - newSize)) / ((double) size) * 100.0)
}
}
fileTree(dir: dir, includes: pngPatterns).each { minimizePNGFile(it) }
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ org.gradle.jvmargs=-Xmx3G
minecraft_version=1.16.3
mappings_version=20200916-1.16.2
loader_version=34
forge_version=34.1.0
forge_version=34.1.10
mod_version=10.0.9
#This determines the minimum version of forge required to use Mekanism
# Only bump it whenever we need access to a feature in forge that is not available in earlier versions
min_forge_version=34.0.18
min_forge_version=34.1.4
#This specifies what type of release it will be uploaded to curseforge as
# options are: alpha, beta, release
curse_release_type=release
Expand All @@ -24,7 +24,7 @@ junit_version=5.7.0
quicktheories_version=0.26

#Mod dependencies
jei_version=7.3.2.36
jei_version=7.5.0.42
ctm_version=1.1.1.5
top_version=1.16-3.0.4-beta-7
hwyla_version=1.10.11-B78_1.16.2
Expand Down
Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/main/java/mekanism/client/jei/MekanismJEI.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public String apply(ItemStack stack) {
@Override
public String apply(ItemStack stack, UidContext context) {
//Only use the old method if we are an ingredient, for recipes ignore all the NBT
//Note: There are still some "issues" with this due to: https://github.com/mezz/JustEnoughItems/issues/2102
return context == UidContext.Ingredient ? apply(stack) : ISubtypeInterpreter.NONE;
}
};
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 72ee8ba

Please sign in to comment.