Skip to content

Commit

Permalink
fix java 17 goofy
Browse files Browse the repository at this point in the history
  • Loading branch information
Superkat32 committed Dec 20, 2024
1 parent 2a442b3 commit 6c68311
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 23 deletions.
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
//?}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
//?}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
//?}
}
Expand Down
9 changes: 2 additions & 7 deletions src/main/resources/explosiveenhancement.mixins.json5
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"fabricloader": ">=0.14.8",
"fabric-api": "*",
"minecraft": "${mcdep}",
"java": ">=21"
"java": "${javadep}"
},
"suggests": {
"another-mod": "*"
Expand Down

0 comments on commit 6c68311

Please sign in to comment.