Skip to content

Commit

Permalink
Update Forge
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulvdberge committed Jun 13, 2021
1 parent 8846101 commit c2adba6
Show file tree
Hide file tree
Showing 41 changed files with 150 additions and 146 deletions.
33 changes: 13 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
}
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 "org.sonarqube" version "3.0"
id 'info.solidsoft.pitest' version '1.5.1'
}

Expand All @@ -19,15 +17,10 @@ repositories {
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
url "https://minecraft.curseforge.com/api/maven/"
}
}

sonarqube {
properties {
property "sonar.projectKey", "refinedmods_refinedstorage"
property "sonar.organization", "refinedmods"
property "sonar.host.url", "https://sonarcloud.io"
url "https://www.cursemaven.com"
content {
includeGroup "curse.maven"
}
}
}

Expand All @@ -48,10 +41,10 @@ if (env.BUILD_NUMBER) {
group = 'com.refinedmods'
archivesBaseName = 'refinedstorage'

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
java.toolchain.languageVersion = JavaLanguageVersion.of(8)

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')

runs {
Expand Down Expand Up @@ -116,14 +109,14 @@ processResources {
}

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")
runtimeOnly fg.deobf("mezz.jei:jei-1.16.3:7.3.2.36")
compileOnly fg.deobf("mezz.jei:jei-1.16.5:7.7.0.106:api")
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')
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.6.2')
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-bin.zip
53 changes: 33 additions & 20 deletions gradlew
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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" "$@"
43 changes: 24 additions & 19 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
Expand All @@ -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%
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public boolean equals(Object 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;
}

Expand All @@ -36,7 +36,7 @@ public boolean equals(Object other) {
@Override
public int hashCode() {
int result = node.getPos().hashCode();
result = 31 * result + node.getWorld().func_234923_W_().hashCode();
result = 31 * result + node.getWorld().getDimensionKey().hashCode();
return result;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void open(PlayerEntity player, ItemStack stack, int slotId) {
if (node instanceof IWirelessTransmitter &&
network.canRun() &&
node.isActive() &&
((IWirelessTransmitter) node).getDimension() == player.getEntityWorld().func_234923_W_()) {
((IWirelessTransmitter) node).getDimension() == player.getEntityWorld().getDimensionKey()) {
IWirelessTransmitter transmitter = (IWirelessTransmitter) node;

Vector3d pos = player.getPositionVec();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public void read(CompoundNBT tag) {
StackUtils.readItems(upgrades, 1, tag);

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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public int getDistance() {
}

public boolean isSameDimension() {
return world.func_234923_W_() == receiverDimension;
return world.getDimensionKey() == receiverDimension;
}

private boolean canTransmit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public BlockPos getOrigin() {

@Override
public RegistryKey<World> getDimension() {
return world.func_234923_W_();
return world.getDimensionKey();
}

public BaseItemHandler getUpgrades() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void save(File fileIn) {
compoundnbt.putInt("DataVersion", SharedConstants.getVersion().getWorldVersion());

try {
CompressedStreamTools.func_244264_a(compoundnbt, tempFile);
CompressedStreamTools.writeCompressed(compoundnbt, tempFile);
if (fileIn.exists()) {
if (!fileIn.delete()) {
LOGGER.error("Failed To delete " + fileIn.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static void sendInfo(CommandContext<CommandSource> context, NetworkInList
listItem.network.getPosition().getZ()
)
.appendString(" [")
.append(new TranslationTextComponent(
.appendSibling(new TranslationTextComponent(
"commands.refinedstorage.network.list.tick_times",
new StringTextComponent(TIME_FORMATTER.format(listItem.tickTime)).setStyle(Styles.YELLOW),
new StringTextComponent(TIME_FORMATTER.format(listItem.tps)).setStyle(Styles.YELLOW)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ protected int run(CommandContext<CommandSource> context, INetwork network) {
public static void addInfo(CommandContext<CommandSource> context, ICraftingTask task) {
context.getSource().sendFeedback(
new StringTextComponent(getAmount(task.getRequested()) + "x ")
.append(getName(task.getRequested()).deepCopy().setStyle(Styles.YELLOW))
.appendSibling(getName(task.getRequested()).deepCopy().setStyle(Styles.YELLOW))
.appendString(" ")
.appendString("(" + task.getCompletionPercentage() + "%)")
.appendString(" ")
.append(new StringTextComponent("[" + task.getId().toString() + "]").setStyle(Styles.GRAY)),
.appendSibling(new StringTextComponent("[" + task.getId().toString() + "]").setStyle(Styles.GRAY)),
false
);
}
Expand Down
Loading

0 comments on commit c2adba6

Please sign in to comment.