Skip to content

Commit

Permalink
Update to 1.20 [publish]
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrbysco committed Jun 13, 2023
1 parent 5fdaa74 commit 2651e43
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 22 deletions.
15 changes: 11 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
plugins {
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '5.1.+'
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'com.modrinth.minotaur' version "2.+"
}

version = "${version}"
group = "com.nopoisonregen.main" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "NMPR-${mc_version}"
base {
archivesName = "NMPR-${mc_version}"
}

// Mojang ships Java 16 to end users in 1.17+ instead of Java 8 in 1.16 or lower, so your mod should target Java 16.
java.toolchain.languageVersion = JavaLanguageVersion.of(17)

println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
minecraft {
mappings channel: "${mcp_channel}", version: "${mcp_mappings}"
mappings channel: "${mapping_channel}", version: "${mapping_version}"

copyIdeResources = true

// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.

// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Initial update to 1.20
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

# Base info
mc_version=1.19.4
forge_version=45.1.0
mcp_channel=official
mcp_mappings=1.19.4
mc_version=1.20
forge_version=46.0.14
mapping_channel=official
mapping_version=1.20

#Publishing
mod_name=NMPR
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
9 changes: 8 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven { url = 'https://maven.minecraftforge.net/' }
maven {
name = 'MinecraftForge'
url = 'https://maven.minecraftforge.net/'
}
}
}

plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0'
}
4 changes: 2 additions & 2 deletions src/main/java/com/nopoisonregen/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void isEffectApplicable(MobEffectEvent.Applicable event) {
MobEffectInstance effectInstance = event.getEffectInstance();
MobEffect applicableEffect = effectInstance.getEffect();
LivingEntity livingEntity = event.getEntity();
Level level = livingEntity.level;
Level level = livingEntity.level();
if (!level.isClientSide && !cancelableEffectMap.isEmpty()) {
for (Map.Entry<MobEffect, MobEffect> entry : cancelableEffectMap.entrySet()) {
MobEffect effect1 = entry.getKey();
Expand Down Expand Up @@ -77,7 +77,7 @@ public void isEffectApplicable(MobEffectEvent.Applicable event) {
@SubscribeEvent
public void onLivingTick(LivingEvent.LivingTickEvent event) {
LivingEntity livingEntity = event.getEntity();
Level level = livingEntity.level;
Level level = livingEntity.level();
if (!level.isClientSide && level.getGameTime() % 20 == 0 && !cancelableEffectMap.isEmpty()) {
for (Map.Entry<MobEffect, MobEffect> entry : cancelableEffectMap.entrySet()) {
MobEffect effect1 = entry.getKey();
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
modLoader="javafml"
loaderVersion="[45,)"
loaderVersion="[46,)"
license="GNU LGPL V3.0"

[[mods]]
Expand All @@ -14,6 +14,6 @@ This mod makes it so that the potion effects poison and regenration cancel each
[[dependencies.nopoisonregen]]
modId="minecraft"
mandatory=true
versionRange="[1.19.4,1.20)"
versionRange="[1.20,1.21)"
ordering="NONE"
side="BOTH"
8 changes: 4 additions & 4 deletions src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"pack": {
"description": "NPRM resources",
"pack_format": 13,
"forge:client_resources_pack_format": 13,
"forge:server_data_pack_format": 12
"description": {
"text": "NPRM resources"
},
"pack_format": 15
}
}

0 comments on commit 2651e43

Please sign in to comment.