mirror of
https://github.com/HibiscusMC/HibiscusCommons.git
synced 2025-12-19 15:09:26 +00:00
Merge pull request #8 from Boy0000/geary
refactor: add 1.21.3, drop 1.19.4 support, fix: geary-hook
This commit is contained in:
@@ -3,10 +3,10 @@ import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
|
|||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("maven-publish")
|
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("net.minecrell.plugin-yml.bukkit") version "0.6.0"
|
||||||
id("xyz.jpenilla.run-paper") version "2.3.1"
|
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"
|
//id("io.papermc.hangar-publish-plugin") version "0.1.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ allprojects {
|
|||||||
compileOnly("org.jetbrains:annotations:24.1.0")
|
compileOnly("org.jetbrains:annotations:24.1.0")
|
||||||
compileOnly("io.th0rgal:oraxen:1.182.0")
|
compileOnly("io.th0rgal:oraxen:1.182.0")
|
||||||
compileOnly("com.github.LoneDev6:API-ItemsAdder:3.6.3-beta-14")
|
compileOnly("com.github.LoneDev6:API-ItemsAdder:3.6.3-beta-14")
|
||||||
compileOnly("com.mineinabyss:geary-papermc:0.27.0")
|
compileOnly("com.mineinabyss:geary-papermc:0.31.0-dev.4")
|
||||||
compileOnly("it.unimi.dsi:fastutil:8.5.13")
|
compileOnly("it.unimi.dsi:fastutil:8.5.13")
|
||||||
compileOnly("com.denizenscript:denizen:1.2.7-SNAPSHOT")
|
compileOnly("com.denizenscript:denizen:1.2.7-SNAPSHOT")
|
||||||
compileOnly("io.lumine:Mythic-Dist:5.2.1")
|
compileOnly("io.lumine:Mythic-Dist:5.2.1")
|
||||||
@@ -83,14 +83,16 @@ allprojects {
|
|||||||
compileOnly("net.Indyuce:MMOItems-API:6.9.4-SNAPSHOT")
|
compileOnly("net.Indyuce:MMOItems-API:6.9.4-SNAPSHOT")
|
||||||
compileOnly("com.willfp:eco:6.67.2")
|
compileOnly("com.willfp:eco:6.67.2")
|
||||||
compileOnly("me.clip:placeholderapi:2.11.6")
|
compileOnly("me.clip:placeholderapi:2.11.6")
|
||||||
compileOnly("LibsDisguises:LibsDisguises:10.0.21") {
|
compileOnly("LibsDisguises:LibsDisguises:10.0.44") {
|
||||||
exclude("org.spigotmc", "spigot")
|
exclude("org.spigotmc", "spigot")
|
||||||
}
|
}
|
||||||
compileOnly("com.github.Xiao-MoMi:Custom-Fishing:2.2.26")
|
compileOnly("com.github.Xiao-MoMi:Custom-Fishing:2.2.26")
|
||||||
compileOnly("com.ticxo.modelengine:ModelEngine:R4.0.2")
|
compileOnly("com.ticxo.modelengine:ModelEngine:R4.0.2")
|
||||||
|
compileOnly("com.comphenix.protocol:ProtocolLib:5.3.0")
|
||||||
|
|
||||||
// Lombok <3
|
// Lombok <3
|
||||||
annotationProcessor("org.projectlombok:lombok:1.18.34")
|
annotationProcessor("org.projectlombok:lombok:1.18.34")
|
||||||
|
compileOnly("org.projectlombok:lombok:1.18.34")
|
||||||
testCompileOnly("org.projectlombok:lombok:1.18.34")
|
testCompileOnly("org.projectlombok:lombok:1.18.34")
|
||||||
testAnnotationProcessor("org.projectlombok:lombok:1.18.34")
|
testAnnotationProcessor("org.projectlombok:lombok:1.18.34")
|
||||||
|
|
||||||
@@ -110,12 +112,12 @@ allprojects {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(path = ":common"))
|
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_R1", configuration = "reobf"))
|
||||||
implementation(project(path = ":v1_20_R2", configuration = "reobf"))
|
implementation(project(path = ":v1_20_R2", configuration = "reobf"))
|
||||||
implementation(project(path = ":v1_20_R3", configuration = "reobf"))
|
implementation(project(path = ":v1_20_R3", configuration = "reobf"))
|
||||||
implementation(project(path = ":v1_20_R4", configuration = "reobf"))
|
implementation(project(path = ":v1_20_R4", configuration = "reobf"))
|
||||||
implementation(project(path = ":v1_21_R1", configuration = "reobf"))
|
implementation(project(path = ":v1_21_R1", configuration = "reobf"))
|
||||||
|
implementation(project(path = ":v1_21_R2", configuration = "reobf"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
@@ -140,12 +142,12 @@ tasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
dependsOn(":v1_19_R3:reobfJar")
|
|
||||||
dependsOn(":v1_20_R1:reobfJar")
|
dependsOn(":v1_20_R1:reobfJar")
|
||||||
dependsOn(":v1_20_R2:reobfJar")
|
dependsOn(":v1_20_R2:reobfJar")
|
||||||
dependsOn(":v1_20_R3:reobfJar")
|
dependsOn(":v1_20_R3:reobfJar")
|
||||||
dependsOn(":v1_20_R4:reobfJar")
|
dependsOn(":v1_20_R4:reobfJar")
|
||||||
dependsOn(":v1_21_R1:reobfJar")
|
dependsOn(":v1_21_R1:reobfJar")
|
||||||
|
dependsOn(":v1_21_R2:reobfJar")
|
||||||
mergeServiceFiles()
|
mergeServiceFiles()
|
||||||
|
|
||||||
relocate("org.bstats", "me.lojosho.shaded.bstats")
|
relocate("org.bstats", "me.lojosho.shaded.bstats")
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
tasks {
|
tasks {
|
||||||
compileJava {
|
compileJava {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
options.release.set(17)
|
options.release.set(21)
|
||||||
}
|
}
|
||||||
|
|
||||||
javadoc {
|
javadoc {
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
package me.lojosho.hibiscuscommons.hooks.items;
|
package me.lojosho.hibiscuscommons.hooks.items;
|
||||||
|
|
||||||
|
import com.mineinabyss.geary.papermc.GearyPaper;
|
||||||
|
import com.mineinabyss.geary.papermc.GearyPaperKt;
|
||||||
|
import com.mineinabyss.geary.papermc.GearyPaperModule;
|
||||||
|
import com.mineinabyss.geary.papermc.GearyPaperModuleKt;
|
||||||
import com.mineinabyss.geary.papermc.tracking.items.ItemTrackingKt;
|
import com.mineinabyss.geary.papermc.tracking.items.ItemTrackingKt;
|
||||||
|
import com.mineinabyss.geary.papermc.tracking.items.ItemTrackingModule;
|
||||||
import com.mineinabyss.geary.prefabs.PrefabKey;
|
import com.mineinabyss.geary.prefabs.PrefabKey;
|
||||||
import me.lojosho.hibiscuscommons.hooks.Hook;
|
import me.lojosho.hibiscuscommons.hooks.Hook;
|
||||||
import me.lojosho.hibiscuscommons.hooks.HookFlag;
|
import me.lojosho.hibiscuscommons.hooks.HookFlag;
|
||||||
@@ -12,6 +17,8 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
*/
|
*/
|
||||||
public class HookGeary extends Hook {
|
public class HookGeary extends Hook {
|
||||||
|
|
||||||
|
private ItemTrackingModule itemTracking = null;
|
||||||
|
|
||||||
public HookGeary() {
|
public HookGeary() {
|
||||||
super("geary", HookFlag.ITEM_SUPPORT);
|
super("geary", HookFlag.ITEM_SUPPORT);
|
||||||
}
|
}
|
||||||
@@ -21,8 +28,9 @@ public class HookGeary extends Hook {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getItem(@NotNull String itemId) {
|
public ItemStack getItem(@NotNull String itemId) {
|
||||||
|
if (itemTracking == null) itemTracking = GearyPaperModuleKt.getGearyPaper().getWorldManager().getGlobal().getAddon(ItemTrackingKt.getItemTracking());
|
||||||
PrefabKey prefabKey = PrefabKey.Companion.ofOrNull(itemId);
|
PrefabKey prefabKey = PrefabKey.Companion.ofOrNull(itemId);
|
||||||
if (prefabKey == null) return null;
|
if (prefabKey == null) return null;
|
||||||
return ItemTrackingKt.getGearyItems().createItem(prefabKey, null);
|
return itemTracking.createItem(prefabKey, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,13 +11,15 @@ import java.util.LinkedHashMap;
|
|||||||
public class NMSHandlers {
|
public class NMSHandlers {
|
||||||
|
|
||||||
private static final LinkedHashMap<String, String> VERSION_MAP = new LinkedHashMap <>() {{
|
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.1", "v1_20_R1");
|
||||||
put("1.20.2", "v1_20_R2");
|
put("1.20.2", "v1_20_R2");
|
||||||
put("1.20.4", "v1_20_R3");
|
put("1.20.4", "v1_20_R3");
|
||||||
|
// 1.20.5 is not supported; was imminently bumped to 1.20.6
|
||||||
put("1.20.6", "v1_20_R4");
|
put("1.20.6", "v1_20_R4");
|
||||||
put("1.21", "v1_21_R1");
|
put("1.21", "v1_21_R1");
|
||||||
put("1.21.1", "v1_21_R1");
|
put("1.21.1", "v1_21_R1");
|
||||||
|
// 1.20.2 is not supported; was imminently bumped to 1.21.3
|
||||||
|
put("1.21.3", "v1_21_R2");
|
||||||
}};
|
}};
|
||||||
private static NMSHandler handler;
|
private static NMSHandler handler;
|
||||||
@Getter
|
@Getter
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ pluginManagement {
|
|||||||
rootProject.name = "HibiscusCommons"
|
rootProject.name = "HibiscusCommons"
|
||||||
include(
|
include(
|
||||||
"common",
|
"common",
|
||||||
"v1_19_R3",
|
|
||||||
"v1_20_R1",
|
"v1_20_R1",
|
||||||
"v1_20_R2",
|
"v1_20_R2",
|
||||||
"v1_20_R3",
|
"v1_20_R3",
|
||||||
"v1_20_R4",
|
"v1_20_R4",
|
||||||
"v1_21_R1"
|
"v1_21_R1",
|
||||||
|
"v1_21_R2",
|
||||||
)
|
)
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("io.papermc.paperweight.userdev") version "1.7.3"
|
id("io.papermc.paperweight.userdev") version "1.7.4"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT")
|
paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT")
|
||||||
|
pluginRemapper("net.fabricmc:tiny-remapper:0.10.4:fat")
|
||||||
implementation(project(":common"))
|
implementation(project(":common"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ tasks {
|
|||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
options.release.set(17)
|
options.release.set(21)
|
||||||
}
|
}
|
||||||
javadoc {
|
javadoc {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("io.papermc.paperweight.userdev") version "1.7.3"
|
id("io.papermc.paperweight.userdev") version "1.7.4"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -16,7 +16,7 @@ tasks {
|
|||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
options.release.set(17)
|
options.release.set(21)
|
||||||
}
|
}
|
||||||
javadoc {
|
javadoc {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("io.papermc.paperweight.userdev") version "1.7.3"
|
id("io.papermc.paperweight.userdev") version "1.7.4"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -16,7 +16,7 @@ tasks {
|
|||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
options.release.set(17)
|
options.release.set(21)
|
||||||
}
|
}
|
||||||
javadoc {
|
javadoc {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("io.papermc.paperweight.userdev") version "1.7.3"
|
id("io.papermc.paperweight.userdev") version "1.7.4"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("io.papermc.paperweight.userdev") version "1.7.3"
|
id("io.papermc.paperweight.userdev") version "1.7.4"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("io.papermc.paperweight.userdev") version "1.7.3"
|
id("io.papermc.paperweight.userdev") version "1.7.4"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT")
|
paperweight.paperDevBundle("1.21.3-R0.1-SNAPSHOT")
|
||||||
implementation(project(":common"))
|
implementation(project(":common"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -16,8 +16,11 @@ tasks {
|
|||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
options.release.set(17)
|
|
||||||
}
|
}
|
||||||
|
java {
|
||||||
|
toolchain.languageVersion.set(JavaLanguageVersion.of(21));
|
||||||
|
}
|
||||||
|
|
||||||
javadoc {
|
javadoc {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
}
|
}
|
||||||
@@ -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 com.mojang.datafixers.util.Pair;
|
||||||
import net.minecraft.network.protocol.Packet;
|
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.PlayerTeam;
|
||||||
import net.minecraft.world.scores.Team;
|
import net.minecraft.world.scores.Team;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_19_R3.CraftEquipmentSlot;
|
import org.bukkit.craftbukkit.CraftEquipmentSlot;
|
||||||
import org.bukkit.craftbukkit.v1_19_R3.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_19_R3.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||||
import org.bukkit.craftbukkit.v1_19_R3.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||||
import org.bukkit.craftbukkit.v1_19_R3.scoreboard.CraftScoreboard;
|
import org.bukkit.craftbukkit.scoreboard.CraftScoreboard;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
Reference in New Issue
Block a user