Update Forge

This commit is contained in:
raoulvdberge
2021-06-13 11:26:30 +02:00
parent 884610100e
commit c2adba68c0
41 changed files with 150 additions and 146 deletions

View File

@@ -1,16 +1,14 @@
buildscript { buildscript {
repositories { repositories {
maven { url = 'https://files.minecraftforge.net/maven' } maven { url = 'https://maven.minecraftforge.net' }
jcenter()
mavenCentral() mavenCentral()
} }
dependencies { 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 { plugins {
id "org.sonarqube" version "3.0"
id 'info.solidsoft.pitest' version '1.5.1' id 'info.solidsoft.pitest' version '1.5.1'
} }
@@ -19,15 +17,10 @@ repositories {
url = "https://dvs1.progwml6.com/files/maven/" url = "https://dvs1.progwml6.com/files/maven/"
} }
maven { maven {
url "https://minecraft.curseforge.com/api/maven/" url "https://www.cursemaven.com"
} content {
} includeGroup "curse.maven"
}
sonarqube {
properties {
property "sonar.projectKey", "refinedmods_refinedstorage"
property "sonar.organization", "refinedmods"
property "sonar.host.url", "https://sonarcloud.io"
} }
} }
@@ -48,10 +41,10 @@ if (env.BUILD_NUMBER) {
group = 'com.refinedmods' group = 'com.refinedmods'
archivesBaseName = 'refinedstorage' archivesBaseName = 'refinedstorage'
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' java.toolchain.languageVersion = JavaLanguageVersion.of(8)
minecraft { minecraft {
mappings channel: 'snapshot', version: '20200723-1.16.1' mappings channel: 'snapshot', version: '20210309-1.16.5'
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs { runs {
@@ -116,14 +109,14 @@ processResources {
} }
dependencies { dependencies {
minecraft 'net.minecraftforge:forge:1.16.3-34.1.0' minecraft 'net.minecraftforge:forge:1.16.5-36.1.31'
compileOnly fg.deobf("mezz.jei:jei-1.16.3:7.3.2.36:api") compileOnly fg.deobf("mezz.jei:jei-1.16.5:7.7.0.106:api")
runtimeOnly fg.deobf("mezz.jei:jei-1.16.3:7.3.2.36") runtimeOnly fg.deobf("mezz.jei:jei-1.16.5:7.7.0.106")
compileOnly 'mouse-tweaks:MouseTweaks:2.13:mc1.16.2' compileOnly fg.deobf('curse.maven:mouse-tweaks-60089:3202662')
runtimeOnly fg.deobf('crafting-tweaks:CraftingTweaks_1.16.2:12.1.0') compileOnly fg.deobf('curse.maven:crafting-tweaks-233071:3330406')
testImplementation('org.junit.jupiter:junit-jupiter-api:5.6.2') testImplementation('org.junit.jupiter:junit-jupiter-api:5.6.2')
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.6.2') testRuntime('org.junit.jupiter:junit-jupiter-engine:5.6.2')

Binary file not shown.

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-bin.zip

53
gradlew vendored
View File

@@ -1,5 +1,21 @@
#!/usr/bin/env sh #!/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 ## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"` 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. # 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. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum" MAX_FD="maximum"
@@ -66,6 +82,7 @@ esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; 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\"" GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi fi
# For Cygwin, switch paths to Windows format before running java # For Cygwin or MSYS, switch paths to Windows format before running java
if $cygwin ; then if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"` APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"` JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath # We build the pattern for arguments to be converted via cygpath
@@ -138,19 +156,19 @@ if $cygwin ; then
else else
eval `echo args$i`="\"$arg\"" eval `echo args$i`="\"$arg\""
fi fi
i=$((i+1)) i=`expr $i + 1`
done done
case $i in case $i in
(0) set -- ;; 0) set -- ;;
(1) set -- "$args0" ;; 1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;; 2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;; 3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;; 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac esac
fi fi
@@ -159,14 +177,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " " echo " "
} }
APP_ARGS=$(save "$@") APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules # 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" 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" "$@" exec "$JAVACMD" "$@"

43
gradlew.bat vendored
View File

@@ -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 @if "%DEBUG%" == "" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% 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. @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 @rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init if "%ERRORLEVEL%" == "0" goto execute
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 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_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init if exist "%JAVA_EXE%" goto execute
echo. echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -45,28 +64,14 @@ echo location of your Java installation.
goto fail 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 :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle @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 :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell

View File

@@ -26,7 +26,7 @@ public class NetworkNodeGraphEntry implements INetworkNodeGraphEntry {
NetworkNodeGraphEntry otherItem = (NetworkNodeGraphEntry) other; NetworkNodeGraphEntry otherItem = (NetworkNodeGraphEntry) other;
if (node.getWorld().func_234923_W_() != otherItem.node.getWorld().func_234923_W_()) { if (node.getWorld().getDimensionKey() != otherItem.node.getWorld().getDimensionKey()) {
return false; return false;
} }
@@ -36,7 +36,7 @@ public class NetworkNodeGraphEntry implements INetworkNodeGraphEntry {
@Override @Override
public int hashCode() { public int hashCode() {
int result = node.getPos().hashCode(); int result = node.getPos().hashCode();
result = 31 * result + node.getWorld().func_234923_W_().hashCode(); result = 31 * result + node.getWorld().getDimensionKey().hashCode();
return result; return result;
} }
} }

View File

@@ -33,7 +33,7 @@ public class NetworkItemManager implements INetworkItemManager {
if (node instanceof IWirelessTransmitter && if (node instanceof IWirelessTransmitter &&
network.canRun() && network.canRun() &&
node.isActive() && node.isActive() &&
((IWirelessTransmitter) node).getDimension() == player.getEntityWorld().func_234923_W_()) { ((IWirelessTransmitter) node).getDimension() == player.getEntityWorld().getDimensionKey()) {
IWirelessTransmitter transmitter = (IWirelessTransmitter) node; IWirelessTransmitter transmitter = (IWirelessTransmitter) node;
Vector3d pos = player.getPositionVec(); Vector3d pos = player.getPositionVec();

View File

@@ -194,7 +194,7 @@ public class CrafterNetworkNode extends NetworkNode implements ICraftingPatternC
StackUtils.readItems(upgrades, 1, tag); StackUtils.readItems(upgrades, 1, tag);
if (tag.contains(NBT_DISPLAY_NAME)) { if (tag.contains(NBT_DISPLAY_NAME)) {
displayName = ITextComponent.Serializer.func_240643_a_(tag.getString(NBT_DISPLAY_NAME)); displayName = ITextComponent.Serializer.getComponentFromJson(tag.getString(NBT_DISPLAY_NAME));
} }
if (tag.hasUniqueId(NBT_UUID)) { if (tag.hasUniqueId(NBT_UUID)) {

View File

@@ -98,7 +98,7 @@ public class NetworkTransmitterNetworkNode extends NetworkNode {
} }
public boolean isSameDimension() { public boolean isSameDimension() {
return world.func_234923_W_() == receiverDimension; return world.getDimensionKey() == receiverDimension;
} }
private boolean canTransmit() { private boolean canTransmit() {

View File

@@ -62,7 +62,7 @@ public class WirelessTransmitterNetworkNode extends NetworkNode implements IWire
@Override @Override
public RegistryKey<World> getDimension() { public RegistryKey<World> getDimension() {
return world.func_234923_W_(); return world.getDimensionKey();
} }
public BaseItemHandler getUpgrades() { public BaseItemHandler getUpgrades() {

View File

@@ -35,7 +35,7 @@ public abstract class RSWorldSavedData extends WorldSavedData {
compoundnbt.putInt("DataVersion", SharedConstants.getVersion().getWorldVersion()); compoundnbt.putInt("DataVersion", SharedConstants.getVersion().getWorldVersion());
try { try {
CompressedStreamTools.func_244264_a(compoundnbt, tempFile); CompressedStreamTools.writeCompressed(compoundnbt, tempFile);
if (fileIn.exists()) { if (fileIn.exists()) {
if (!fileIn.delete()) { if (!fileIn.delete()) {
LOGGER.error("Failed To delete " + fileIn.getName()); LOGGER.error("Failed To delete " + fileIn.getName());

View File

@@ -70,7 +70,7 @@ public class ListNetworkCommand implements Command<CommandSource> {
listItem.network.getPosition().getZ() listItem.network.getPosition().getZ()
) )
.appendString(" [") .appendString(" [")
.append(new TranslationTextComponent( .appendSibling(new TranslationTextComponent(
"commands.refinedstorage.network.list.tick_times", "commands.refinedstorage.network.list.tick_times",
new StringTextComponent(TIME_FORMATTER.format(listItem.tickTime)).setStyle(Styles.YELLOW), new StringTextComponent(TIME_FORMATTER.format(listItem.tickTime)).setStyle(Styles.YELLOW),
new StringTextComponent(TIME_FORMATTER.format(listItem.tps)).setStyle(Styles.YELLOW) new StringTextComponent(TIME_FORMATTER.format(listItem.tps)).setStyle(Styles.YELLOW)

View File

@@ -26,11 +26,11 @@ public class ListAutocraftingCommand extends NetworkCommand {
public static void addInfo(CommandContext<CommandSource> context, ICraftingTask task) { public static void addInfo(CommandContext<CommandSource> context, ICraftingTask task) {
context.getSource().sendFeedback( context.getSource().sendFeedback(
new StringTextComponent(getAmount(task.getRequested()) + "x ") new StringTextComponent(getAmount(task.getRequested()) + "x ")
.append(getName(task.getRequested()).deepCopy().setStyle(Styles.YELLOW)) .appendSibling(getName(task.getRequested()).deepCopy().setStyle(Styles.YELLOW))
.appendString(" ") .appendString(" ")
.appendString("(" + task.getCompletionPercentage() + "%)") .appendString("(" + task.getCompletionPercentage() + "%)")
.appendString(" ") .appendString(" ")
.append(new StringTextComponent("[" + task.getId().toString() + "]").setStyle(Styles.GRAY)), .appendSibling(new StringTextComponent("[" + task.getId().toString() + "]").setStyle(Styles.GRAY)),
false false
); );
} }

View File

@@ -32,14 +32,14 @@ public class PatternDumpCommand implements Command<CommandSource> {
ICraftingPattern pattern = PatternItem.fromCache(context.getSource().getWorld(), stack); ICraftingPattern pattern = PatternItem.fromCache(context.getSource().getWorld(), stack);
context.getSource().sendFeedback(new StringTextComponent("Crafting task factory ID: ").setStyle(Styles.YELLOW).append(new StringTextComponent(pattern.getCraftingTaskFactoryId().toString()).setStyle(Styles.WHITE)), false); context.getSource().sendFeedback(new StringTextComponent("Crafting task factory ID: ").setStyle(Styles.YELLOW).appendSibling(new StringTextComponent(pattern.getCraftingTaskFactoryId().toString()).setStyle(Styles.WHITE)), false);
if (!pattern.isValid()) { if (!pattern.isValid()) {
context.getSource().sendErrorMessage(new StringTextComponent("Pattern is invalid! Reason: ").append(pattern.getErrorMessage())); context.getSource().sendErrorMessage(new StringTextComponent("Pattern is invalid! Reason: ").appendSibling(pattern.getErrorMessage()));
} else { } else {
context.getSource().sendFeedback(new StringTextComponent("Processing: ").setStyle(Styles.YELLOW).append(new StringTextComponent(String.valueOf(processing)).setStyle(Styles.WHITE)), false); context.getSource().sendFeedback(new StringTextComponent("Processing: ").setStyle(Styles.YELLOW).appendSibling(new StringTextComponent(String.valueOf(processing)).setStyle(Styles.WHITE)), false);
context.getSource().sendFeedback(new StringTextComponent("Exact: ").setStyle(Styles.YELLOW).append(new StringTextComponent(String.valueOf(exact)).setStyle(Styles.WHITE)), false); context.getSource().sendFeedback(new StringTextComponent("Exact: ").setStyle(Styles.YELLOW).appendSibling(new StringTextComponent(String.valueOf(exact)).setStyle(Styles.WHITE)), false);
context.getSource().sendFeedback(new StringTextComponent("Has allowed tag list: ").setStyle(Styles.YELLOW).append(new StringTextComponent(String.valueOf(allowedTagList != null)).setStyle(Styles.WHITE)), false); context.getSource().sendFeedback(new StringTextComponent("Has allowed tag list: ").setStyle(Styles.YELLOW).appendSibling(new StringTextComponent(String.valueOf(allowedTagList != null)).setStyle(Styles.WHITE)), false);
if (pattern.isProcessing()) { if (pattern.isProcessing()) {
for (int i = 0; i < pattern.getInputs().size(); ++i) { for (int i = 0; i < pattern.getInputs().size(); ++i) {
@@ -47,7 +47,7 @@ public class PatternDumpCommand implements Command<CommandSource> {
context.getSource().sendFeedback(new StringTextComponent("Item inputs in slot " + i + ":").setStyle(Styles.YELLOW), false); context.getSource().sendFeedback(new StringTextComponent("Item inputs in slot " + i + ":").setStyle(Styles.YELLOW), false);
for (int j = 0; j < pattern.getInputs().get(i).size(); ++j) { for (int j = 0; j < pattern.getInputs().get(i).size(); ++j) {
context.getSource().sendFeedback(new StringTextComponent("- Possibility #" + j + ": " + pattern.getInputs().get(i).get(j).getCount() + "x ").append(pattern.getInputs().get(i).get(j).getDisplayName()), false); context.getSource().sendFeedback(new StringTextComponent("- Possibility #" + j + ": " + pattern.getInputs().get(i).get(j).getCount() + "x ").appendSibling(pattern.getInputs().get(i).get(j).getDisplayName()), false);
} }
} }
@@ -63,7 +63,7 @@ public class PatternDumpCommand implements Command<CommandSource> {
context.getSource().sendFeedback(new StringTextComponent("Fluid inputs in slot " + i + ":").setStyle(Styles.YELLOW), false); context.getSource().sendFeedback(new StringTextComponent("Fluid inputs in slot " + i + ":").setStyle(Styles.YELLOW), false);
for (int j = 0; j < pattern.getFluidInputs().get(i).size(); ++j) { for (int j = 0; j < pattern.getFluidInputs().get(i).size(); ++j) {
context.getSource().sendFeedback(new StringTextComponent("- Possibility #" + j + ": " + pattern.getFluidInputs().get(i).get(j).getAmount() + " mB ").append(pattern.getFluidInputs().get(i).get(j).getDisplayName()), false); context.getSource().sendFeedback(new StringTextComponent("- Possibility #" + j + ": " + pattern.getFluidInputs().get(i).get(j).getAmount() + " mB ").appendSibling(pattern.getFluidInputs().get(i).get(j).getDisplayName()), false);
} }
} }
@@ -76,12 +76,12 @@ public class PatternDumpCommand implements Command<CommandSource> {
context.getSource().sendFeedback(new StringTextComponent("Outputs").setStyle(Styles.YELLOW), false); context.getSource().sendFeedback(new StringTextComponent("Outputs").setStyle(Styles.YELLOW), false);
for (ItemStack output : pattern.getOutputs()) { for (ItemStack output : pattern.getOutputs()) {
context.getSource().sendFeedback(new StringTextComponent("- " + output.getCount() + "x ").append(output.getDisplayName()), false); context.getSource().sendFeedback(new StringTextComponent("- " + output.getCount() + "x ").appendSibling(output.getDisplayName()), false);
} }
context.getSource().sendFeedback(new StringTextComponent("Fluid outputs").setStyle(Styles.YELLOW), false); context.getSource().sendFeedback(new StringTextComponent("Fluid outputs").setStyle(Styles.YELLOW), false);
for (FluidStack output : pattern.getFluidOutputs()) { for (FluidStack output : pattern.getFluidOutputs()) {
context.getSource().sendFeedback(new StringTextComponent("- " + output.getAmount() + " mB ").append(output.getDisplayName()), false); context.getSource().sendFeedback(new StringTextComponent("- " + output.getAmount() + " mB ").appendSibling(output.getDisplayName()), false);
} }
} else { } else {
for (int i = 0; i < pattern.getInputs().size(); ++i) { for (int i = 0; i < pattern.getInputs().size(); ++i) {
@@ -89,14 +89,14 @@ public class PatternDumpCommand implements Command<CommandSource> {
context.getSource().sendFeedback(new StringTextComponent("Inputs in slot " + i + ":").setStyle(Styles.YELLOW), false); context.getSource().sendFeedback(new StringTextComponent("Inputs in slot " + i + ":").setStyle(Styles.YELLOW), false);
for (int j = 0; j < pattern.getInputs().get(i).size(); ++j) { for (int j = 0; j < pattern.getInputs().get(i).size(); ++j) {
context.getSource().sendFeedback(new StringTextComponent("- Possibility #" + j + ": " + pattern.getInputs().get(i).get(j).getCount() + "x ").append(pattern.getInputs().get(i).get(j).getDisplayName()), false); context.getSource().sendFeedback(new StringTextComponent("- Possibility #" + j + ": " + pattern.getInputs().get(i).get(j).getCount() + "x ").appendSibling(pattern.getInputs().get(i).get(j).getDisplayName()), false);
} }
} }
} }
context.getSource().sendFeedback(new StringTextComponent("Outputs").setStyle(Styles.YELLOW), false); context.getSource().sendFeedback(new StringTextComponent("Outputs").setStyle(Styles.YELLOW), false);
for (ItemStack output : pattern.getOutputs()) { for (ItemStack output : pattern.getOutputs()) {
context.getSource().sendFeedback(new StringTextComponent("- " + output.getCount() + "x ").append(output.getDisplayName()), false); context.getSource().sendFeedback(new StringTextComponent("- " + output.getCount() + "x ").appendSibling(output.getDisplayName()), false);
} }
boolean anyByproducts = false; boolean anyByproducts = false;
@@ -109,7 +109,7 @@ public class PatternDumpCommand implements Command<CommandSource> {
anyByproducts = true; anyByproducts = true;
} }
context.getSource().sendFeedback(new StringTextComponent("- " + byproduct.getCount() + "x ").append(byproduct.getDisplayName()), false); context.getSource().sendFeedback(new StringTextComponent("- " + byproduct.getCount() + "x ").appendSibling(byproduct.getDisplayName()), false);
} }
} }
} }

View File

@@ -41,7 +41,7 @@ public class NetworkCardItem extends Item {
tag.putInt(NBT_RECEIVER_X, ctx.getPos().getX()); tag.putInt(NBT_RECEIVER_X, ctx.getPos().getX());
tag.putInt(NBT_RECEIVER_Y, ctx.getPos().getY()); tag.putInt(NBT_RECEIVER_Y, ctx.getPos().getY());
tag.putInt(NBT_RECEIVER_Z, ctx.getPos().getZ()); tag.putInt(NBT_RECEIVER_Z, ctx.getPos().getZ());
tag.putString(NBT_DIMENSION, ctx.getWorld().func_234923_W_().func_240901_a_().toString()); tag.putString(NBT_DIMENSION, ctx.getWorld().getDimensionKey().getLocation().toString());
ctx.getPlayer().getHeldItem(ctx.getHand()).setTag(tag); ctx.getPlayer().getHeldItem(ctx.getHand()).setTag(tag);
@@ -64,7 +64,7 @@ public class NetworkCardItem extends Item {
pos.getX(), pos.getX(),
pos.getY(), pos.getY(),
pos.getZ(), pos.getZ(),
type.func_240901_a_().toString() type.getLocation().toString()
).setStyle(Styles.GRAY)); ).setStyle(Styles.GRAY));
} }
} }
@@ -93,7 +93,7 @@ public class NetworkCardItem extends Item {
return null; return null;
} }
return RegistryKey.func_240903_a_(Registry.WORLD_KEY, name); return RegistryKey.getOrCreateKey(Registry.WORLD_KEY, name);
} }
return null; return null;

View File

@@ -97,7 +97,7 @@ public abstract class NetworkItem extends EnergyItem implements INetworkItemProv
tag.putInt(NBT_NODE_X, network.getPosition().getX()); tag.putInt(NBT_NODE_X, network.getPosition().getX());
tag.putInt(NBT_NODE_Y, network.getPosition().getY()); tag.putInt(NBT_NODE_Y, network.getPosition().getY());
tag.putInt(NBT_NODE_Z, network.getPosition().getZ()); tag.putInt(NBT_NODE_Z, network.getPosition().getZ());
tag.putString(NBT_DIMENSION, ctx.getWorld().func_234923_W_().func_240901_a_().toString()); tag.putString(NBT_DIMENSION, ctx.getWorld().getDimensionKey().getLocation().toString());
stack.setTag(tag); stack.setTag(tag);
@@ -115,7 +115,7 @@ public abstract class NetworkItem extends EnergyItem implements INetworkItemProv
return null; return null;
} }
return RegistryKey.func_240903_a_(Registry.WORLD_KEY, name); return RegistryKey.getOrCreateKey(Registry.WORLD_KEY, name);
} }
return null; return null;

View File

@@ -83,7 +83,7 @@ public class SecurityCardItem extends Item {
for (Permission permission : Permission.values()) { for (Permission permission : Permission.values()) {
if (hasPermission(stack, permission)) { if (hasPermission(stack, permission)) {
tooltip.add(new StringTextComponent("- ").append(new TranslationTextComponent("gui.refinedstorage.security_manager.permission." + permission.getId())).setStyle(Styles.GRAY)); tooltip.add(new StringTextComponent("- ").appendSibling(new TranslationTextComponent("gui.refinedstorage.security_manager.permission." + permission.getId())).setStyle(Styles.GRAY));
} }
} }
} }

View File

@@ -92,7 +92,7 @@ public class UpgradeItem extends Item {
tooltip.add( tooltip.add(
new TranslationTextComponent("enchantment.minecraft.fortune") new TranslationTextComponent("enchantment.minecraft.fortune")
.appendString(" ") .appendString(" ")
.append(new TranslationTextComponent("enchantment.level." + type.getFortuneLevel())) .appendSibling(new TranslationTextComponent("enchantment.level." + type.getFortuneLevel()))
.setStyle(Styles.GRAY) .setStyle(Styles.GRAY)
); );
} }

View File

@@ -14,7 +14,9 @@ public class ColoredBlockItem extends BaseBlockItem {
super(block, builder); super(block, builder);
if (color != ColorMap.DEFAULT_COLOR) { if (color != ColorMap.DEFAULT_COLOR) {
this.displayName = new TranslationTextComponent("color.minecraft." + color.getTranslationKey()).appendString(" ").append(displayName); this.displayName = new TranslationTextComponent("color.minecraft." + color.getTranslationKey())
.appendString(" ")
.appendSibling(displayName);
} else { } else {
this.displayName = displayName; this.displayName = displayName;
} }

View File

@@ -17,7 +17,9 @@ public class ControllerBlockItem extends EnergyBlockItem {
super(block, new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1), block.getType() == NetworkType.CREATIVE, () -> RS.SERVER_CONFIG.getController().getCapacity()); super(block, new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1), block.getType() == NetworkType.CREATIVE, () -> RS.SERVER_CONFIG.getController().getCapacity());
if (color != ColorMap.DEFAULT_COLOR) { if (color != ColorMap.DEFAULT_COLOR) {
this.displayName = new TranslationTextComponent("color.minecraft." + color.getTranslationKey()).appendString(" ").append(displayName); this.displayName = new TranslationTextComponent("color.minecraft." + color.getTranslationKey())
.appendString(" ")
.appendSibling(displayName);
} else { } else {
this.displayName = displayName; this.displayName = displayName;
} }

View File

@@ -33,7 +33,7 @@ public class ControllerLootFunction extends LootFunction {
} }
@Override @Override
public LootFunctionType func_230425_b_() { public LootFunctionType getFunctionType() {
return RSLootFunctions.getController(); return RSLootFunctions.getController();
} }

View File

@@ -35,7 +35,7 @@ public class CrafterLootFunction extends LootFunction {
} }
@Override @Override
public LootFunctionType func_230425_b_() { public LootFunctionType getFunctionType() {
return RSLootFunctions.getCrafter(); return RSLootFunctions.getCrafter();
} }

View File

@@ -29,7 +29,7 @@ public class PortableGridBlockLootFunction extends LootFunction {
} }
@Override @Override
public LootFunctionType func_230425_b_() { public LootFunctionType getFunctionType() {
return RSLootFunctions.getPortableGrid(); return RSLootFunctions.getPortableGrid();
} }

View File

@@ -50,7 +50,7 @@ public class StorageBlockLootFunction extends LootFunction {
} }
@Override @Override
public LootFunctionType func_230425_b_() { public LootFunctionType getFunctionType() {
return RSLootFunctions.getStorageBlock(); return RSLootFunctions.getStorageBlock();
} }

View File

@@ -5,12 +5,12 @@ import net.minecraft.util.text.Style;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
public final class Styles { public final class Styles {
public static final Style WHITE = Style.EMPTY.setColor(Color.func_240744_a_(TextFormatting.WHITE)); public static final Style WHITE = Style.EMPTY.setColor(Color.fromTextFormatting(TextFormatting.WHITE));
public static final Style GRAY = Style.EMPTY.setColor(Color.func_240744_a_(TextFormatting.GRAY)); public static final Style GRAY = Style.EMPTY.setColor(Color.fromTextFormatting(TextFormatting.GRAY));
public static final Style YELLOW = Style.EMPTY.setColor(Color.func_240744_a_(TextFormatting.YELLOW)); public static final Style YELLOW = Style.EMPTY.setColor(Color.fromTextFormatting(TextFormatting.YELLOW));
public static final Style RED = Style.EMPTY.setColor(Color.func_240744_a_(TextFormatting.RED)); public static final Style RED = Style.EMPTY.setColor(Color.fromTextFormatting(TextFormatting.RED));
public static final Style BLUE = Style.EMPTY.setColor(Color.func_240744_a_(TextFormatting.BLUE)); public static final Style BLUE = Style.EMPTY.setColor(Color.fromTextFormatting(TextFormatting.BLUE));
public static final Style AQUA = Style.EMPTY.setColor(Color.func_240744_a_(TextFormatting.AQUA)); public static final Style AQUA = Style.EMPTY.setColor(Color.fromTextFormatting(TextFormatting.AQUA));
private Styles() { private Styles() {
} }

View File

@@ -37,8 +37,8 @@ public class DelegateBakedModel implements IBakedModel {
} }
@Override @Override
public boolean func_230044_c_() { public boolean isSideLit() {
return base.func_230044_c_(); return base.isSideLit();
} }
@Override @Override

View File

@@ -57,7 +57,7 @@ public class FullbrightBakedModel extends DelegateBakedModel {
for (int i = 0; i < quads.size(); ++i) { for (int i = 0; i < quads.size(); ++i) {
BakedQuad quad = quads.get(i); BakedQuad quad = quads.get(i);
if (textures.contains(quad.func_187508_a().getName())) { if (textures.contains(quad.getSprite().getName())) {
quads.set(i, transformQuad(quad)); quads.set(i, transformQuad(quad));
} }
} }
@@ -79,8 +79,8 @@ public class FullbrightBakedModel extends DelegateBakedModel {
vertexData, vertexData,
quad.getTintIndex(), quad.getTintIndex(),
quad.getFace(), quad.getFace(),
quad.func_187508_a(), quad.getSprite(),
quad.func_239287_f_() // shouldApplyDiffuseLighting quad.applyDiffuseLighting()
); );
} }

View File

@@ -25,7 +25,7 @@ public class PatternBakedModel extends DelegateBakedModel {
return new ItemOverrideList() { return new ItemOverrideList() {
@Nullable @Nullable
@Override @Override
public IBakedModel func_239290_a_(IBakedModel model, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity) { public IBakedModel getOverrideModel(IBakedModel model, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity) {
if (entity != null) { if (entity != null) {
ICraftingPattern pattern = PatternItem.fromCache(entity.world, stack); ICraftingPattern pattern = PatternItem.fromCache(entity.world, stack);
@@ -36,7 +36,7 @@ public class PatternBakedModel extends DelegateBakedModel {
} }
} }
return super.func_239290_a_(model, stack, world, entity); return super.getOverrideModel(model, stack, world, entity);
} }
@Override @Override

View File

@@ -110,7 +110,7 @@ public class PortableGridBakedModel extends DelegateBakedModel {
private class CustomItemOverrideList extends ItemOverrideList { private class CustomItemOverrideList extends ItemOverrideList {
@Nullable @Nullable
@Override @Override
public IBakedModel func_239290_a_(IBakedModel model, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity) { public IBakedModel getOverrideModel(IBakedModel model, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity) {
PortableGrid portableGrid = new PortableGrid(null, stack, -1); PortableGrid portableGrid = new PortableGrid(null, stack, -1);
if (portableGrid.isGridActive()) { if (portableGrid.isGridActive()) {

View File

@@ -59,8 +59,8 @@ public class PortableGridItemBakedModel implements IBakedModel {
} }
@Override @Override
public boolean func_230044_c_() { public boolean isSideLit() {
return base.func_230044_c_(); return base.isSideLit();
} }
@Override @Override

View File

@@ -34,7 +34,7 @@ public final class QuadTransformer {
} }
for (BakedQuad quad : model.getQuads(state, side, rand, EmptyModelData.INSTANCE)) { for (BakedQuad quad : model.getQuads(state, side, rand, EmptyModelData.INSTANCE)) {
BakedQuadBuilder builder = new BakedQuadBuilder(quad.func_187508_a()); BakedQuadBuilder builder = new BakedQuadBuilder(quad.getSprite());
TRSRTransformer transformer = new TRSRTransformer(builder, transformation.blockCenterToCorner()); TRSRTransformer transformer = new TRSRTransformer(builder, transformation.blockCenterToCorner());
quad.pipe(transformer); quad.pipe(transformer);

View File

@@ -159,7 +159,7 @@ public abstract class AmountSpecifyingScreen<T extends Container> extends BaseSc
blit(matrixStack, x, y, 0, 0, xSize, ySize); blit(matrixStack, x, y, 0, 0, xSize, ySize);
amountField.renderButton(matrixStack, 0, 0, 0); amountField.renderWidget(matrixStack, 0, 0, 0);
} }
@Override @Override

View File

@@ -126,7 +126,7 @@ public abstract class BaseScreen<T extends Container> extends ContainerScreen<T>
super.render(matrixStack, mouseX, mouseY, partialTicks); super.render(matrixStack, mouseX, mouseY, partialTicks);
func_230459_a_(matrixStack, mouseX, mouseY); renderHoveredTooltip(matrixStack, mouseX, mouseY);
} }
@Override @Override

View File

@@ -71,7 +71,7 @@ public class SecurityManagerScreen extends BaseScreen<SecurityManagerContainer>
CheckboxWidget permission = permissions[i]; CheckboxWidget permission = permissions[i];
// getWidth_CLASH => getHeight // getWidth_CLASH => getHeight
if (RenderUtils.inBounds(permission.x - guiLeft, permission.y - guiTop, permission.getWidth(), permission.getWidth_CLASH(), mouseX, mouseY)) { if (RenderUtils.inBounds(permission.x - guiLeft, permission.y - guiTop, permission.getWidth(), permission.getHeight(), mouseX, mouseY)) {
renderTooltip(matrixStack, mouseX, mouseY, I18n.format("gui.refinedstorage.security_manager.permission." + i + ".tooltip")); renderTooltip(matrixStack, mouseX, mouseY, I18n.format("gui.refinedstorage.security_manager.permission." + i + ".tooltip"));
} }
} }

View File

@@ -47,7 +47,7 @@ public class CheckboxWidget extends CheckboxButton {
} }
@Override @Override
public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) { public void renderWidget(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
Minecraft minecraft = Minecraft.getInstance(); Minecraft minecraft = Minecraft.getInstance();
minecraft.getTextureManager().bindTexture(TEXTURE); minecraft.getTextureManager().bindTexture(TEXTURE);
RenderSystem.enableDepthTest(); RenderSystem.enableDepthTest();

View File

@@ -173,10 +173,10 @@ public class SearchWidget extends TextFieldWidget {
} }
@Override @Override
public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) { public void renderWidget(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
if (canSyncFromJEINow() && RSJeiPlugin.getRuntime().getIngredientListOverlay().hasKeyboardFocus()) { if (canSyncFromJEINow() && RSJeiPlugin.getRuntime().getIngredientListOverlay().hasKeyboardFocus()) {
setTextFromJEI(); setTextFromJEI();
} }
super.renderButton(matrixStack, mouseX, mouseY, partialTicks); super.renderWidget(matrixStack, mouseX, mouseY, partialTicks);
} }
} }

View File

@@ -25,7 +25,7 @@ public abstract class SideButton extends Button {
} }
@Override @Override
public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) { public void renderWidget(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.enableAlphaTest(); RenderSystem.enableAlphaTest();

View File

@@ -253,19 +253,19 @@ public class ClientSetup {
e.getMinecraftSupplier().get().getItemColors().register(new PatternItemColor(), RSItems.PATTERN.get()); e.getMinecraftSupplier().get().getItemColors().register(new PatternItemColor(), RSItems.PATTERN.get());
ItemModelsProperties.func_239418_a_(RSItems.SECURITY_CARD.get(), new ResourceLocation("active"), new SecurityCardItemPropertyGetter()); ItemModelsProperties.registerProperty(RSItems.SECURITY_CARD.get(), new ResourceLocation("active"), new SecurityCardItemPropertyGetter());
RSItems.CONTROLLER.values().forEach(controller -> ItemModelsProperties.func_239418_a_(controller.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter())); RSItems.CONTROLLER.values().forEach(controller -> ItemModelsProperties.registerProperty(controller.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter()));
RSItems.CREATIVE_CONTROLLER.values().forEach(controller -> ItemModelsProperties.func_239418_a_(controller.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter())); RSItems.CREATIVE_CONTROLLER.values().forEach(controller -> ItemModelsProperties.registerProperty(controller.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter()));
ItemModelsProperties.func_239418_a_(RSItems.WIRELESS_CRAFTING_MONITOR.get(), CONNECTED, new NetworkItemPropertyGetter()); ItemModelsProperties.registerProperty(RSItems.WIRELESS_CRAFTING_MONITOR.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_WIRELESS_CRAFTING_MONITOR.get(), CONNECTED, new NetworkItemPropertyGetter()); ItemModelsProperties.registerProperty(RSItems.CREATIVE_WIRELESS_CRAFTING_MONITOR.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.func_239418_a_(RSItems.WIRELESS_GRID.get(), CONNECTED, new NetworkItemPropertyGetter()); ItemModelsProperties.registerProperty(RSItems.WIRELESS_GRID.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_WIRELESS_GRID.get(), CONNECTED, new NetworkItemPropertyGetter()); ItemModelsProperties.registerProperty(RSItems.CREATIVE_WIRELESS_GRID.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.func_239418_a_(RSItems.WIRELESS_FLUID_GRID.get(), CONNECTED, new NetworkItemPropertyGetter()); ItemModelsProperties.registerProperty(RSItems.WIRELESS_FLUID_GRID.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_WIRELESS_FLUID_GRID.get(), CONNECTED, new NetworkItemPropertyGetter()); ItemModelsProperties.registerProperty(RSItems.CREATIVE_WIRELESS_FLUID_GRID.get(), CONNECTED, new NetworkItemPropertyGetter());
} }
@SubscribeEvent @SubscribeEvent

View File

@@ -22,7 +22,7 @@ public class NetworkTransmitterTile extends NetworkNodeTile<NetworkTransmitterNe
public static final TileDataParameter<Integer, NetworkTransmitterTile> DISTANCE = new TileDataParameter<>(DataSerializers.VARINT, 0, t -> t.getNode().getDistance()); public static final TileDataParameter<Integer, NetworkTransmitterTile> DISTANCE = new TileDataParameter<>(DataSerializers.VARINT, 0, t -> t.getNode().getDistance());
public static final TileDataParameter<Optional<ResourceLocation>, NetworkTransmitterTile> RECEIVER_DIMENSION = new TileDataParameter<>(RSSerializers.OPTIONAL_RESOURCE_LOCATION_SERIALIZER, Optional.empty(), t -> { public static final TileDataParameter<Optional<ResourceLocation>, NetworkTransmitterTile> RECEIVER_DIMENSION = new TileDataParameter<>(RSSerializers.OPTIONAL_RESOURCE_LOCATION_SERIALIZER, Optional.empty(), t -> {
if (t.getNode().getReceiverDimension() != null) { if (t.getNode().getReceiverDimension() != null) {
return Optional.of(t.getNode().getReceiverDimension().func_240901_a_()); return Optional.of(t.getNode().getReceiverDimension().getLocation());
} }
return Optional.empty(); return Optional.empty();

View File

@@ -62,7 +62,7 @@ public final class RenderUtils {
} }
if (displayAmount) { if (displayAmount) {
data = new StringTextComponent(amount + "x ").append(data); data = new StringTextComponent(amount + "x ").appendSibling(data);
} }
tooltip.add(data.setStyle(Styles.GRAY)); tooltip.add(data.setStyle(Styles.GRAY));
@@ -90,7 +90,7 @@ public final class RenderUtils {
} }
if (displayMb) { if (displayMb) {
data = new StringTextComponent(API.instance().getQuantityFormatter().formatInBucketForm(amount) + " ").append(data); data = new StringTextComponent(API.instance().getQuantityFormatter().formatInBucketForm(amount) + " ").appendSibling(data);
} }
tooltip.add(data.setStyle(Styles.GRAY)); tooltip.add(data.setStyle(Styles.GRAY));
@@ -165,7 +165,7 @@ public final class RenderUtils {
List<ITextProperties> wrappedTextLines = new ArrayList<>(); List<ITextProperties> wrappedTextLines = new ArrayList<>();
for (int i = 0; i < textLines.size(); i++) { for (int i = 0; i < textLines.size(); i++) {
ITextProperties textLine = textLines.get(i); ITextProperties textLine = textLines.get(i);
List<ITextProperties> wrappedLine = font.func_238420_b_().func_238362_b_(textLine, tooltipTextWidth, Style.EMPTY); List<ITextProperties> wrappedLine = font.getCharacterManager().func_238362_b_(textLine, tooltipTextWidth, Style.EMPTY);
if (i == 0) if (i == 0)
titleLinesCount = wrappedLine.size(); titleLinesCount = wrappedLine.size();
@@ -238,7 +238,7 @@ public final class RenderUtils {
for (int lineNumber = 0; lineNumber < textLines.size(); ++lineNumber) { for (int lineNumber = 0; lineNumber < textLines.size(); ++lineNumber) {
ITextProperties line = textLines.get(lineNumber); ITextProperties line = textLines.get(lineNumber);
if (line != null) if (line != null)
font.func_238416_a_(LanguageMap.getInstance().func_241870_a(line), (float) tooltipX, (float) tooltipY, -1, true, textLocation, renderType, false, 0, 15728880); font.drawEntityText(LanguageMap.getInstance().func_241870_a(line), (float) tooltipX, (float) tooltipY, -1, true, textLocation, renderType, false, 0, 15728880);
if (lineNumber + 1 == titleLinesCount) if (lineNumber + 1 == titleLinesCount)
tooltipY += 2; tooltipY += 2;
@@ -259,7 +259,7 @@ public final class RenderUtils {
RenderSystem.enableAlphaTest(); RenderSystem.enableAlphaTest();
// FontRenderer#drawStringWithShadow - call to func_228078_a_ (private) // FontRenderer#drawStringWithShadow - call to renderString (private)
MatrixStack smallTextStack = new MatrixStack(); MatrixStack smallTextStack = new MatrixStack();
smallTextStack.translate(0.0D, 0.0D, zLevel); smallTextStack.translate(0.0D, 0.0D, zLevel);
smallTextStack.scale(textScale, textScale, 1); smallTextStack.scale(textScale, textScale, 1);

View File

@@ -1,5 +1,5 @@
modLoader = "javafml" modLoader = "javafml"
loaderVersion = "[34,)" loaderVersion = "[36,)"
issueTrackerURL = "https://github.com/refinedmods/refinedstorage" issueTrackerURL = "https://github.com/refinedmods/refinedstorage"
license="MIT" license="MIT"
[[mods]] [[mods]]
@@ -13,14 +13,3 @@ authors = "Refined Mods"
description = ''' description = '''
An elegant solution to your hoarding problem An elegant solution to your hoarding problem
''' '''
[[dependencies.refinedstorage]] #optional
# the modid of the dependency
modId = "forge" #mandatory
# Does this dependency have to exist - if not, ordering below must be specified
mandatory = true #mandatory
# The version range of the dependency
versionRange = "[34.1.0,)" #mandatory
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
ordering = "NONE"
# Side this dependency is applied on - BOTH, CLIENT or SERVER
side = "BOTH"