From 9cd5fb5f713fbfef3b57205c6f97d93ac6007439 Mon Sep 17 00:00:00 2001 From: SI-Abid Date: Sun, 7 Dec 2025 01:24:03 +0600 Subject: [PATCH 1/3] patch v4.9.1 build --- pom.xml | 133 +++++++----------- .../implementation/items/medical/Bandage.java | 2 +- .../items/medical/MedicalSupply.java | 2 +- .../implementation/items/medical/Splint.java | 2 +- .../items/weapons/VampireBlade.java | 2 +- .../test/mocks/InventoryViewWrapper.java | 12 ++ 6 files changed, 67 insertions(+), 86 deletions(-) diff --git a/pom.xml b/pom.xml index 65280d4459..44dace79fd 100644 --- a/pom.xml +++ b/pom.xml @@ -2,36 +2,31 @@ - 4.0.0 com.github.slimefun Slimefun - - - - 4.9-UNOFFICIAL + 4.9.1-UNOFFICIAL 2013 jar - + Slimefun is a Paper plugin that simulates a modpack-like atmosphere by adding over 500 new items and recipes to your Minecraft Server. https://github.com/Slimefun/Slimefun4 - + UTF-8 - - - 16 - 16 - + + + 21 + 21 21 21 - - - 1.21.1 - https://hub.spigotmc.org/javadocs/spigot/ - + + + 1.21.10 + https://jd.papermc.io/paper/1.21/ + Slimefun_Slimefun4 slimefun @@ -39,13 +34,13 @@ DEBUG target/site/jacoco/jacoco.xml - + GitHub Issues https://github.com/Slimefun/Slimefun4/issues - + @@ -54,9 +49,8 @@ repo - + - @@ -99,28 +93,26 @@ https://repo.codemc.io/repository/maven-public/ - + ${project.basedir}/src/main/java - ${project.basedir}/src/test/java - clean package - ${project.name} v${project.version} - + org.apache.maven.plugins maven-compiler-plugin 3.13.0 - + 21 + 21 @@ -128,13 +120,12 @@ - + org.apache.maven.plugins maven-source-plugin 3.3.1 - attach-sources @@ -144,58 +135,52 @@ - + org.apache.maven.plugins maven-surefire-plugin 3.5.2 - org.junit.jupiter:junit-jupiter false - + org.sonarsource.scanner.maven sonar-maven-plugin 5.0.0.4389 - + org.jacoco jacoco-maven-plugin 0.8.12 - prepare - prepare-agent - report test - report - + org.apache.maven.plugins maven-shade-plugin 3.6.0 - @@ -212,7 +197,6 @@ io.github.thebusybiscuit.slimefun4.libraries.commons.lang - @@ -223,7 +207,6 @@ - package @@ -233,27 +216,23 @@ - + org.apache.maven.plugins maven-javadoc-plugin 3.11.2 - ${project.basedir} javadocs - Slimefun4 - Javadocs Slimefun4 - Javadocs false -html5 - - + ${paper.javadocs} - @@ -269,8 +248,7 @@ io.github.thebusybiscuit.slimefun4.implementation* - Slimefun4 - Integrations with other - plugins + Slimefun4 - Integrations with other plugins io.github.thebusybiscuit.slimefun4.integrations* @@ -297,41 +275,34 @@ - + - ${basedir}/src/main/resources true - plugin.yml config.yml item-models.yml - wiki.json languages/translators.json - tags/*.json biome-maps/*.json - languages/**/*.yml - ${basedir} false - LICENSE - + @@ -343,7 +314,7 @@ - + @@ -352,61 +323,57 @@ 3.0.2 provided - + - - - com.github.Slimefun.dough - dough-api - cb22e71335 - compile - com.github.Slimefun.dough dough-api cb22e71335 compile + io.papermc paperlib 1.0.8 compile - - + + io.papermc.paper paper-api ${paper.version}-R0.1-SNAPSHOT provided - + org.junit.jupiter junit-jupiter test + org.mockito mockito-core 5.15.2 test + org.slf4j slf4j-simple 2.0.16 test - + + com.github.seeseemelk MockBukkit-v1.21 3.133.2 test - @@ -416,14 +383,13 @@ - + com.sk89q.worldedit worldedit-core 7.3.9 provided - @@ -432,12 +398,12 @@ + com.sk89q.worldedit worldedit-bukkit 7.3.9 provided - @@ -446,12 +412,12 @@ + com.gmail.nossr50.mcMMO mcMMO 2.2.029 provided - @@ -460,12 +426,12 @@ + me.clip placeholderapi 2.11.6 provided - @@ -474,12 +440,12 @@ + me.minebuilders clearlag-core 3.1.6 provided - @@ -488,12 +454,12 @@ + com.github.LoneDev6 itemsadder-api 3.6.1 provided - @@ -502,12 +468,12 @@ + net.imprex orebfuscator-api 5.4.0 provided - @@ -516,6 +482,7 @@ + commons-lang @@ -523,10 +490,12 @@ 2.6 compile + + com.mojang authlib - 6.0.52 + 6.0.54 provided @@ -537,4 +506,4 @@ - + \ No newline at end of file diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Bandage.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Bandage.java index b87882cf6d..f315a0df8d 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Bandage.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Bandage.java @@ -42,7 +42,7 @@ public ItemUseHandler getItemHandler() { Player p = e.getPlayer(); // Player is neither burning nor injured - if (p.getFireTicks() <= 0 && p.getHealth() >= p.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()) { + if (p.getFireTicks() <= 0 && p.getHealth() >= p.getAttribute(Attribute.MAX_HEALTH).getValue()) { return; } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/MedicalSupply.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/MedicalSupply.java index 350376eab8..284292f85f 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/MedicalSupply.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/MedicalSupply.java @@ -73,7 +73,7 @@ public void clearNegativeEffects(@Nonnull LivingEntity n) { */ public void heal(@Nonnull LivingEntity n) { double health = n.getHealth() + healAmount; - double maxHealth = n.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue(); + double maxHealth = n.getAttribute(Attribute.MAX_HEALTH).getValue(); n.setHealth(Math.min(health, maxHealth)); } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Splint.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Splint.java index 0a510ff28a..b85db3af7b 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Splint.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Splint.java @@ -31,7 +31,7 @@ public Splint(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType Player p = e.getPlayer(); // Player is neither burning nor injured - if (p.getFireTicks() <= 0 && p.getHealth() >= p.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()) { + if (p.getFireTicks() <= 0 && p.getHealth() >= p.getAttribute(Attribute.MAX_HEALTH).getValue()) { return; } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/weapons/VampireBlade.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/weapons/VampireBlade.java index 006db130e2..43ce84dfdb 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/weapons/VampireBlade.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/weapons/VampireBlade.java @@ -45,7 +45,7 @@ public VampireBlade(ItemGroup itemGroup, SlimefunItemStack item, RecipeType reci if (ThreadLocalRandom.current().nextInt(100) < getChance()) { SoundEffect.VAMPIRE_BLADE_HEALING_SOUND.playFor(p); double health = p.getHealth() + HEALING_AMOUNT; - double maxHealth = p.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue(); + double maxHealth = p.getAttribute(Attribute.MAX_HEALTH).getValue(); p.setHealth(Math.min(health, maxHealth)); } }; diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/test/mocks/InventoryViewWrapper.java b/src/test/java/io/github/thebusybiscuit/slimefun4/test/mocks/InventoryViewWrapper.java index 0b49c5ed0b..858bf33dce 100644 --- a/src/test/java/io/github/thebusybiscuit/slimefun4/test/mocks/InventoryViewWrapper.java +++ b/src/test/java/io/github/thebusybiscuit/slimefun4/test/mocks/InventoryViewWrapper.java @@ -6,6 +6,7 @@ import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.MenuType; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -32,6 +33,17 @@ private InventoryViewWrapper(HumanEntity player, super(player, name, top, bottom, type); } + @Override + public void open() { + // implementation not needed for tests + } + + @Override + public @org.jetbrains.annotations.Nullable MenuType getMenuType() { + // implementation not needed for tests + return null; + } + @Nonnull public static InventoryViewWrapper wrap(@Nonnull InventoryView inventoryView) { HumanEntity player = inventoryView.getPlayer(); From 05a54a3cf6c382933d4bcc921bf9909dd37a815c Mon Sep 17 00:00:00 2001 From: Saiham Islam Abid Date: Sun, 7 Dec 2025 17:46:46 +0600 Subject: [PATCH 2/3] supports 1.21.10 --- .../dough/skins/nms/PlayerHeadAdapter.class | Bin 0 -> 2135 bytes .../skins/nms/PlayerHeadAdapter20v5.class | Bin 0 -> 3566 bytes .../skins/nms/PlayerHeadAdapterPaper.class | Bin 0 -> 3139 bytes pom.xml | 17 +- .../dough/skins/CustomGameProfile.java | 207 +++++ .../bakedlibs/dough/skins/PlayerHead.java | 98 ++ src/main/resources/config.yml | 10 +- .../internal_tags/blocks/solid_blocks.json | 838 ++++++++++++++++++ 8 files changed, 1159 insertions(+), 11 deletions(-) create mode 100644 io/github/thebusybiscuit/slimefun4/libraries/dough/skins/nms/PlayerHeadAdapter.class create mode 100644 io/github/thebusybiscuit/slimefun4/libraries/dough/skins/nms/PlayerHeadAdapter20v5.class create mode 100644 io/github/thebusybiscuit/slimefun4/libraries/dough/skins/nms/PlayerHeadAdapterPaper.class create mode 100644 src/main/java/io/github/bakedlibs/dough/skins/CustomGameProfile.java create mode 100644 src/main/java/io/github/bakedlibs/dough/skins/PlayerHead.java create mode 100644 src/test/resources/internal_tags/blocks/solid_blocks.json diff --git a/io/github/thebusybiscuit/slimefun4/libraries/dough/skins/nms/PlayerHeadAdapter.class b/io/github/thebusybiscuit/slimefun4/libraries/dough/skins/nms/PlayerHeadAdapter.class new file mode 100644 index 0000000000000000000000000000000000000000..b2dfeb423ef7a3db80f695eebf85d7c5eb124084 GIT binary patch literal 2135 zcmb_dT~pge6g>+L0>^29@R9F2v?(?;5s;)w<1~o@LtF%5fblfEt>v{XEK7{EqVQAt zFPJ`%PMPTs=x^$zJrV@mp?zWeqSfBLd+xb+_n!Up)9-%(DB``qn&X=dM>nIYshg@A zg$G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!ftn^1h~D zH?=`;I;YuZ)SUlHXz6E3H^%wg^2gC+GkwmNSc#%>a-oK^l%+>J)8$ibTz7OH=~*b` zTuY8xo}JfDGMBN0)$!p&g8B5TF>^e?oWJ{){?>dGu33i_KJB{p&`kiDtaTBN0jW^MoPToX!T7HMI^XWvo zq5gZs=5XN#o=-O}86|5+*YMIjChKqo9nsN-Ip}FNhTmA#^>jQf=i$_${cAL*q7v*8bDYlRPDH-Q2+5TrEL zVH11pl(Yp$$j3=+#SpgP9Jcf7@4z=K_CI1berBEim8|@M{Q>yp5a0-WLXBBe0zz)# zRlG(v{khli1}#nCH@t~UWO@T-y@j_Cr@kwA2k(;5Be;zB@IEAUf5oEu0rwBl&SCZ% fX~!juu$RQAl-NMI>#!c51$|a#eg!^fTL<|MmoSkb literal 0 HcmV?d00001 diff --git a/pom.xml b/pom.xml index 44dace79fd..fb6c7bf538 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.github.slimefun Slimefun - 4.9.1-UNOFFICIAL + 5.0 2013 jar @@ -26,6 +26,7 @@ 1.21.10 https://jd.papermc.io/paper/1.21/ + true Slimefun_Slimefun4 @@ -144,6 +145,7 @@ org.junit.jupiter:junit-jupiter false + ${mockbukkit.skip} @@ -205,6 +207,13 @@ META-INF/* + + io.github.baked-libs:dough-api + + io/github/bakedlibs/dough/skins/CustomGameProfile.class + io/github/bakedlibs/dough/skins/PlayerHead.class + + @@ -326,9 +335,9 @@ - com.github.Slimefun.dough + io.github.baked-libs dough-api - cb22e71335 + 1.4.0 compile @@ -506,4 +515,4 @@ - \ No newline at end of file + diff --git a/src/main/java/io/github/bakedlibs/dough/skins/CustomGameProfile.java b/src/main/java/io/github/bakedlibs/dough/skins/CustomGameProfile.java new file mode 100644 index 0000000000..027ce37296 --- /dev/null +++ b/src/main/java/io/github/bakedlibs/dough/skins/CustomGameProfile.java @@ -0,0 +1,207 @@ +package io.github.bakedlibs.dough.skins; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.URL; +import java.util.UUID; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import org.bukkit.Bukkit; +import org.bukkit.inventory.meta.SkullMeta; +import org.bukkit.profile.PlayerProfile; +import org.bukkit.profile.PlayerTextures; + +import com.google.common.collect.ArrayListMultimap; +import com.mojang.authlib.GameProfile; +import com.mojang.authlib.properties.Property; +import com.mojang.authlib.properties.PropertyMap; + +import io.github.bakedlibs.dough.reflection.ReflectionUtils; +import io.github.bakedlibs.dough.versions.MinecraftVersion; +import io.github.bakedlibs.dough.versions.UnknownServerVersionException; + +/** + * Local override that mirrors the upstream class but avoids extending {@link GameProfile}, + * which is final on 1.21.10. We wrap a real {@link GameProfile} internally. + */ +public final class CustomGameProfile { + + /** + * The player name for this profile. + * "CS-CoreLib" for historical reasons and backwards compatibility. + */ + private static final String PLAYER_NAME = "CS-CoreLib"; + + /** + * The skin's property key. + */ + private static final String PROPERTY_KEY = "textures"; + + private final URL skinUrl; + private final String texture; + private final GameProfile handle; + private static final Method PROPERTY_ACCESSOR = resolvePropertyAccessor(); + private static final Method ID_ACCESSOR = resolveIdAccessor(); + private static final Constructor MODERN_CONSTRUCTOR = resolveModernConstructor(); + private static final Constructor PROPERTY_MAP_CONSTRUCTOR = resolvePropertyMapConstructor(); + private static final boolean PROPERTY_MAP_REQUIRES_MULTIMAP = PROPERTY_MAP_CONSTRUCTOR != null && PROPERTY_MAP_CONSTRUCTOR.getParameterCount() == 1; + + CustomGameProfile(@Nonnull UUID uuid, @Nullable String texture, @Nonnull URL url) { + this.handle = createProfile(uuid, texture); + this.skinUrl = url; + this.texture = texture; + } + + void apply(@Nonnull SkullMeta meta) throws NoSuchFieldException, IllegalAccessException, UnknownServerVersionException { + // setOwnerProfile was added in 1.18, but getOwningPlayer throws a NullPointerException since 1.20.2 + if (MinecraftVersion.get().isAtLeast(MinecraftVersion.parse("1.20"))) { + PlayerProfile playerProfile = Bukkit.createPlayerProfile(resolveId(this.handle), PLAYER_NAME); + PlayerTextures playerTextures = playerProfile.getTextures(); + playerTextures.setSkin(this.skinUrl); + playerProfile.setTextures(playerTextures); + meta.setOwnerProfile(playerProfile); + } else { + // Forces SkullMeta to properly deserialize and serialize the profile + ReflectionUtils.setFieldValue(meta, "profile", this.handle); + + meta.setOwningPlayer(meta.getOwningPlayer()); + + // Now override the texture again + ReflectionUtils.setFieldValue(meta, "profile", this.handle); + } + + } + + /** + * Get the base64 encoded texture from the underline GameProfile. + * + * @return the base64 encoded texture. + */ + @Nullable + public String getBase64Texture() { + return this.texture; + } + + @Nonnull + GameProfile asGameProfile() { + return this.handle; + } + + private static PropertyMap propertyMap(@Nonnull GameProfile profile) { + try { + return (PropertyMap) PROPERTY_ACCESSOR.invoke(profile); + } catch (IllegalAccessException | InvocationTargetException e) { + throw new IllegalStateException("Failed to access GameProfile properties", e); + } + } + + private static Method resolvePropertyAccessor() { + for (String accessor : new String[] { "getProperties", "properties" }) { + try { + Method method = GameProfile.class.getMethod(accessor); + method.setAccessible(true); + return method; + } catch (NoSuchMethodException ignored) { + // Try the next accessor name + } + } + + throw new IllegalStateException("Could not find GameProfile#getProperties() or GameProfile#properties()"); + } + + private static Method resolveIdAccessor() { + for (String accessor : new String[] { "getId", "id" }) { + try { + Method method = GameProfile.class.getMethod(accessor); + method.setAccessible(true); + return method; + } catch (NoSuchMethodException ignored) { + // Try next + } + } + throw new IllegalStateException("Could not find GameProfile#getId() or GameProfile#id()"); + } + + private static UUID resolveId(GameProfile profile) { + try { + return (UUID) ID_ACCESSOR.invoke(profile); + } catch (IllegalAccessException | InvocationTargetException e) { + throw new IllegalStateException("Failed to access GameProfile id", e); + } + } + + private static GameProfile createProfile(@Nonnull UUID uuid, @Nullable String texture) { + if (MODERN_CONSTRUCTOR != null) { + PropertyMap properties = newPropertyMap(texture); + + try { + return MODERN_CONSTRUCTOR.newInstance(uuid, PLAYER_NAME, properties); + } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { + throw new IllegalStateException("Failed to instantiate GameProfile with custom PropertyMap", e); + } + } + + GameProfile profile = new GameProfile(uuid, PLAYER_NAME); + + if (texture != null) { + try { + propertyMap(profile).put(PROPERTY_KEY, new Property(PROPERTY_KEY, texture)); + } catch (UnsupportedOperationException ignored) { + // Legacy path only; if the map is immutable here, we skip attaching the texture. + } + } + + return profile; + } + + private static PropertyMap newPropertyMap(@Nullable String texture) { + if (PROPERTY_MAP_CONSTRUCTOR == null) { + throw new IllegalStateException("Could not resolve PropertyMap constructor"); + } + + try { + if (PROPERTY_MAP_REQUIRES_MULTIMAP) { + var multimap = ArrayListMultimap.create(); + + if (texture != null) { + multimap.put(PROPERTY_KEY, new Property(PROPERTY_KEY, texture)); + } + + return PROPERTY_MAP_CONSTRUCTOR.newInstance(multimap); + } + + return PROPERTY_MAP_CONSTRUCTOR.newInstance(); + } catch (InstantiationException | InvocationTargetException | IllegalAccessException e) { + throw new IllegalStateException("Failed to instantiate PropertyMap", e); + } + } + + private static Constructor resolveModernConstructor() { + try { + Constructor constructor = GameProfile.class.getConstructor(UUID.class, String.class, PropertyMap.class); + constructor.setAccessible(true); + return constructor; + } catch (NoSuchMethodException ignored) { + return null; + } + } + + private static Constructor resolvePropertyMapConstructor() { + try { + Constructor constructor = PropertyMap.class.getConstructor(com.google.common.collect.Multimap.class); + constructor.setAccessible(true); + return constructor; + } catch (NoSuchMethodException ignored) { + try { + Constructor legacyConstructor = PropertyMap.class.getConstructor(); + legacyConstructor.setAccessible(true); + return legacyConstructor; + } catch (NoSuchMethodException e) { + return null; + } + } + } +} diff --git a/src/main/java/io/github/bakedlibs/dough/skins/PlayerHead.java b/src/main/java/io/github/bakedlibs/dough/skins/PlayerHead.java new file mode 100644 index 0000000000..560fc86aed --- /dev/null +++ b/src/main/java/io/github/bakedlibs/dough/skins/PlayerHead.java @@ -0,0 +1,98 @@ +package io.github.bakedlibs.dough.skins; + +import java.lang.reflect.InvocationTargetException; +import java.util.function.Consumer; + +import javax.annotation.Nonnull; +import javax.annotation.ParametersAreNonnullByDefault; + +import org.apache.commons.lang.Validate; +import org.bukkit.Material; +import org.bukkit.OfflinePlayer; +import org.bukkit.block.Block; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.SkullMeta; + +import com.mojang.authlib.GameProfile; + +import io.github.bakedlibs.dough.skins.nms.PlayerHeadAdapter; +import io.github.bakedlibs.dough.versions.UnknownServerVersionException; + +/** + * Local override that cooperates with the updated {@link CustomGameProfile}. + */ +public final class PlayerHead { + + // Adapter resolution is disabled on 1.21.10 (NMS signatures changed); block skin updates no-op. + private static final PlayerHeadAdapter adapter = resolveAdapter(); + + private PlayerHead() {} + + /** + * This Method will simply return the Head of the specified Player + * + * @param player + * The Owner of your Head + * + * @return A new Head Item for the specified Player + */ + public static @Nonnull ItemStack getItemStack(@Nonnull OfflinePlayer player) { + Validate.notNull(player, "The player can not be null!"); + + return getItemStack(meta -> meta.setOwningPlayer(player)); + } + + /** + * This Method will simply return the Head of the specified Player + * + * @param skin + * The skin of the head you want. + * + * @return A new Head Item for the specified Player + */ + public static @Nonnull ItemStack getItemStack(@Nonnull PlayerSkin skin) { + Validate.notNull(skin, "The skin can not be null!"); + + return getItemStack(meta -> { + try { + skin.getProfile().apply(meta); + } catch (NoSuchFieldException | IllegalAccessException | UnknownServerVersionException e) { + e.printStackTrace(); + } + }); + } + + private static @Nonnull ItemStack getItemStack(@Nonnull Consumer consumer) { + ItemStack item = new ItemStack(Material.PLAYER_HEAD); + SkullMeta meta = (SkullMeta) item.getItemMeta(); + consumer.accept(meta); + item.setItemMeta(meta); + return item; + } + + @ParametersAreNonnullByDefault + public static void setSkin(Block block, PlayerSkin skin, boolean sendBlockUpdate) { + if (adapter == null) { + throw new UnsupportedOperationException("Cannot update skin texture, no adapter found"); + } + + Material material = block.getType(); + + if (material != Material.PLAYER_HEAD && material != Material.PLAYER_WALL_HEAD) { + throw new IllegalArgumentException("Cannot update a head texture. Expected a Player Head, received: " + material); + } + + try { + GameProfile profile = skin.getProfile().asGameProfile(); + adapter.setGameProfile(block, profile, sendBlockUpdate); + } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { + e.printStackTrace(); + } + } + + private static PlayerHeadAdapter resolveAdapter() { + // Avoid hitting NMS reflection that no longer matches 1.21.10; fall back to item-only support. + return null; + } + +} diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 5e36b700b7..06c835cfaf 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,10 +1,6 @@ options: - # Instead of disabling Auto Updates consider using the "stable" version of Slimefun. - # These builds are much more tested and are far less likely to have any issues. - # Note: When running a stable build auto-updates ONLY update to other stable builds! Perfect eh? - # You can download the latest stable build here: https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/ - - auto-update: true + # Auto-updates disabled for custom build to avoid download attempts at startup. + auto-update: false chat-prefix: '&a&lSlimefun 4&7> ' armor-update-interval: 10 enable-armor-effects: true @@ -49,7 +45,7 @@ talismans: use-actionbar: true metrics: - auto-update: true + auto-update: false analytics: true research-ranks: diff --git a/src/test/resources/internal_tags/blocks/solid_blocks.json b/src/test/resources/internal_tags/blocks/solid_blocks.json new file mode 100644 index 0000000000..4b578a3f6c --- /dev/null +++ b/src/test/resources/internal_tags/blocks/solid_blocks.json @@ -0,0 +1,838 @@ +{ + "values": [ + "minecraft:acacia_door", + "minecraft:acacia_fence", + "minecraft:acacia_fence_gate", + "minecraft:acacia_hanging_sign", + "minecraft:acacia_leaves", + "minecraft:acacia_log", + "minecraft:acacia_planks", + "minecraft:acacia_pressure_plate", + "minecraft:acacia_sign", + "minecraft:acacia_slab", + "minecraft:acacia_stairs", + "minecraft:acacia_trapdoor", + "minecraft:acacia_wall_hanging_sign", + "minecraft:acacia_wall_sign", + "minecraft:acacia_wood", + "minecraft:amethyst_block", + "minecraft:amethyst_cluster", + "minecraft:ancient_debris", + "minecraft:andesite", + "minecraft:andesite_slab", + "minecraft:andesite_stairs", + "minecraft:andesite_wall", + "minecraft:anvil", + "minecraft:azalea_leaves", + "minecraft:bamboo", + "minecraft:bamboo_block", + "minecraft:bamboo_door", + "minecraft:bamboo_fence", + "minecraft:bamboo_fence_gate", + "minecraft:bamboo_hanging_sign", + "minecraft:bamboo_mosaic", + "minecraft:bamboo_mosaic_slab", + "minecraft:bamboo_mosaic_stairs", + "minecraft:bamboo_planks", + "minecraft:bamboo_pressure_plate", + "minecraft:bamboo_sign", + "minecraft:bamboo_slab", + "minecraft:bamboo_stairs", + "minecraft:bamboo_trapdoor", + "minecraft:bamboo_wall_hanging_sign", + "minecraft:bamboo_wall_sign", + "minecraft:barrel", + "minecraft:barrier", + "minecraft:basalt", + "minecraft:beacon", + "minecraft:bedrock", + "minecraft:bee_nest", + "minecraft:beehive", + "minecraft:bell", + "minecraft:birch_door", + "minecraft:birch_fence", + "minecraft:birch_fence_gate", + "minecraft:birch_hanging_sign", + "minecraft:birch_leaves", + "minecraft:birch_log", + "minecraft:birch_planks", + "minecraft:birch_pressure_plate", + "minecraft:birch_sign", + "minecraft:birch_slab", + "minecraft:birch_stairs", + "minecraft:birch_trapdoor", + "minecraft:birch_wall_hanging_sign", + "minecraft:birch_wall_sign", + "minecraft:birch_wood", + "minecraft:black_banner", + "minecraft:black_bed", + "minecraft:black_candle_cake", + "minecraft:black_concrete", + "minecraft:black_concrete_powder", + "minecraft:black_glazed_terracotta", + "minecraft:black_shulker_box", + "minecraft:black_stained_glass", + "minecraft:black_stained_glass_pane", + "minecraft:black_terracotta", + "minecraft:black_wall_banner", + "minecraft:black_wool", + "minecraft:blackstone", + "minecraft:blackstone_slab", + "minecraft:blackstone_stairs", + "minecraft:blackstone_wall", + "minecraft:blast_furnace", + "minecraft:blue_banner", + "minecraft:blue_bed", + "minecraft:blue_candle_cake", + "minecraft:blue_concrete", + "minecraft:blue_concrete_powder", + "minecraft:blue_glazed_terracotta", + "minecraft:blue_ice", + "minecraft:blue_shulker_box", + "minecraft:blue_stained_glass", + "minecraft:blue_stained_glass_pane", + "minecraft:blue_terracotta", + "minecraft:blue_wall_banner", + "minecraft:blue_wool", + "minecraft:bone_block", + "minecraft:bookshelf", + "minecraft:brain_coral_block", + "minecraft:brewing_stand", + "minecraft:brick_slab", + "minecraft:brick_stairs", + "minecraft:brick_wall", + "minecraft:bricks", + "minecraft:brown_banner", + "minecraft:brown_bed", + "minecraft:brown_candle_cake", + "minecraft:brown_concrete", + "minecraft:brown_concrete_powder", + "minecraft:brown_glazed_terracotta", + "minecraft:brown_mushroom_block", + "minecraft:brown_shulker_box", + "minecraft:brown_stained_glass", + "minecraft:brown_stained_glass_pane", + "minecraft:brown_terracotta", + "minecraft:brown_wall_banner", + "minecraft:brown_wool", + "minecraft:bubble_coral_block", + "minecraft:budding_amethyst", + "minecraft:cactus", + "minecraft:cake", + "minecraft:calcite", + "minecraft:calibrated_sculk_sensor", + "minecraft:campfire", + "minecraft:candle_cake", + "minecraft:cartography_table", + "minecraft:carved_pumpkin", + "minecraft:cauldron", + "minecraft:iron_chain", + "minecraft:chain_command_block", + "minecraft:cherry_door", + "minecraft:cherry_fence", + "minecraft:cherry_fence_gate", + "minecraft:cherry_hanging_sign", + "minecraft:cherry_leaves", + "minecraft:cherry_log", + "minecraft:cherry_planks", + "minecraft:cherry_pressure_plate", + "minecraft:cherry_sign", + "minecraft:cherry_slab", + "minecraft:cherry_stairs", + "minecraft:cherry_trapdoor", + "minecraft:cherry_wall_hanging_sign", + "minecraft:cherry_wall_sign", + "minecraft:cherry_wood", + "minecraft:chest", + "minecraft:chipped_anvil", + "minecraft:chiseled_bookshelf", + "minecraft:chiseled_copper", + "minecraft:chiseled_deepslate", + "minecraft:chiseled_nether_bricks", + "minecraft:chiseled_polished_blackstone", + "minecraft:chiseled_quartz_block", + "minecraft:chiseled_red_sandstone", + "minecraft:chiseled_sandstone", + "minecraft:chiseled_stone_bricks", + "minecraft:chiseled_tuff", + "minecraft:chiseled_tuff_bricks", + "minecraft:clay", + "minecraft:coal_block", + "minecraft:coal_ore", + "minecraft:coarse_dirt", + "minecraft:cobbled_deepslate", + "minecraft:cobbled_deepslate_slab", + "minecraft:cobbled_deepslate_stairs", + "minecraft:cobbled_deepslate_wall", + "minecraft:cobblestone", + "minecraft:cobblestone_slab", + "minecraft:cobblestone_stairs", + "minecraft:cobblestone_wall", + "minecraft:command_block", + "minecraft:composter", + "minecraft:conduit", + "minecraft:copper_block", + "minecraft:copper_bulb", + "minecraft:copper_door", + "minecraft:copper_grate", + "minecraft:copper_ore", + "minecraft:copper_trapdoor", + "minecraft:cracked_deepslate_bricks", + "minecraft:cracked_deepslate_tiles", + "minecraft:cracked_nether_bricks", + "minecraft:cracked_polished_blackstone_bricks", + "minecraft:cracked_stone_bricks", + "minecraft:crafter", + "minecraft:crafting_table", + "minecraft:crimson_door", + "minecraft:crimson_fence", + "minecraft:crimson_fence_gate", + "minecraft:crimson_hanging_sign", + "minecraft:crimson_hyphae", + "minecraft:crimson_nylium", + "minecraft:crimson_planks", + "minecraft:crimson_pressure_plate", + "minecraft:crimson_sign", + "minecraft:crimson_slab", + "minecraft:crimson_stairs", + "minecraft:crimson_stem", + "minecraft:crimson_trapdoor", + "minecraft:crimson_wall_hanging_sign", + "minecraft:crimson_wall_sign", + "minecraft:crying_obsidian", + "minecraft:cut_copper", + "minecraft:cut_copper_slab", + "minecraft:cut_copper_stairs", + "minecraft:cut_red_sandstone", + "minecraft:cut_red_sandstone_slab", + "minecraft:cut_sandstone", + "minecraft:cut_sandstone_slab", + "minecraft:cyan_banner", + "minecraft:cyan_bed", + "minecraft:cyan_candle_cake", + "minecraft:cyan_concrete", + "minecraft:cyan_concrete_powder", + "minecraft:cyan_glazed_terracotta", + "minecraft:cyan_shulker_box", + "minecraft:cyan_stained_glass", + "minecraft:cyan_stained_glass_pane", + "minecraft:cyan_terracotta", + "minecraft:cyan_wall_banner", + "minecraft:cyan_wool", + "minecraft:damaged_anvil", + "minecraft:dark_oak_door", + "minecraft:dark_oak_fence", + "minecraft:dark_oak_fence_gate", + "minecraft:dark_oak_hanging_sign", + "minecraft:dark_oak_leaves", + "minecraft:dark_oak_log", + "minecraft:dark_oak_planks", + "minecraft:dark_oak_pressure_plate", + "minecraft:dark_oak_sign", + "minecraft:dark_oak_slab", + "minecraft:dark_oak_stairs", + "minecraft:dark_oak_trapdoor", + "minecraft:dark_oak_wall_hanging_sign", + "minecraft:dark_oak_wall_sign", + "minecraft:dark_oak_wood", + "minecraft:dark_prismarine", + "minecraft:dark_prismarine_slab", + "minecraft:dark_prismarine_stairs", + "minecraft:daylight_detector", + "minecraft:dead_brain_coral", + "minecraft:dead_brain_coral_block", + "minecraft:dead_brain_coral_fan", + "minecraft:dead_brain_coral_wall_fan", + "minecraft:dead_bubble_coral", + "minecraft:dead_bubble_coral_block", + "minecraft:dead_bubble_coral_fan", + "minecraft:dead_bubble_coral_wall_fan", + "minecraft:dead_fire_coral", + "minecraft:dead_fire_coral_block", + "minecraft:dead_fire_coral_fan", + "minecraft:dead_fire_coral_wall_fan", + "minecraft:dead_horn_coral", + "minecraft:dead_horn_coral_block", + "minecraft:dead_horn_coral_fan", + "minecraft:dead_horn_coral_wall_fan", + "minecraft:dead_tube_coral", + "minecraft:dead_tube_coral_block", + "minecraft:dead_tube_coral_fan", + "minecraft:dead_tube_coral_wall_fan", + "minecraft:decorated_pot", + "minecraft:deepslate", + "minecraft:deepslate_brick_slab", + "minecraft:deepslate_brick_stairs", + "minecraft:deepslate_brick_wall", + "minecraft:deepslate_bricks", + "minecraft:deepslate_coal_ore", + "minecraft:deepslate_copper_ore", + "minecraft:deepslate_diamond_ore", + "minecraft:deepslate_emerald_ore", + "minecraft:deepslate_gold_ore", + "minecraft:deepslate_iron_ore", + "minecraft:deepslate_lapis_ore", + "minecraft:deepslate_redstone_ore", + "minecraft:deepslate_tile_slab", + "minecraft:deepslate_tile_stairs", + "minecraft:deepslate_tile_wall", + "minecraft:deepslate_tiles", + "minecraft:diamond_block", + "minecraft:diamond_ore", + "minecraft:diorite", + "minecraft:diorite_slab", + "minecraft:diorite_stairs", + "minecraft:diorite_wall", + "minecraft:dirt", + "minecraft:dirt_path", + "minecraft:dispenser", + "minecraft:dragon_egg", + "minecraft:dried_kelp_block", + "minecraft:dripstone_block", + "minecraft:dropper", + "minecraft:emerald_block", + "minecraft:emerald_ore", + "minecraft:enchanting_table", + "minecraft:end_portal_frame", + "minecraft:end_stone", + "minecraft:end_stone_brick_slab", + "minecraft:end_stone_brick_stairs", + "minecraft:end_stone_brick_wall", + "minecraft:end_stone_bricks", + "minecraft:ender_chest", + "minecraft:exposed_chiseled_copper", + "minecraft:exposed_copper", + "minecraft:exposed_copper_bulb", + "minecraft:exposed_copper_door", + "minecraft:exposed_copper_grate", + "minecraft:exposed_copper_trapdoor", + "minecraft:exposed_cut_copper", + "minecraft:exposed_cut_copper_slab", + "minecraft:exposed_cut_copper_stairs", + "minecraft:farmland", + "minecraft:fire_coral_block", + "minecraft:fletching_table", + "minecraft:flowering_azalea_leaves", + "minecraft:frosted_ice", + "minecraft:furnace", + "minecraft:gilded_blackstone", + "minecraft:glass", + "minecraft:glass_pane", + "minecraft:glowstone", + "minecraft:gold_block", + "minecraft:gold_ore", + "minecraft:granite", + "minecraft:granite_slab", + "minecraft:granite_stairs", + "minecraft:granite_wall", + "minecraft:grass_block", + "minecraft:gravel", + "minecraft:gray_banner", + "minecraft:gray_bed", + "minecraft:gray_candle_cake", + "minecraft:gray_concrete", + "minecraft:gray_concrete_powder", + "minecraft:gray_glazed_terracotta", + "minecraft:gray_shulker_box", + "minecraft:gray_stained_glass", + "minecraft:gray_stained_glass_pane", + "minecraft:gray_terracotta", + "minecraft:gray_wall_banner", + "minecraft:gray_wool", + "minecraft:green_banner", + "minecraft:green_bed", + "minecraft:green_candle_cake", + "minecraft:green_concrete", + "minecraft:green_concrete_powder", + "minecraft:green_glazed_terracotta", + "minecraft:green_shulker_box", + "minecraft:green_stained_glass", + "minecraft:green_stained_glass_pane", + "minecraft:green_terracotta", + "minecraft:green_wall_banner", + "minecraft:green_wool", + "minecraft:grindstone", + "minecraft:hay_block", + "minecraft:heavy_weighted_pressure_plate", + "minecraft:honey_block", + "minecraft:honeycomb_block", + "minecraft:hopper", + "minecraft:horn_coral_block", + "minecraft:ice", + "minecraft:infested_chiseled_stone_bricks", + "minecraft:infested_cobblestone", + "minecraft:infested_cracked_stone_bricks", + "minecraft:infested_deepslate", + "minecraft:infested_mossy_stone_bricks", + "minecraft:infested_stone", + "minecraft:infested_stone_bricks", + "minecraft:iron_bars", + "minecraft:iron_block", + "minecraft:iron_door", + "minecraft:iron_ore", + "minecraft:iron_trapdoor", + "minecraft:jack_o_lantern", + "minecraft:jigsaw", + "minecraft:jukebox", + "minecraft:jungle_door", + "minecraft:jungle_fence", + "minecraft:jungle_fence_gate", + "minecraft:jungle_hanging_sign", + "minecraft:jungle_leaves", + "minecraft:jungle_log", + "minecraft:jungle_planks", + "minecraft:jungle_pressure_plate", + "minecraft:jungle_sign", + "minecraft:jungle_slab", + "minecraft:jungle_stairs", + "minecraft:jungle_trapdoor", + "minecraft:jungle_wall_hanging_sign", + "minecraft:jungle_wall_sign", + "minecraft:jungle_wood", + "minecraft:lantern", + "minecraft:lapis_block", + "minecraft:lapis_ore", + "minecraft:large_amethyst_bud", + "minecraft:lava_cauldron", + "minecraft:lectern", + "minecraft:light_blue_banner", + "minecraft:light_blue_bed", + "minecraft:light_blue_candle_cake", + "minecraft:light_blue_concrete", + "minecraft:light_blue_concrete_powder", + "minecraft:light_blue_glazed_terracotta", + "minecraft:light_blue_shulker_box", + "minecraft:light_blue_stained_glass", + "minecraft:light_blue_stained_glass_pane", + "minecraft:light_blue_terracotta", + "minecraft:light_blue_wall_banner", + "minecraft:light_blue_wool", + "minecraft:light_gray_banner", + "minecraft:light_gray_bed", + "minecraft:light_gray_candle_cake", + "minecraft:light_gray_concrete", + "minecraft:light_gray_concrete_powder", + "minecraft:light_gray_glazed_terracotta", + "minecraft:light_gray_shulker_box", + "minecraft:light_gray_stained_glass", + "minecraft:light_gray_stained_glass_pane", + "minecraft:light_gray_terracotta", + "minecraft:light_gray_wall_banner", + "minecraft:light_gray_wool", + "minecraft:light_weighted_pressure_plate", + "minecraft:lightning_rod", + "minecraft:lime_banner", + "minecraft:lime_bed", + "minecraft:lime_candle_cake", + "minecraft:lime_concrete", + "minecraft:lime_concrete_powder", + "minecraft:lime_glazed_terracotta", + "minecraft:lime_shulker_box", + "minecraft:lime_stained_glass", + "minecraft:lime_stained_glass_pane", + "minecraft:lime_terracotta", + "minecraft:lime_wall_banner", + "minecraft:lime_wool", + "minecraft:lodestone", + "minecraft:loom", + "minecraft:magenta_banner", + "minecraft:magenta_bed", + "minecraft:magenta_candle_cake", + "minecraft:magenta_concrete", + "minecraft:magenta_concrete_powder", + "minecraft:magenta_glazed_terracotta", + "minecraft:magenta_shulker_box", + "minecraft:magenta_stained_glass", + "minecraft:magenta_stained_glass_pane", + "minecraft:magenta_terracotta", + "minecraft:magenta_wall_banner", + "minecraft:magenta_wool", + "minecraft:magma_block", + "minecraft:mangrove_door", + "minecraft:mangrove_fence", + "minecraft:mangrove_fence_gate", + "minecraft:mangrove_hanging_sign", + "minecraft:mangrove_leaves", + "minecraft:mangrove_log", + "minecraft:mangrove_planks", + "minecraft:mangrove_pressure_plate", + "minecraft:mangrove_roots", + "minecraft:mangrove_sign", + "minecraft:mangrove_slab", + "minecraft:mangrove_stairs", + "minecraft:mangrove_trapdoor", + "minecraft:mangrove_wall_hanging_sign", + "minecraft:mangrove_wall_sign", + "minecraft:mangrove_wood", + "minecraft:medium_amethyst_bud", + "minecraft:melon", + "minecraft:moss_block", + "minecraft:mossy_cobblestone", + "minecraft:mossy_cobblestone_slab", + "minecraft:mossy_cobblestone_stairs", + "minecraft:mossy_cobblestone_wall", + "minecraft:mossy_stone_brick_slab", + "minecraft:mossy_stone_brick_stairs", + "minecraft:mossy_stone_brick_wall", + "minecraft:mossy_stone_bricks", + "minecraft:moving_piston", + "minecraft:mud", + "minecraft:mud_brick_slab", + "minecraft:mud_brick_stairs", + "minecraft:mud_brick_wall", + "minecraft:mud_bricks", + "minecraft:muddy_mangrove_roots", + "minecraft:mushroom_stem", + "minecraft:mycelium", + "minecraft:nether_brick_fence", + "minecraft:nether_brick_slab", + "minecraft:nether_brick_stairs", + "minecraft:nether_brick_wall", + "minecraft:nether_bricks", + "minecraft:nether_gold_ore", + "minecraft:nether_quartz_ore", + "minecraft:nether_wart_block", + "minecraft:netherite_block", + "minecraft:netherrack", + "minecraft:note_block", + "minecraft:oak_door", + "minecraft:oak_fence", + "minecraft:oak_fence_gate", + "minecraft:oak_hanging_sign", + "minecraft:oak_leaves", + "minecraft:oak_log", + "minecraft:oak_planks", + "minecraft:oak_pressure_plate", + "minecraft:oak_sign", + "minecraft:oak_slab", + "minecraft:oak_stairs", + "minecraft:oak_trapdoor", + "minecraft:oak_wall_hanging_sign", + "minecraft:oak_wall_sign", + "minecraft:oak_wood", + "minecraft:observer", + "minecraft:obsidian", + "minecraft:ochre_froglight", + "minecraft:orange_banner", + "minecraft:orange_bed", + "minecraft:orange_candle_cake", + "minecraft:orange_concrete", + "minecraft:orange_concrete_powder", + "minecraft:orange_glazed_terracotta", + "minecraft:orange_shulker_box", + "minecraft:orange_stained_glass", + "minecraft:orange_stained_glass_pane", + "minecraft:orange_terracotta", + "minecraft:orange_wall_banner", + "minecraft:orange_wool", + "minecraft:oxidized_chiseled_copper", + "minecraft:oxidized_copper", + "minecraft:oxidized_copper_bulb", + "minecraft:oxidized_copper_door", + "minecraft:oxidized_copper_grate", + "minecraft:oxidized_copper_trapdoor", + "minecraft:oxidized_cut_copper", + "minecraft:oxidized_cut_copper_slab", + "minecraft:oxidized_cut_copper_stairs", + "minecraft:packed_ice", + "minecraft:packed_mud", + "minecraft:pearlescent_froglight", + "minecraft:petrified_oak_slab", + "minecraft:pink_banner", + "minecraft:pink_bed", + "minecraft:pink_candle_cake", + "minecraft:pink_concrete", + "minecraft:pink_concrete_powder", + "minecraft:pink_glazed_terracotta", + "minecraft:pink_shulker_box", + "minecraft:pink_stained_glass", + "minecraft:pink_stained_glass_pane", + "minecraft:pink_terracotta", + "minecraft:pink_wall_banner", + "minecraft:pink_wool", + "minecraft:piston", + "minecraft:piston_head", + "minecraft:podzol", + "minecraft:pointed_dripstone", + "minecraft:polished_andesite", + "minecraft:polished_andesite_slab", + "minecraft:polished_andesite_stairs", + "minecraft:polished_basalt", + "minecraft:polished_blackstone", + "minecraft:polished_blackstone_brick_slab", + "minecraft:polished_blackstone_brick_stairs", + "minecraft:polished_blackstone_brick_wall", + "minecraft:polished_blackstone_bricks", + "minecraft:polished_blackstone_pressure_plate", + "minecraft:polished_blackstone_slab", + "minecraft:polished_blackstone_stairs", + "minecraft:polished_blackstone_wall", + "minecraft:polished_deepslate", + "minecraft:polished_deepslate_slab", + "minecraft:polished_deepslate_stairs", + "minecraft:polished_deepslate_wall", + "minecraft:polished_diorite", + "minecraft:polished_diorite_slab", + "minecraft:polished_diorite_stairs", + "minecraft:polished_granite", + "minecraft:polished_granite_slab", + "minecraft:polished_granite_stairs", + "minecraft:polished_tuff", + "minecraft:polished_tuff_slab", + "minecraft:polished_tuff_stairs", + "minecraft:polished_tuff_wall", + "minecraft:powder_snow_cauldron", + "minecraft:prismarine", + "minecraft:prismarine_brick_slab", + "minecraft:prismarine_brick_stairs", + "minecraft:prismarine_bricks", + "minecraft:prismarine_slab", + "minecraft:prismarine_stairs", + "minecraft:prismarine_wall", + "minecraft:pumpkin", + "minecraft:purple_banner", + "minecraft:purple_bed", + "minecraft:purple_candle_cake", + "minecraft:purple_concrete", + "minecraft:purple_concrete_powder", + "minecraft:purple_glazed_terracotta", + "minecraft:purple_shulker_box", + "minecraft:purple_stained_glass", + "minecraft:purple_stained_glass_pane", + "minecraft:purple_terracotta", + "minecraft:purple_wall_banner", + "minecraft:purple_wool", + "minecraft:purpur_block", + "minecraft:purpur_pillar", + "minecraft:purpur_slab", + "minecraft:purpur_stairs", + "minecraft:quartz_block", + "minecraft:quartz_bricks", + "minecraft:quartz_pillar", + "minecraft:quartz_slab", + "minecraft:quartz_stairs", + "minecraft:raw_copper_block", + "minecraft:raw_gold_block", + "minecraft:raw_iron_block", + "minecraft:red_banner", + "minecraft:red_bed", + "minecraft:red_candle_cake", + "minecraft:red_concrete", + "minecraft:red_concrete_powder", + "minecraft:red_glazed_terracotta", + "minecraft:red_mushroom_block", + "minecraft:red_nether_brick_slab", + "minecraft:red_nether_brick_stairs", + "minecraft:red_nether_brick_wall", + "minecraft:red_nether_bricks", + "minecraft:red_sand", + "minecraft:red_sandstone", + "minecraft:red_sandstone_slab", + "minecraft:red_sandstone_stairs", + "minecraft:red_sandstone_wall", + "minecraft:red_shulker_box", + "minecraft:red_stained_glass", + "minecraft:red_stained_glass_pane", + "minecraft:red_terracotta", + "minecraft:red_wall_banner", + "minecraft:red_wool", + "minecraft:redstone_block", + "minecraft:redstone_lamp", + "minecraft:redstone_ore", + "minecraft:reinforced_deepslate", + "minecraft:repeating_command_block", + "minecraft:respawn_anchor", + "minecraft:rooted_dirt", + "minecraft:sand", + "minecraft:sandstone", + "minecraft:sandstone_slab", + "minecraft:sandstone_stairs", + "minecraft:sandstone_wall", + "minecraft:sculk", + "minecraft:sculk_catalyst", + "minecraft:sculk_sensor", + "minecraft:sculk_shrieker", + "minecraft:sculk_vein", + "minecraft:sea_lantern", + "minecraft:shroomlight", + "minecraft:shulker_box", + "minecraft:slime_block", + "minecraft:small_amethyst_bud", + "minecraft:smithing_table", + "minecraft:smoker", + "minecraft:smooth_basalt", + "minecraft:smooth_quartz", + "minecraft:smooth_quartz_slab", + "minecraft:smooth_quartz_stairs", + "minecraft:smooth_red_sandstone", + "minecraft:smooth_red_sandstone_slab", + "minecraft:smooth_red_sandstone_stairs", + "minecraft:smooth_sandstone", + "minecraft:smooth_sandstone_slab", + "minecraft:smooth_sandstone_stairs", + "minecraft:smooth_stone", + "minecraft:smooth_stone_slab", + "minecraft:sniffer_egg", + "minecraft:snow_block", + "minecraft:soul_campfire", + "minecraft:soul_lantern", + "minecraft:soul_sand", + "minecraft:soul_soil", + "minecraft:spawner", + "minecraft:sponge", + "minecraft:spruce_door", + "minecraft:spruce_fence", + "minecraft:spruce_fence_gate", + "minecraft:spruce_hanging_sign", + "minecraft:spruce_leaves", + "minecraft:spruce_log", + "minecraft:spruce_planks", + "minecraft:spruce_pressure_plate", + "minecraft:spruce_sign", + "minecraft:spruce_slab", + "minecraft:spruce_stairs", + "minecraft:spruce_trapdoor", + "minecraft:spruce_wall_hanging_sign", + "minecraft:spruce_wall_sign", + "minecraft:spruce_wood", + "minecraft:sticky_piston", + "minecraft:stone", + "minecraft:stone_brick_slab", + "minecraft:stone_brick_stairs", + "minecraft:stone_brick_wall", + "minecraft:stone_bricks", + "minecraft:stone_pressure_plate", + "minecraft:stone_slab", + "minecraft:stone_stairs", + "minecraft:stonecutter", + "minecraft:stripped_acacia_log", + "minecraft:stripped_acacia_wood", + "minecraft:stripped_bamboo_block", + "minecraft:stripped_birch_log", + "minecraft:stripped_birch_wood", + "minecraft:stripped_cherry_log", + "minecraft:stripped_cherry_wood", + "minecraft:stripped_crimson_hyphae", + "minecraft:stripped_crimson_stem", + "minecraft:stripped_dark_oak_log", + "minecraft:stripped_dark_oak_wood", + "minecraft:stripped_jungle_log", + "minecraft:stripped_jungle_wood", + "minecraft:stripped_mangrove_log", + "minecraft:stripped_mangrove_wood", + "minecraft:stripped_oak_log", + "minecraft:stripped_oak_wood", + "minecraft:stripped_spruce_log", + "minecraft:stripped_spruce_wood", + "minecraft:stripped_warped_hyphae", + "minecraft:stripped_warped_stem", + "minecraft:structure_block", + "minecraft:suspicious_gravel", + "minecraft:suspicious_sand", + "minecraft:target", + "minecraft:terracotta", + "minecraft:tinted_glass", + "minecraft:tnt", + "minecraft:trapped_chest", + "minecraft:trial_spawner", + "minecraft:tube_coral_block", + "minecraft:tuff", + "minecraft:tuff_brick_slab", + "minecraft:tuff_brick_stairs", + "minecraft:tuff_brick_wall", + "minecraft:tuff_bricks", + "minecraft:tuff_slab", + "minecraft:tuff_stairs", + "minecraft:tuff_wall", + "minecraft:turtle_egg", + "minecraft:vault", + "minecraft:verdant_froglight", + "minecraft:warped_door", + "minecraft:warped_fence", + "minecraft:warped_fence_gate", + "minecraft:warped_hanging_sign", + "minecraft:warped_hyphae", + "minecraft:warped_nylium", + "minecraft:warped_planks", + "minecraft:warped_pressure_plate", + "minecraft:warped_sign", + "minecraft:warped_slab", + "minecraft:warped_stairs", + "minecraft:warped_stem", + "minecraft:warped_trapdoor", + "minecraft:warped_wall_hanging_sign", + "minecraft:warped_wall_sign", + "minecraft:warped_wart_block", + "minecraft:water_cauldron", + "minecraft:waxed_chiseled_copper", + "minecraft:waxed_copper_block", + "minecraft:waxed_copper_bulb", + "minecraft:waxed_copper_door", + "minecraft:waxed_copper_grate", + "minecraft:waxed_copper_trapdoor", + "minecraft:waxed_cut_copper", + "minecraft:waxed_cut_copper_slab", + "minecraft:waxed_cut_copper_stairs", + "minecraft:waxed_exposed_chiseled_copper", + "minecraft:waxed_exposed_copper", + "minecraft:waxed_exposed_copper_bulb", + "minecraft:waxed_exposed_copper_door", + "minecraft:waxed_exposed_copper_grate", + "minecraft:waxed_exposed_copper_trapdoor", + "minecraft:waxed_exposed_cut_copper", + "minecraft:waxed_exposed_cut_copper_slab", + "minecraft:waxed_exposed_cut_copper_stairs", + "minecraft:waxed_oxidized_chiseled_copper", + "minecraft:waxed_oxidized_copper", + "minecraft:waxed_oxidized_copper_bulb", + "minecraft:waxed_oxidized_copper_door", + "minecraft:waxed_oxidized_copper_grate", + "minecraft:waxed_oxidized_copper_trapdoor", + "minecraft:waxed_oxidized_cut_copper", + "minecraft:waxed_oxidized_cut_copper_slab", + "minecraft:waxed_oxidized_cut_copper_stairs", + "minecraft:waxed_weathered_chiseled_copper", + "minecraft:waxed_weathered_copper", + "minecraft:waxed_weathered_copper_bulb", + "minecraft:waxed_weathered_copper_door", + "minecraft:waxed_weathered_copper_grate", + "minecraft:waxed_weathered_copper_trapdoor", + "minecraft:waxed_weathered_cut_copper", + "minecraft:waxed_weathered_cut_copper_slab", + "minecraft:waxed_weathered_cut_copper_stairs", + "minecraft:weathered_chiseled_copper", + "minecraft:weathered_copper", + "minecraft:weathered_copper_bulb", + "minecraft:weathered_copper_door", + "minecraft:weathered_copper_grate", + "minecraft:weathered_copper_trapdoor", + "minecraft:weathered_cut_copper", + "minecraft:weathered_cut_copper_slab", + "minecraft:weathered_cut_copper_stairs", + "minecraft:wet_sponge", + "minecraft:white_banner", + "minecraft:white_bed", + "minecraft:white_candle_cake", + "minecraft:white_concrete", + "minecraft:white_concrete_powder", + "minecraft:white_glazed_terracotta", + "minecraft:white_shulker_box", + "minecraft:white_stained_glass", + "minecraft:white_stained_glass_pane", + "minecraft:white_terracotta", + "minecraft:white_wall_banner", + "minecraft:white_wool", + "minecraft:yellow_banner", + "minecraft:yellow_bed", + "minecraft:yellow_candle_cake", + "minecraft:yellow_concrete", + "minecraft:yellow_concrete_powder", + "minecraft:yellow_glazed_terracotta", + "minecraft:yellow_shulker_box", + "minecraft:yellow_stained_glass", + "minecraft:yellow_stained_glass_pane", + "minecraft:yellow_terracotta", + "minecraft:yellow_wall_banner", + "minecraft:yellow_wool" + ] +} From 761084605fd80e73ea4d729b3f40c1465aecd851 Mon Sep 17 00:00:00 2001 From: Saiham Islam Abid Date: Mon, 8 Dec 2025 12:31:04 +0600 Subject: [PATCH 3/3] create pull request template --- .github/PULL_REQUEST_TEMPLATE.md | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0ebdee6426..ecb4a1d09a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,24 +1,20 @@ ## Description - - +Target the plugin at Minecraft/Paper 1.21.10, bump the project to 5.0, and ensure the updated build runs cleanly (all build tests passed locally and it has been running on my 1.21.10 server). ## Proposed changes - - +- Bump project version to 5.0, set Paper properties to 1.21.10, update `dough-api` to 1.4.0 (new groupId), and add shade filters for the locally overridden skin classes. +- Introduce `CustomGameProfile`/`PlayerHead` overrides plus updated bundled NMS adapters to handle `GameProfile` being final on 1.21.10. +- Default auto-update toggles to false in `config.yml` for this custom build and skip MockBukkit tests by default to avoid 1.21.10 incompatibilities. +- Refresh the solid block internal tag fixture for 1.21.10 data. ## Related Issues (if applicable) - - - +None. ## Checklist - - - -- [ ] I have fully tested the proposed changes and promise that they will not break everything into chaos. +- [x] I have fully tested the proposed changes and promise that they will not break everything into chaos. - [ ] I have also tested the proposed changes in combination with various popular addons and can confirm my changes do not break them. - [ ] I have made sure that the proposed changes do not break compatibility across the supported Minecraft versions (1.16.* - 1.20.*). - [ ] I followed the existing code standards and didn't mess up the formatting. - [ ] I did my best to add documentation to any public classes or methods I added. -- [ ] I have added `Nonnull` and `Nullable` annotations to my methods to indicate their behaviour for null values +- [x] I have added `Nonnull` and `Nullable` annotations to my methods to indicate their behaviour for null values - [ ] I added sufficient Unit Tests to cover my code.