Skip to content

Commit

Permalink
Merge pull request #110 from AnonymousHacker1279/1.20.2-dev
Browse files Browse the repository at this point in the history
Update master branch with 1.20.2-dev changes
  • Loading branch information
AnonymousHacker1279 authored Dec 3, 2023
2 parents 54b0f3b + f6dd073 commit 67f2871
Show file tree
Hide file tree
Showing 681 changed files with 16,199 additions and 4,810 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@ gradlew.bat
# Datagen cache
/src/generated/resources/.cache/

# Run configurations
/runs/

# Token property file, used for publishing
tokens.properties
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ community describe an interest in it (This excludes versions listed as **N/A - B

| MC Version | Immersive Weapons Latest Version |
|------------|--------------------------------------------------------------------------------------------------------------|
| 1.20.1 | [Latest](https://github.com/AnonymousHacker1279/ImmersiveWeapons/releases) |
| 1.20.2 | [Latest](https://github.com/AnonymousHacker1279/ImmersiveWeapons/releases) |
| 1.20.1 | [1.27.2](https://github.com/AnonymousHacker1279/ImmersiveWeapons/releases/tag/v1.27.2) |
| 1.19.4 | [1.23.2](https://github.com/AnonymousHacker1279/ImmersiveWeapons/releases/tag/v1.23.2) |
| 1.19.3 | [1.21.0](https://github.com/AnonymousHacker1279/ImmersiveWeapons/releases/tag/v1.21.0) |
| 1.19.2 | [N/A - Build From Source](https://github.com/AnonymousHacker1279/ImmersiveWeapons/tree/1.19.2-dev) |
Expand All @@ -85,10 +86,10 @@ v1.25.0, Immersive Weapons is now designed for the NeoForge modloader. The reaso
[project blog](https://neoforged.net/news/theproject/). It is expected that a majority of the existing Forge community
will migrate to NeoForge.

At the current moment, both versions seem to be mostly compatible with each other, however this is not guaranteed. If
you experience issues on Forge, please try using NeoForge first before reporting anything. This compatibility will
likely break in the next version of MC (currently 1.20.1). I will not maintain two separate versions of Immersive
Weapons for Forge and NeoForge.
On MC 1.20.1, NeoForge should be compatible with Forge mods, so IW v1.25.x-v1.27.x should also work on both. However, if
you experience issues on Forge, try NeoForge. Starting at MC 1.20.2 there is a hard break on compatibility between the
two modloaders. I will not (and cannot feasibly) maintain two separate versions of Immersive Weapons for Forge and
NeoForge.

## Contributing

Expand Down
13 changes: 8 additions & 5 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
This minor update includes three major bugfixes.
This major update ports to MC 1.20.2 and fixes a handful of bugs found during the porting process.

### Feature Changes / Additions

- Add Swift Sneak to the Skygazer max level configuration (at level 5)
- Reimplement Battlefield biome generation using BiomeSquisher
- Slight adjustments to trench generation settings
- Slight updates to Battlefield camp and town structures
- Add Lure and Aqua Affinity to the Skygazer max level configuration (at level 5 and 1 respectively)
- Make custom boats placeable by dispensers

### Bugfixes

- Fix molten tool recipes not using the proper template item
- Fix duplication bug in the Ammunition Table when shift-clicking
- Fix ammo being dropped when the Ammunition Table is broken, without consuming the materials
- Fix "Unknown recipe category" logspam regarding custom recipe types when joining worlds
- Fix iron panels not rotating properly with structures
98 changes: 34 additions & 64 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
plugins {
id 'java-library'
id 'maven-publish'
id 'net.neoforged.gradle' version '[6.0.18, 6.2)'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
id 'org.spongepowered.mixin' version '0.7.+'
// Pinned because it updates too frequently and forces recompile
id 'net.neoforged.gradle.userdev' version '7.0.57'
// id 'org.parchmentmc.librarian.forgegradle' version '1.+' TODO: Uncomment when Librarian is updated
id "me.hypherionmc.modutils.modpublisher" version "1.0.20"
id 'idea'
}
Expand Down Expand Up @@ -45,49 +46,36 @@ version = mod_version
group = mod_group_id

base {
archivesName = "immersiveweapons"
archivesName = project.mod_id
}

apply plugin: 'org.spongepowered.mixin'

jarJar.enable()

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'))
minecraft {
mappings channel: mappings_channel, version: mappings_version

accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
copyIdeResources = true

runs {
configureEach {
workingDirectory project.file('run')

property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')

jvmArgs '-Xmx6G', '-XX:+AllowEnhancedClassRedefinition'
runs {
configureEach {
systemProperty 'forge.logging.markers', 'REGISTRIES'
systemProperty 'forge.logging.console.level', 'debug'

mods {
"immersiveweapons" {
source sourceSets.main
}
}
}
jvmArguments.addAll '-Xmx6G', '-XX:+AllowEnhancedClassRedefinition'

modSource project.sourceSets.main
}

client {
}
client {
}

server {
args '--nogui'
}
server {
programArgument '--nogui'
}

data {
args '--mod', 'immersiveweapons', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
}
data {
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
}

Expand All @@ -97,30 +85,24 @@ sourceSets.main.resources { srcDir 'src/generated/resources' }
dependencies {
implementation 'org.jetbrains:annotations:24.0.1'

minecraft "net.neoforged:forge:${minecraft_version}-${neoforge_version}"
implementation "net.neoforged:neoforge:${neoforge_version}"

// Apply Mixin and MixinExtras AP
implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:0.2.0-rc.5"))
implementation(jarJar("io.github.llamalad7:mixinextras-forge:0.2.0-rc.5")) {
jarJar.ranged(it, "[0.2.0-rc.2,)")
implementation(jarJar("dev.lukebemish.biomesquisher:biomesquisher-neoforge-${minecraft_version}:${biomesquisher_version}")) {
jarJar.ranged(it, "[0.1.5-alpha,)")
}

annotationProcessor "net.fabricmc:sponge-mixin:0.12.5+mixin.0.8.5"
// TODO: Uncomment once dependencies update

// Include TerraBlender
implementation fg.deobf("com.github.glitchfiend:TerraBlender-forge:${terrablender_version}")
// Include Immersive Weapons Compatibility Bridge (IWCB)
implementation fg.deobf("tech.anonymoushacker1279.iwcompatbridge:IWCompatBridge:${iwcb_version}")
implementation "tech.anonymoushacker1279.iwcompatbridge:IWCompatBridge:${iwcb_version}"

// Include JEI
runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}")
// runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}")
// Include WTHIT and badpackets
runtimeOnly fg.deobf("mcp.mobius.waila:wthit:forge-${wthit_version}")
implementation fg.deobf("lol.bai:badpackets:forge-${badpackets_version}")
runtimeOnly "mcp.mobius.waila:wthit:neo-${wthit_version}"
implementation "lol.bai:badpackets:neo-${badpackets_version}"
// Include AttributeFix
implementation fg.deobf("curse.maven:attributefix-280510:${attributefix_version}")
// Include Debug Utils
runtimeOnly fg.deobf("curse.maven:debug-utils-forge-783008:4644077")
implementation "curse.maven:attributefix-280510:${attributefix_version}"
}

tasks.named('processResources', ProcessResources).configure {
Expand All @@ -141,13 +123,11 @@ java {
withJavadocJar()
}

reobf.create('jarJar')

tasks.named('jar', Jar).configure {
archiveClassifier = "slim"
manifest {
attributes([
'Specification-Title' : "immersiveweapons",
'Specification-Title' : mod_id,
'Specification-Vendor' : "AnonymousHacker1279",
'Specification-Version' : '1',
'Implementation-Title' : project.name,
Expand All @@ -157,20 +137,20 @@ tasks.named('jar', Jar).configure {
"MixinConfigs" : "mixins.immersiveweapons.json"
])
}

finalizedBy 'reobfJar'
}

tasks.jarJar.configure {
archiveClassifier = ""
finalizedBy('reobfJarJar')
}

build.dependsOn tasks.jarJar
tasks.named('build').configure {
dependsOn('jarJar')
}

artifacts {
archives javadocJar
archives sourcesJar
archives tasks.jarJar
}

publishing {
Expand Down Expand Up @@ -227,12 +207,10 @@ if (file("RELEASE_NOTES.md").exists()) {
additionalFiles = [javadocJar, sourcesJar]

curseDepends {
required = ["terrablender"]
optional = ["immersive-weapons-compatibility-bridge", "attributefix"]
}

modrinthDepends {
required = ["kkmrDlKT"]
optional = ["SAUGybfH", "lOOpEntO"]
}
}
Expand All @@ -248,14 +226,6 @@ tasks.named('javadoc', Javadoc).configure {
}
}

mixin {
add sourceSets.main, "mixins.immersiveweapons.refmap.json"
config "mixins.immersiveweapons.json"

debug.verbose = true
debug.export = true
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
options.fork = true // Use a separate JVM process for Java compilation
Expand Down
27 changes: 14 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ org.gradle.jvmargs=-Xmx6G
org.gradle.daemon=true
org.gradle.caching=true
org.gradle.parallel=true
mod_version=1.20.1-1.27.2
mod_id=immersiveweapons
mod_version=1.20.2-1.28.0
mod_group_id=tech.anonymoushacker1279.immersiveweapons
mappings_channel=parchment
mappings_version=2023.09.03-1.20.1
minecraft_version=1.20.1
minecraft_version_range=[1.20.1,1.21)
neoforge_version=47.1.79
neoforge_version_range=[47.1.3,)
loader_version_range=[47,)
terrablender_version=1.20-3.0.0.163
iwcb_version=1.20.1-1.7.0
mappings_channel=official
mappings_version=1.20.2
minecraft_version=1.20.2
minecraft_version_range=[1.20.2,1.21)
neoforge_version=20.2.86
neoforge_version_range=[20.2.84-beta,)
loader_version_range=[1.0,)
biomesquisher_version=0.1.5-alpha
iwcb_version=1.20.2-1.8.0-SNAPSHOT-2023.12.03-1
jei_version=15.2.0.27
wthit_version=8.4.0
badpackets_version=0.4.1
attributefix_version=4588114
wthit_version=9.1.2
badpackets_version=0.5.4
attributefix_version=4869806
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 4 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
31 changes: 18 additions & 13 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ done
# 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"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
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
# shellcheck disable=SC2039,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
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# 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"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down Expand Up @@ -241,4 +246,4 @@ eval "set -- $(
tr '\n' ' '
)" '"$@"'

exec "$JAVACMD" "$@"
exec "$JAVACMD" "$@"
2 changes: 1 addition & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
:omega
Loading

0 comments on commit 67f2871

Please sign in to comment.