9
0
mirror of https://github.com/HibiscusMC/HibiscusCommons.git synced 2025-12-19 15:09:26 +00:00

feat: add 1.21.3 support

This commit is contained in:
Boy
2024-11-01 22:45:35 +01:00
parent df4662fe40
commit a8870f7ae4
10 changed files with 33 additions and 30 deletions

View File

@@ -3,10 +3,10 @@ import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
plugins {
id("java")
id("maven-publish")
id("com.gradleup.shadow") version "8.3.3"
id("com.gradleup.shadow") version "8.3.4"
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
id("xyz.jpenilla.run-paper") version "2.3.1"
id("io.papermc.paperweight.userdev") version "1.7.3" apply false
id("io.papermc.paperweight.userdev") version "1.7.4" apply false
//id("io.papermc.hangar-publish-plugin") version "0.1.1"
}
@@ -112,12 +112,12 @@ allprojects {
dependencies {
implementation(project(path = ":common"))
//implementation(project(path = ":v1_19_R3", configuration = "reobf"))
//implementation(project(path = ":v1_20_R1", configuration = "reobf"))
//implementation(project(path = ":v1_20_R2", configuration = "reobf"))
//implementation(project(path = ":v1_20_R3", configuration = "reobf"))
//implementation(project(path = ":v1_20_R4", configuration = "reobf"))
implementation(project(path = ":v1_20_R1", configuration = "reobf"))
implementation(project(path = ":v1_20_R2", configuration = "reobf"))
implementation(project(path = ":v1_20_R3", configuration = "reobf"))
implementation(project(path = ":v1_20_R4", configuration = "reobf"))
implementation(project(path = ":v1_21_R1", configuration = "reobf"))
implementation(project(path = ":v1_21_R2", configuration = "reobf"))
}
tasks {
@@ -142,12 +142,12 @@ tasks {
}
shadowJar {
//dependsOn(":v1_19_R3:reobfJar")
//dependsOn(":v1_20_R1:reobfJar")
//dependsOn(":v1_20_R2:reobfJar")
//dependsOn(":v1_20_R3:reobfJar")
//dependsOn(":v1_20_R4:reobfJar")
dependsOn(":v1_20_R1:reobfJar")
dependsOn(":v1_20_R2:reobfJar")
dependsOn(":v1_20_R3:reobfJar")
dependsOn(":v1_20_R4:reobfJar")
dependsOn(":v1_21_R1:reobfJar")
dependsOn(":v1_21_R2:reobfJar")
mergeServiceFiles()
relocate("org.bstats", "me.lojosho.shaded.bstats")

View File

@@ -11,13 +11,13 @@ import java.util.LinkedHashMap;
public class NMSHandlers {
private static final LinkedHashMap<String, String> VERSION_MAP = new LinkedHashMap <>() {{
put("1.19.4", "v1_19_R3");
put("1.20.1", "v1_20_R1");
put("1.20.2", "v1_20_R2");
put("1.20.4", "v1_20_R3");
put("1.20.6", "v1_20_R4");
put("1.21", "v1_21_R1");
put("1.21.1", "v1_21_R1");
put("1.21.3", "v1_21_R3");
}};
private static NMSHandler handler;
@Getter

View File

@@ -8,10 +8,10 @@ pluginManagement {
rootProject.name = "HibiscusCommons"
include(
"common",
//"v1_19_R3",
"v1_20_R1",
"v1_20_R2",
"v1_20_R3",
"v1_20_R4",
"v1_21_R1"
"v1_21_R1",
"v1_21_R2",
)

View File

@@ -1,11 +1,11 @@
plugins {
id("java")
id("io.papermc.paperweight.userdev") version "1.7.3"
id("io.papermc.paperweight.userdev") version "1.7.4"
}
dependencies {
paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT")
pluginRemapper("net.fabricmc:tiny-remapper:0.10.3:fat")
pluginRemapper("net.fabricmc:tiny-remapper:0.10.4:fat")
implementation(project(":common"))
}

View File

@@ -1,6 +1,6 @@
plugins {
id("java")
id("io.papermc.paperweight.userdev") version "1.7.3"
id("io.papermc.paperweight.userdev") version "1.7.4"
}
dependencies {

View File

@@ -1,6 +1,6 @@
plugins {
id("java")
id("io.papermc.paperweight.userdev") version "1.7.3"
id("io.papermc.paperweight.userdev") version "1.7.4"
}
dependencies {

View File

@@ -1,6 +1,6 @@
plugins {
id("java")
id("io.papermc.paperweight.userdev") version "1.7.3"
id("io.papermc.paperweight.userdev") version "1.7.4"
}
dependencies {

View File

@@ -1,6 +1,6 @@
plugins {
id("java")
id("io.papermc.paperweight.userdev") version "1.7.3"
id("io.papermc.paperweight.userdev") version "1.7.4"
}
dependencies {

View File

@@ -1,10 +1,10 @@
plugins {
id("java")
id("io.papermc.paperweight.userdev") version "1.7.3"
id("io.papermc.paperweight.userdev") version "1.7.4"
}
dependencies {
paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT")
paperweight.paperDevBundle("1.21-R0.1-SNAPSHOT")
implementation(project(":common"))
}
@@ -16,8 +16,11 @@ tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21));
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}

View File

@@ -1,4 +1,4 @@
package me.lojosho.hibiscuscommons.nms.v1_19_R3;
package me.lojosho.hibiscuscommons.nms.v1_21_R2;
import com.mojang.datafixers.util.Pair;
import net.minecraft.network.protocol.Packet;
@@ -13,11 +13,11 @@ import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.scores.PlayerTeam;
import net.minecraft.world.scores.Team;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_19_R3.CraftEquipmentSlot;
import org.bukkit.craftbukkit.v1_19_R3.CraftServer;
import org.bukkit.craftbukkit.v1_19_R3.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_19_R3.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_19_R3.scoreboard.CraftScoreboard;
import org.bukkit.craftbukkit.CraftEquipmentSlot;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftPlayer;
import org.bukkit.craftbukkit.inventory.CraftItemStack;
import org.bukkit.craftbukkit.scoreboard.CraftScoreboard;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;