Skip to content

Commit

Permalink
update for paper 1.21.1
Browse files Browse the repository at this point in the history
Credits: @Minecon724
  • Loading branch information
vectrixdevelops committed Nov 22, 2024
1 parent c2be9e9 commit 9b497d7
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Ignite Mod Template [![Discord](https://img.shields.io/discord/81952297758634805
===================

A template for creating an [Ignite](https://github.com/vectrix-space/ignite)
mod for [Paper](https://papermc.io/) 1.20.4.
mod for [Paper](https://papermc.io/) 1.21.1.
27 changes: 23 additions & 4 deletions build-logic/src/main/kotlin/mod.base-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {
val libs = extensions.getByType(org.gradle.accessors.dm.LibrariesForLibs::class)

java {
javaTarget(17)
javaTarget(21)
withSourcesJar()
}

Expand All @@ -27,6 +27,11 @@ repositories {
maven("https://repo.spongepowered.org/maven/")
}

// **
// Paper Only
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
// **

dependencies {
compileOnlyApi(libs.jetbrains.annotations)
}
Expand Down Expand Up @@ -77,11 +82,25 @@ tasks {
archiveClassifier.set("dev")
}

reobfJar {
remapperArgs.add("--mixin")
// **
// Paper Only
shadowJar {
archiveClassifier.set("")
}

build {
dependsOn(reobfJar)
dependsOn(shadowJar)
}
// **

// **
// Spigot Compatibility
//reobfJar {
// remapperArgs.add("--mixin")
//}
//
//build {
// dependsOn(reobfJar)
//}
// **
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mixinExtras = "0.4.1"
paperweight = "1.7.5"
shadow = "8.1.1"
spotless = "6.25.0"
paper = "1.20.4-R0.1-SNAPSHOT"
paper = "1.21.1-R0.1-SNAPSHOT"

[libraries]
jetbrains-annotations = { module = "org.jetbrains:annotations", version.ref = "jetbrains" }
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/example/mixin/core/MixinCraftServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
package com.example.mixin.core;

import java.util.logging.Logger;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.CraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public abstract class MixinSimpleCommandMap {

@Inject(method = "setDefaultCommands()V", at = @At("TAIL"), remap = false)
public void registerOwnCommands(CallbackInfo callback) {
this.register("example", new HelloCommand("hello"));
this.register("bukkit", new HelloCommand("hello"));
}
}
4 changes: 2 additions & 2 deletions src/main/resources/mixins.example.core.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"required": true,
"minVersion": "0.8.5",
"minVersion": "0.8.7",
"package": "com.example.mixin.core",
"plugin": "com.example.mixin.plugins.CorePlugin",
"target": "@env(DEFAULT)",
"compatibilityLevel": "JAVA_17",
"compatibilityLevel": "JAVA_21",
"server": [
"MixinCraftServer",
"MixinSimpleCommandMap"
Expand Down

0 comments on commit 9b497d7

Please sign in to comment.