Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom banners patterns cause several bugs and crashes. (MC 1.20.5/1.20.6) #10677

Open
david85258 opened this issue May 9, 2024 · 1 comment
Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. type: bug Something doesn't work as it was intended to. upstream: bukkit Issues exists in Bukkit and/or CraftBukkit. upstream: spigot Issues exists in Spigot. version: 1.20.6 Game version 1.20.6

Comments

@david85258
Copy link

david85258 commented May 9, 2024

Stack trace

Forcing a timings report (Waiting 5 minutes cause the same result): https://paste.gg/p/anonymous/8fe00967c3d24d70b17da9c80831912a

Modify a BannerMeta of a Banner with a custom pattern: https://paste.gg/p/anonymous/bca4815e992041d698dbfcf0e5173bfb

Changing the slot of the banner with a custom pattern: https://paste.gg/p/anonymous/c2bdb4fa3a984863ac2750af121287f7

Plugin and Datapack List

Server Plugins (1):
Bukkit Plugins:

  • Test

There are 4 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)], [file/many-more-banners-v0.2.2.zip (world)]

Actions to reproduce (if known)

In All

Add a data pack that's add custom patterns (like this)

Timings

Give a banner with a custom pattern (from the data pack "/give @s minecraft:black_banner[minecraft:banner_patterns=[{pattern:'mmb:anchor',color:'red'}]]")
Place the banner and wait to timings collect the data. (Can be forced cause using "/timings report")
Video: https://youtu.be/DP30mUcqIzs?si=dt4w9vNn1aZT3Qxr

BannerMeta

Create a plugin that's modify the BannerMeta of a banner and modify the data of a banner with a custom pattern.

ItemMeta itemMeta = p.getInventory().getItemInMainHand().getItemMeta();
if (itemMeta instanceof BannerMeta bannerMeta){
    bannerMeta.addPattern(new Pattern(DyeColor.RED, PatternType.CREEPER));
    ItemStack item = p.getInventory().getItemInMainHand();
    item.setItemMeta(bannerMeta);
    p.getInventory().setItemInMainHand(item);
}

Video: https://youtu.be/k93NWKhxX8E?si=x2NJHBXrjSTJJe8x

Handle packet

Give a banner with a custom pattern (from the data pack "/give @s minecraft:black_banner[minecraft:banner_patterns=[{pattern:'mmb:anchor',color:'red'}]]")
Move the item in the inventory.
Video: https://www.youtube.com/watch?v=JO2bKsEw5FA

Paper version

version
[13:49:34 INFO]: Checking version, please wait...
[13:49:34 INFO]: This server is running Paper version git-Paper-53 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 5729b29)
You are running the latest version

Other

No response

@papermc-sniffer papermc-sniffer bot added the version: 1.20.6 Game version 1.20.6 label May 9, 2024
@electronicboy electronicboy added upstream: spigot Issues exists in Spigot. upstream: bukkit Issues exists in Bukkit and/or CraftBukkit. labels May 9, 2024
@electronicboy
Copy link
Member

From the looks of this, this is generally down to spigot not properly adopting upstream changes for the past 10 years, this is fixable in the long run, but not really sure of a good short term solution here which isn't just replacing this API

@Machine-Maker Machine-Maker added status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. type: bug Something doesn't work as it was intended to. labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. type: bug Something doesn't work as it was intended to. upstream: bukkit Issues exists in Bukkit and/or CraftBukkit. upstream: spigot Issues exists in Spigot. version: 1.20.6 Game version 1.20.6
Projects
Status: ✅ Accepted
Development

No branches or pull requests

4 participants