diff --git a/build.gradle.kts b/build.gradle.kts index 043da09..3156542 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,7 +15,7 @@ repositories { } dependencies { - compileOnly("io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT") + compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT") compileOnly("com.github.Slimefun:Slimefun4:e02a0f61d1") compileOnly("me.clip:placeholderapi:2.11.6") implementation("org.bstats:bstats-bukkit:3.0.3") diff --git a/src/main/java/io/github/thebusybiscuit/extraheads/setup/ItemSetup.java b/src/main/java/io/github/thebusybiscuit/extraheads/setup/ItemSetup.java index 6f4cb75..120163f 100644 --- a/src/main/java/io/github/thebusybiscuit/extraheads/setup/ItemSetup.java +++ b/src/main/java/io/github/thebusybiscuit/extraheads/setup/ItemSetup.java @@ -2,17 +2,15 @@ import java.util.logging.Level; -import io.github.thebusybiscuit.extraheads.ExtraHeads; - import org.bukkit.entity.EntityType; +import io.github.thebusybiscuit.extraheads.ExtraHeads; import io.github.thebusybiscuit.extraheads.items.MobHead; -import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; -import io.github.thebusybiscuit.slimefun4.implementation.Slimefun; import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; import io.github.thebusybiscuit.slimefun4.utils.ChatUtils; +import net.guizhanss.guizhanlib.minecraft.utils.MinecraftVersionUtil; import net.guizhanss.guizhanlib.minecraft.utils.compatibility.EntityTypeX; import lombok.experimental.UtilityClass; @@ -70,7 +68,7 @@ public static void setup() { registerHead(EntityType.GLOW_SQUID, "57327ee11812b764c7ade70b282cce4c58e635b2015244081d1490543da7280e"); registerHead(EntityType.GOAT, "457a0d538fa08a7affe312903468861720f9fa34e86d44b89dcec5639265f03"); - if (Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_19)) { + if (MinecraftVersionUtil.isAtLeast(19)) { // https://minecraft-heads.com/custom-heads/animals/61373-allay registerHead(EntityType.ALLAY, "df5de940bfe499c59ee8dac9f9c3919e7535eff3a9acb16f4842bf290f4c679f"); // https://minecraft-heads.com/custom-heads/animals/63169-cold-frog @@ -79,18 +77,25 @@ public static void setup() { registerHead(EntityType.TADPOLE, "987035f5352334c2cba6ac4c65c2b9059739d6d0e839c1dd98d75d2e77957847"); } - if (Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_20)) { + if (MinecraftVersionUtil.isAtLeast(20)) { // https://minecraft-heads.com/custom-heads/animals/62878-camel registerHead(EntityType.CAMEL, "3642c9f71131b5df4a8c21c8c6f10684f22abafb8cd68a1d55ac4bf263a53a31"); // https://minecraft-heads.com/custom-heads/animals/64113-sniffer registerHead(EntityType.SNIFFER, "fe5a8341c478a134302981e6a7758ea4ecfd8d62a0df4067897e75502f9b25de"); } - if (Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_20_5)) { + if (MinecraftVersionUtil.isAtLeast(20, 5)) { // https://minecraft-heads.com/custom-heads/head/91910-armadillo registerHead(EntityType.ARMADILLO, "9852b33ba294f560090752d113fe728cbc7dd042029a38d5382d65a2146068b7"); } + if (MinecraftVersionUtil.isAtLeast(21)) { + // https://minecraft-heads.com/custom-heads/head/87691-bogged + registerHead(EntityType.BOGGED, "a3b9003ba2d05562c75119b8a62185c67130e9282f7acbac4bc2824c21eb95d9"); + // https://minecraft-heads.com/custom-heads/head/69108-breeze + registerHead(EntityType.BREEZE, "a275728af7e6a29c88125b675a39d88ae9919bb61fdc200337fed6ab0c49d65c"); + } + ExtraHeads.getRegistry().getConfig().save(); }