From 6c683110b69cc0785d88a67d35771959971968e0 Mon Sep 17 00:00:00 2001 From: Superkat32 Date: Thu, 19 Dec 2024 21:34:03 -0500 Subject: [PATCH] fix java 17 goofy --- build.gradle | 6 ++++-- gradle.properties | 2 +- .../superkat/explosiveenhancement/ExplosiveHandler.java | 6 +++--- .../particles/normal/BlastWaveParticle.java | 6 +++--- .../particles/normal/FireballParticle.java | 6 +++--- .../particles/underwater/ShockwaveParticle.java | 6 +++--- src/main/resources/explosiveenhancement.mixins.json5 | 9 ++------- src/main/resources/fabric.mod.json | 2 +- 8 files changed, 20 insertions(+), 23 deletions(-) diff --git a/build.gradle b/build.gradle index 6ea6c0a..6cb3325 100644 --- a/build.gradle +++ b/build.gradle @@ -78,19 +78,21 @@ processResources { inputs.property "version", project.version filesMatching("fabric.mod.json") { - expand "version": project.version, 'mcdep': project.property('supported_mc_versions') + expand "version": project.version, 'mcdep': project.property('supported_mc_versions'), 'javadep': stonecutter.eval(mcVersion, ">=1.20.5") ? '>=21' : '>=17' } // val refmap = "refmap" to "${mod.name}-$mcVersion-$loader-refmap.json" // inputs.properties(refmap) filesMatching("explosiveenhancement.mixins.json5") { +// expand "refmap": "explosive-enhancement-$project.version-$project.jarname_target-refmap.json" expand "refmap": "explosive-enhancement-refmap.json" } } tasks.withType(JavaCompile).configureEach { - it.options.release = 21 + it.options.release = stonecutter.eval(mcVersion, ">=1.20.5") + ? 21 : 17 } java { diff --git a/gradle.properties b/gradle.properties index 71d2536..2e5e043 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ jarname_target=[VERSIONED] loader_version=0.16.9 # Mod Properties -mod_version = 1.3.0 +mod_version = 1.3.1 maven_group = net.superkat archives_base_name = explosive-enhancement diff --git a/src/main/java/net/superkat/explosiveenhancement/ExplosiveHandler.java b/src/main/java/net/superkat/explosiveenhancement/ExplosiveHandler.java index 788ee54..8769b3c 100644 --- a/src/main/java/net/superkat/explosiveenhancement/ExplosiveHandler.java +++ b/src/main/java/net/superkat/explosiveenhancement/ExplosiveHandler.java @@ -286,9 +286,9 @@ private static void spawnVanillaParticles(World world, double x, double y, doubl } private static void addParticle(World world, ParticleEffect particle, boolean isImportant, double x, double y, double z, double velX, double velY, double velZ) { - //? if(<=1.21.3) { -// world.addParticle(particle, isImportant, x, y, z, velX, velY, velZ); - //?} else { + //? if (<=1.21.3) { + /*world.addParticle(particle, isImportant, x, y, z, velX, velY, velZ); + *///?} else { world.addParticle(particle, isImportant, isImportant, x, y, z, velX, velY, velZ); //?} } diff --git a/src/main/java/net/superkat/explosiveenhancement/particles/normal/BlastWaveParticle.java b/src/main/java/net/superkat/explosiveenhancement/particles/normal/BlastWaveParticle.java index 500b52e..8c7966f 100644 --- a/src/main/java/net/superkat/explosiveenhancement/particles/normal/BlastWaveParticle.java +++ b/src/main/java/net/superkat/explosiveenhancement/particles/normal/BlastWaveParticle.java @@ -39,9 +39,9 @@ public BlastWaveParticle(ClientWorld world, double x, double y, double z, double } @Override - //? if(<=1.21.3) { -// public void buildGeometry(VertexConsumer buffer, Camera camera, float ticks) { - //?} else { + //? if (<=1.21.3) { + /*public void buildGeometry(VertexConsumer buffer, Camera camera, float ticks) { + *///?} else { public void render(VertexConsumer buffer, Camera camera, float ticks) { //?} Vec3d vec3 = camera.getPos(); diff --git a/src/main/java/net/superkat/explosiveenhancement/particles/normal/FireballParticle.java b/src/main/java/net/superkat/explosiveenhancement/particles/normal/FireballParticle.java index 0d61d4d..71faf42 100644 --- a/src/main/java/net/superkat/explosiveenhancement/particles/normal/FireballParticle.java +++ b/src/main/java/net/superkat/explosiveenhancement/particles/normal/FireballParticle.java @@ -35,9 +35,9 @@ public void tick() { this.velocityY -= (double)this.gravityStrength; this.move(this.velocityX, this.velocityY, this.velocityZ); if(this.age >= this.maxAge * 0.65 && CONFIG.showSparks) { - //?if (<=1.21.3) { -// this.world.addParticle(ExplosiveEnhancement.SPARKS, important, this.x, this.y, this.z, this.scale, this.velocityY, this.velocityZ); - //?} else { + //? if (<=1.21.3) { + /*this.world.addParticle(ExplosiveEnhancement.SPARKS, important, this.x, this.y, this.z, this.scale, this.velocityY, this.velocityZ); + *///?} else { this.world.addParticle(ExplosiveEnhancement.SPARKS, important, important, this.x, this.y, this.z, this.scale, this.velocityY, this.velocityZ); //?} } diff --git a/src/main/java/net/superkat/explosiveenhancement/particles/underwater/ShockwaveParticle.java b/src/main/java/net/superkat/explosiveenhancement/particles/underwater/ShockwaveParticle.java index b463eef..24b2b8a 100644 --- a/src/main/java/net/superkat/explosiveenhancement/particles/underwater/ShockwaveParticle.java +++ b/src/main/java/net/superkat/explosiveenhancement/particles/underwater/ShockwaveParticle.java @@ -34,9 +34,9 @@ public void tick() { this.velocityY -= (double)this.gravityStrength; this.move(this.velocityX, this.velocityY, this.velocityZ); if(this.age >= this.maxAge * 0.65 && CONFIG.showUnderwaterSparks) { - //? if(<=1.21.3) { -// this.world.addParticle(ExplosiveEnhancement.UNDERWATERSPARKS, important, this.x, this.y, this.z, scale, this.velocityY, this.velocityZ); - //?} else { + //? if (<=1.21.3) { + /*this.world.addParticle(ExplosiveEnhancement.UNDERWATERSPARKS, important, this.x, this.y, this.z, scale, this.velocityY, this.velocityZ); + *///?} else { this.world.addParticle(ExplosiveEnhancement.UNDERWATERSPARKS, important, important, this.x, this.y, this.z, scale, this.velocityY, this.velocityZ); //?} } diff --git a/src/main/resources/explosiveenhancement.mixins.json5 b/src/main/resources/explosiveenhancement.mixins.json5 index 5fb4c86..1887501 100644 --- a/src/main/resources/explosiveenhancement.mixins.json5 +++ b/src/main/resources/explosiveenhancement.mixins.json5 @@ -17,11 +17,6 @@ ], "injectors": { "defaultRequire": 1 - } - //i hate this i hate gradle - //you do not understand how frustrating the mixins have been here - hours wasted on nothing - //? if (>=1.21.2) { - , - "refmap": "explosive-enhancement-refmap.json", - //?} + }, + "refmap": "${refmap}" } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 4a9c3f9..7fdc64c 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -35,7 +35,7 @@ "fabricloader": ">=0.14.8", "fabric-api": "*", "minecraft": "${mcdep}", - "java": ">=21" + "java": "${javadep}" }, "suggests": { "another-mod": "*"