diff --git a/build.gradle b/build.gradle index a68506487..83bf5cbfd 100644 --- a/build.gradle +++ b/build.gradle @@ -2,91 +2,98 @@ import se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask buildscript { repositories { - maven { url = "https://files.minecraftforge.net/maven" } - jcenter() + maven { url = 'https://files.minecraftforge.net/maven' } mavenCentral() } // This is only here while FG is under active development configurations.classpath { resolutionStrategy { - cacheDynamicVersionsFor 10, "seconds" - cacheChangingModulesFor 0, "seconds" + cacheDynamicVersionsFor 10, 'seconds' + cacheChangingModulesFor 0, 'seconds' } } dependencies { - classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "3.+", changing: true + classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.1.+', changing: true } } plugins { - id "com.matthewprenger.cursegradle" version "1.4.0" - id "se.bjurr.gitchangelog.git-changelog-gradle-plugin" version "1.64" + id 'java' + id 'eclipse' + id 'idea' + id 'com.matthewprenger.cursegradle' version '1.4.0' + id 'se.bjurr.gitchangelog.git-changelog-gradle-plugin' version '1.66' } -apply from: "buildtools/ColoredOutput.gradle" -apply plugin: 'idea' -apply plugin: "net.minecraftforge.gradle" +apply plugin: 'net.minecraftforge.gradle' +apply from: 'buildtools/ColoredOutput.gradle' //adds the build number to the end of the version string if on a build server String build_number = System.getenv().BUILD_NUMBER if (build_number == null) { - build_number = "9999" + build_number = '9999' } String semver = "${version_major}.${version_minor}.${version_patch}" version = "${semver}.${build_number}" -group = "mezz.jei" // http://maven.apache.org/guides/mini/guide-naming-conventions.html - -sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 -compileJava { - sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 -} - -repositories { - maven { url 'https://repo1.maven.org/maven2' } - maven { url 'https://maven.latmod.com/' } -} +group = 'mezz.jei' // http://maven.apache.org/guides/mini/guide-naming-conventions.html sourceSets { api - main - test + main { + compileClasspath += sourceSets.api.output + runtimeClasspath += sourceSets.api.output + resources { + srcDir 'src/generated/resources' + } + } + test { + compileClasspath += sourceSets.api.output + runtimeClasspath += sourceSets.api.output + } } configurations { - apiCompile.extendsFrom(compile) + apiImplementation.extendsFrom(implementation) + apiRuntimeOnly.extendsFrom(runtimeOnly) +} + +java.toolchain.languageVersion = JavaLanguageVersion.of(8) + +repositories { + mavenCentral() + maven { url 'https://maven.latmod.com/' } } dependencies { minecraft([ - group : "${project.forgegroup}", - name : "forge", - version: "${project.mcversion}-${project.forgeversion}" + group : "${project.forgegroup}", + name : 'forge', + version: "${project.mcversion}-${project.forgeversion}" ]) - implementation sourceSets.api.output - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.2' + testImplementation "org.junit.jupiter:junit-jupiter-api:5.7.1" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.7.1" compileOnly fg.deobf('com.feed_the_beast.mods:ftb-gui-library:1.0.0.18') } task replaceResources(type: Copy) { - outputs.upToDateWhen { false } - from(sourceSets.main.resources.srcDirs) { - include "META-INF/mods.toml" - expand 'version': version, 'mc_version': minecraft_version_range, 'forge_version': forge_version_range - } - into "$buildDir/resources/main/" + outputs.upToDateWhen { false } + from(sourceSets.main.resources.srcDirs) { + include 'META-INF/mods.toml' + expand 'version': version, 'mc_version': minecraft_version_range, 'forge_version': forge_version_range + } + into "$buildDir/resources/main/" } processResources { - from(sourceSets.main.resources.srcDirs) { - exclude 'META-INF/mods.toml' - } - finalizedBy replaceResources + from(sourceSets.main.resources.srcDirs) { + exclude 'META-INF/mods.toml' + } + finalizedBy replaceResources } minecraft { - mappings channel: "snapshot", version: project.mcp_mappings + mappings channel: 'snapshot', version: project.mcp_mappings accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') @@ -125,67 +132,66 @@ minecraft { } } -// prevent java 8's strict doclint for javadocs from failing builds -if (JavaVersion.current().isJava8Compatible()) { - tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') - } +javadoc { + source = [sourceSets.main.allJava, sourceSets.api.allJava] + // prevent java 8's strict doclint for javadocs from failing builds + options.addStringOption('Xdoclint:none', '-quiet') } task makeChangelog(type: GitChangelogTask) { - file = new File("changelog.html") + file = file('changelog.html') untaggedName = "Current release ${project.version}" - fromCommit = "2fe051cf727adce1be210a46f778aa8fe031331e" - toRef = "HEAD" - templateContent = file("changelog.mustache").getText("UTF-8") + fromCommit = '2fe051cf727adce1be210a46f778aa8fe031331e' + toRef = 'HEAD' + templateContent = file('changelog.mustache').getText('UTF-8') } curseforge { - apiKey = project.hasProperty("curseforge_apikey") ? project.curseforge_apikey : "0" + apiKey = project.findProperty('curseforge_apikey') ?: '0' project { id = curse_project_id - changelog = file("changelog.html") - changelogType = "html" - releaseType = "beta" + changelog = file('changelog.html') + changelogType = 'html' + releaseType = 'beta' } } afterEvaluate { - tasks.curseforge238222.dependsOn.add(makeChangelog) + tasks.curseforge238222.dependsOn makeChangelog } jar { - from sourceSets.main.output.classesDirs - from sourceSets.api.output.classesDirs - from sourceSets.main.output.resourcesDir - from sourceSets.api.output.resourcesDir - + from sourceSets.main.output + from sourceSets.api.output + manifest { attributes([ - "Specification-Title": "Just Enough Items", - "Specification-Vendor": "mezz", - "Specification-Version": "${semver}", - "Implementation-Title": project.name, - "Implementation-Version": "${project.version}", - "Implementation-Vendor" :"mezz", - "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), + 'Specification-Title' : 'Just Enough Items', + 'Specification-Vendor' : 'mezz', + 'Specification-Version' : "${semver}", + 'Implementation-Title' : project.name, + 'Implementation-Version' : "${project.version}", + 'Implementation-Vendor' : 'mezz', + 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), ]) } + + finalizedBy 'reobfJar' } task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = "javadoc" + archiveClassifier = 'javadoc' from javadoc.destinationDir } task sourcesJar(type: Jar) { - classifier = "sources" + archiveClassifier = 'sources' from sourceSets.main.allJava from sourceSets.api.allJava } task apiJar(type: Jar) { - classifier = "api" + archiveClassifier = 'api' from sourceSets.api.output // TODO: when FG bug is fixed, remove allJava from the api jar. @@ -194,16 +200,23 @@ task apiJar(type: Jar) { from sourceSets.api.allJava } +task deobfJar(type: Jar) { + archiveClassifier = 'deobf' + from sourceSets.main.output + from sourceSets.api.output +} + artifacts { archives javadocJar archives sourcesJar archives apiJar + archives deobfJar } -task("uploadJars", dependsOn: "build") { - description = "uploads JARs" - if (project.hasProperty("local_maven")) { - apply plugin: "maven" +task uploadJars(dependsOn: build) { + description = 'Uploads JARs' + if (project.hasProperty('local_maven')) { + apply plugin: 'maven' uploadArchives { repositories { mavenDeployer { @@ -216,9 +229,8 @@ task("uploadJars", dependsOn: "build") { idea { module { - for (String excludeDirName in ["run", "out", "logs", "gradle"]) { - File excludeDir = new File(projectDir, excludeDirName) - excludeDirs.add(excludeDir) + for (String exclude in ['run', 'out', 'logs']) { + excludeDirs += file(exclude) } } } diff --git a/gradle.properties b/gradle.properties index b03d8b48e..d1a994dc7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,4 @@ +org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false mcversion=1.16.5 @@ -5,7 +6,7 @@ forgeversion=36.1.0 forge_version_range=[34.0.3,) minecraft_version_range=[1.16.2, 1.17) forgegroup=net.minecraftforge -mcp_mappings=20201028-1.16.3 +mcp_mappings=20210309-1.16.5 curse_project_id=238222 version_major=7 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 29953ea14..e708b1c02 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f3ed5df18..442d9132e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Sun Jan 06 21:09:47 PST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip diff --git a/gradlew b/gradlew index cccdd3d51..4f906e0c8 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -66,6 +82,7 @@ esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then @@ -109,10 +126,11 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath @@ -138,19 +156,19 @@ if $cygwin ; then else eval `echo args$i`="\"$arg\"" fi - i=$((i+1)) + i=`expr $i + 1` done case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi @@ -159,14 +177,9 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=$(save "$@") +APP_ARGS=`save "$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index f9553162f..107acd32c 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -35,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -45,28 +64,14 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell diff --git a/src/main/java/mezz/jei/gui/HoverChecker.java b/src/main/java/mezz/jei/gui/HoverChecker.java index ffd956197..e43c5c7e9 100644 --- a/src/main/java/mezz/jei/gui/HoverChecker.java +++ b/src/main/java/mezz/jei/gui/HoverChecker.java @@ -21,7 +21,7 @@ public HoverChecker(int top, int bottom, int left, int right) { public void updateBounds(Button button) { this.top = button.y; - this.bottom = button.y + button.getHeightRealms(); + this.bottom = button.y + button.getHeight(); this.left = button.x; this.right = button.x + button.getWidth(); } diff --git a/src/main/java/mezz/jei/gui/overlay/IngredientListOverlay.java b/src/main/java/mezz/jei/gui/overlay/IngredientListOverlay.java index d9fca86a1..84be50849 100644 --- a/src/main/java/mezz/jei/gui/overlay/IngredientListOverlay.java +++ b/src/main/java/mezz/jei/gui/overlay/IngredientListOverlay.java @@ -166,7 +166,7 @@ public void updateLayout(boolean filterChanged) { public void drawScreen(Minecraft minecraft, MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) { if (isListDisplayed()) { RenderSystem.disableLighting(); - this.searchField.renderButton(matrixStack, mouseX, mouseY, partialTicks); + this.searchField.renderWidget(matrixStack, mouseX, mouseY, partialTicks); this.contents.draw(minecraft, matrixStack, mouseX, mouseY, partialTicks); } if (this.guiProperties != null) { diff --git a/src/main/java/mezz/jei/input/GuiTextFieldFilter.java b/src/main/java/mezz/jei/input/GuiTextFieldFilter.java index 323d14503..d4fdd9a33 100644 --- a/src/main/java/mezz/jei/input/GuiTextFieldFilter.java +++ b/src/main/java/mezz/jei/input/GuiTextFieldFilter.java @@ -163,13 +163,13 @@ protected boolean getEnableBackgroundDrawing() { } @Override - public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) { + public void renderWidget(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) { this.isDrawing = true; if (this.getVisible()) { RenderSystem.color4f(1, 1, 1, 1); background.draw(matrixStack, this.x, this.y, this.width, this.height); } - super.renderButton(matrixStack, mouseX, mouseY, partialTicks); + super.renderWidget(matrixStack, mouseX, mouseY, partialTicks); this.isDrawing = false; } // end background hack diff --git a/src/main/java/mezz/jei/plugins/vanilla/RecipeBookGuiHandler.java b/src/main/java/mezz/jei/plugins/vanilla/RecipeBookGuiHandler.java index ea3cb0520..59be4b05f 100644 --- a/src/main/java/mezz/jei/plugins/vanilla/RecipeBookGuiHandler.java +++ b/src/main/java/mezz/jei/plugins/vanilla/RecipeBookGuiHandler.java @@ -27,7 +27,7 @@ public List getGuiExtraAreas(T containerScreen) { areas.add(new Rectangle2d(i, j, 147, 166)); for (RecipeTabToggleWidget tab : guiRecipeBook.recipeTabs) { if (tab.visible) { - areas.add(new Rectangle2d(tab.x, tab.y, tab.getWidth(), tab.getHeightRealms())); + areas.add(new Rectangle2d(tab.x, tab.y, tab.getWidth(), tab.getHeight())); } } return areas; diff --git a/src/main/java/mezz/jei/plugins/vanilla/brewing/BrewingRecipeCategory.java b/src/main/java/mezz/jei/plugins/vanilla/brewing/BrewingRecipeCategory.java index fe0eb835f..87d751bdc 100644 --- a/src/main/java/mezz/jei/plugins/vanilla/brewing/BrewingRecipeCategory.java +++ b/src/main/java/mezz/jei/plugins/vanilla/brewing/BrewingRecipeCategory.java @@ -99,7 +99,7 @@ public void draw(JeiBrewingRecipe recipe, MatrixStack matrixStack, double mouseX String brewingStepsString = brewingSteps < Integer.MAX_VALUE ? Integer.toString(brewingSteps) : "?"; TranslationTextComponent steps = new TranslationTextComponent("gui.jei.category.brewing.steps", brewingStepsString); Minecraft minecraft = Minecraft.getInstance(); - minecraft.fontRenderer.func_243248_b(matrixStack, steps, 70, 28, 0xFF808080); + minecraft.fontRenderer.drawText(matrixStack, steps, 70, 28, 0xFF808080); } @Override diff --git a/src/main/java/mezz/jei/plugins/vanilla/cooking/AbstractCookingCategory.java b/src/main/java/mezz/jei/plugins/vanilla/cooking/AbstractCookingCategory.java index b30b486f7..46cb111ec 100644 --- a/src/main/java/mezz/jei/plugins/vanilla/cooking/AbstractCookingCategory.java +++ b/src/main/java/mezz/jei/plugins/vanilla/cooking/AbstractCookingCategory.java @@ -86,7 +86,7 @@ protected void drawExperience(T recipe, MatrixStack matrixStack, int y) { Minecraft minecraft = Minecraft.getInstance(); FontRenderer fontRenderer = minecraft.fontRenderer; int stringWidth = fontRenderer.getStringPropertyWidth(experienceString); - fontRenderer.func_243248_b(matrixStack, experienceString, background.getWidth() - stringWidth, y, 0xFF808080); + fontRenderer.drawText(matrixStack, experienceString, background.getWidth() - stringWidth, y, 0xFF808080); } } @@ -98,7 +98,7 @@ protected void drawCookTime(T recipe, MatrixStack matrixStack, int y) { Minecraft minecraft = Minecraft.getInstance(); FontRenderer fontRenderer = minecraft.fontRenderer; int stringWidth = fontRenderer.getStringPropertyWidth(timeString); - fontRenderer.func_243248_b(matrixStack, timeString, background.getWidth() - stringWidth, y, 0xFF808080); + fontRenderer.drawText(matrixStack, timeString, background.getWidth() - stringWidth, y, 0xFF808080); } } diff --git a/src/main/java/mezz/jei/plugins/vanilla/cooking/fuel/FurnaceFuelCategory.java b/src/main/java/mezz/jei/plugins/vanilla/cooking/fuel/FurnaceFuelCategory.java index e3f927aa9..1aaada41b 100644 --- a/src/main/java/mezz/jei/plugins/vanilla/cooking/fuel/FurnaceFuelCategory.java +++ b/src/main/java/mezz/jei/plugins/vanilla/cooking/fuel/FurnaceFuelCategory.java @@ -86,6 +86,6 @@ public void draw(FuelRecipe recipe, MatrixStack matrixStack, double mouseX, doub flame.draw(matrixStack, 1, 0); Minecraft minecraft = Minecraft.getInstance(); ITextComponent smeltCountText = recipe.getSmeltCountText(); - minecraft.fontRenderer.func_243248_b(matrixStack, smeltCountText, 24, 13, 0xFF808080); + minecraft.fontRenderer.drawText(matrixStack, smeltCountText, 24, 13, 0xFF808080); } } diff --git a/src/main/java/mezz/jei/util/StringUtil.java b/src/main/java/mezz/jei/util/StringUtil.java index bd1ea12ce..f93070d25 100644 --- a/src/main/java/mezz/jei/util/StringUtil.java +++ b/src/main/java/mezz/jei/util/StringUtil.java @@ -8,6 +8,6 @@ private StringUtil() { } public static String truncateStringToWidth(String string, int width, FontRenderer fontRenderer) { - return fontRenderer.func_238413_a_(string, width - fontRenderer.getStringWidth("..."), false) + "..."; + return fontRenderer.getLineScrollOffset(string, width - fontRenderer.getStringWidth("..."), false) + "..."; } } diff --git a/src/main/java/mezz/jei/vote/GoVoteHandler.java b/src/main/java/mezz/jei/vote/GoVoteHandler.java index 37d60be9e..5d88b29b8 100644 --- a/src/main/java/mezz/jei/vote/GoVoteHandler.java +++ b/src/main/java/mezz/jei/vote/GoVoteHandler.java @@ -171,14 +171,14 @@ protected GoVoteScreen(Screen parent) { addGroup(StringTextComponent.EMPTY, s("But power is still in the hands of We, the People.")); addGroup(s("The Constitution and its amendments guarantee us the right to vote.")); addGroup(s("And it is not only our right, but our ") - .append(s("responsibility").mergeStyle(TextFormatting.ITALIC, TextFormatting.GOLD)) + .appendSibling(s("responsibility").mergeStyle(TextFormatting.ITALIC, TextFormatting.GOLD)) .appendString(" to do so.")); addGroup(s("Your vote matters. Always.")); addGroup( StringTextComponent.EMPTY, s("If you are eligible to vote, please take 2 minutes and click anywhere"), s("to check your registration status and register at ") - .append(s(VOTE_ORG_LINK).mergeStyle(TextFormatting.GOLD)) + .appendSibling(s(VOTE_ORG_LINK).mergeStyle(TextFormatting.GOLD)) ); addGroup( StringTextComponent.EMPTY, diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 2862dd5b1..495a15a9c 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -9,15 +9,9 @@ modLoader="javafml" #mandatory # A version range to match for said mod loader - for regular FML @Mod it will be the minecraft version (without the 1.) loaderVersion="[34,)" #mandatory -# A URL to query for updates for this mod. See the JSON update specification -#updateJSONURL="" #optional - # A URL to refer people to when problems occur with this mod issueTrackerURL="https://github.com/mezz/JustEnoughItems/issues?q=is%3Aissue" #optional -# A URL for the "homepage" for this mod, displayed in the mod UI -displayURL="https://minecraft.curseforge.com/projects/jei" #optional - # License license="The MIT License (MIT)" @@ -27,9 +21,6 @@ license="The MIT License (MIT)" # A text field displayed in the mod UI #credits="Thanks for this example mod goes to Java" #optional -# A text field displayed in the mod UI -authors="mezz" #optional - # A list of mods - how many allowed here is determined by the individual mod loader [[mods]] #mandatory @@ -42,6 +33,18 @@ version="${version}" #mandatory # A display name for the mod displayName="Just Enough Items" #mandatory +# A URL for the "homepage" for this mod, displayed in the mod UI +displayURL="https://minecraft.curseforge.com/projects/jei" #optional + +# A URL to query for updates for this mod. See the JSON update specification +#updateJSONURL="" #optional + +# A text field displayed in the mod UI +# credits="" #optional + +# A text field displayed in the mod UI +authors="mezz" #optional + # The description text for the mod (multi line!) (#mandatory) description=''' JEI is an item and recipe viewing mod for Minecraft, built from the ground up for stability and performance.