#paper

1 messages ยท Page 9 of 1

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

OpenJDK has fixed the bug causing us to have to double-check in certain scenarios.
Tested on pterodactyl (where this issue was discovered) using the snippet below.
The snippet returns uid 0 for a non-root user on jdk 17. On jdk 21 (the requirement as of 1.20.5) it returns the correct, non-zero uid.

class PermsCheck {
  public static void main(String[] args) {
    System.out.println("id is " + new com.sun.security.auth.module....
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Re-creating this pull request because it was on the wrong branch last time and it was automatically closed. I run a small Minecraft server, and we've been running into issues with the book size check. After struggling to find a suitable configuration, I've made this patch, which allows an admin to disable the book size check by setting page-max in paper-global.yml to -1. This should also fix issue https://github.com/PaperMC/Paper/issues/10354.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

While using this following command in
Vanilla: summon creeper ~ ~ ~ {ExplosionRadius:-1b,Fuse:0} will create an explosion
Paper: summon creeper ~ ~ ~ {ExplosionRadius:-1b,Fuse:0} the creeper will not explode

This is commonly used in Player Launch Datapack

Observed/Actual behavior

The creeper should explode, applying the motion to player

Steps/models to reproduce

Use this command: summon creeper ~ ~ ~ {ExplosionRadius:-1b,Fuse:0}
While Explosio...

rustic folioBOT
#

Expected behavior

With this following code used for randomizing value between 1-3

{ "type": "minecraft:empty", "pools": [ { "rolls": { "min": 1, "max": 3 }, "entries": [ { "type": "minecraft:item", "name": "stone", "functions": [ { **"function": "minecraft:set_count", "count": 0** } ] } ] } ] }

When using "function": "minecraft:set_count", and count to 0 in , it should return a value of d...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Would fix #10443 if done.

This is a rough proposal for abstracting over the brains AI system for mobs for plugins to make use of, similar to the Goals API. I don't think it's feasible to attempt to make the new AI conform to the old interfaces.

At the moment I understand the rough skeleton and arteries of the system, though I'm still trying to piece together what does what in user-facing terms. 'get the mob to walk somewhere' has been unsuccessful so far.

As far as API stability conc...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Hopper transfers 64 items.

Observed/Actual behavior

Hopper only transfers 2 items.

Steps/models to reproduce

https://i.imgur.com/H3RMjBC.mp4

Plugin and Datapack List

none

Paper version

> ver
[08:13:42 INFO]: Checking version, please wait...
[08:13:44 INFO]: This server is running Paper version git-Paper-"8454786" (MC: 1.20.5) (Implementing API version 1.20.5-R0.1-SNAPSHOT) (Git: 8454786 on dev/1.20.5)
Error obtaining version information
...
#
[PaperMC/Paper] branch deleted: dev/1.20.5
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

https://github.com/PaperMC/Paper/commit/1444b3632e68ceb2e258e9cf733493a26a81d0ae#r141429072

How to reproduce it

final Scoreboard scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();
final Objective objective = scoreboard.registerNewObjective("test", Criteria.DUMMY, Component.empty());
objective.numberFormat(NumberFormat.styled(Style.style().color(NamedTextColor.BLUE).build())); // call asVanilla
objective.numberFormat(); // call asAdventure
Caused by:...
rustic folioBOT
#

Expected behavior

Fireworks created with the following code can be used to call Paper API that require conversion to CraftBukkit/NMS.

ItemStack firework = new ItemStack(Material.FIREWORK_ROCKET);
firework.editMeta(FireworkMeta.class, meta -> meta.setPower(1));

Observed/Actual behavior

In my case, when calling ItemStack#serializeAsBytes, it throws NullPointerException (Full stacktrace).

M...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Since 1.20.5, there's a item-name data component for ItemStacks. Spigot added ItemMeta#setItemName(String) method, however, there also should be one for Adventure components.

Describe the solution you'd like.

ItemMeta#itemName(Component)

Describe alternatives you've considered.

Using internals or (terrible solution) LegacyComponentSerializer and ItemMeta#setItemName.

Other

No response

rustic folioBOT
rustic folioBOT
#

Stack trace

$ ./gradlew applyPatches && ./gradlew createReobfBundlerJar && start .

Configure project :
paperweight-core v1.6.2 (running on 'Windows 11')
Submodule path 'work/BuildData': checked out 'a7f7c2118b877fde4cf0f32f1f730ffcdee8e9ee'
Submodule path 'work/Bukkit': checked out '304e83eb384c338546aa96eea51388e0e8407e26'
Submodule path 'work/CraftBukkit': checked out '91b1fc3f1cf89e2591367dca1fa7362fe376f289'
Submodule path 'work/Spigot': checked out 'b698b49caf14f97a717afd6...

rustic folioBOT
rustic folioBOT
#

Expected behavior

Yaml itemstacks are broken (for books)

Observed/Actual behavior

[11:54:29 ERROR]: [org.bukkit.configuration.serialization.ConfigurationSerialization] Could not call method 'public static org.bukkit.inventory.meta.ItemMeta org.bukkit.craftbukkit.inventory.SerializableMeta.deserialize(java.util.Map) throws java.lang.Throwable' of class org.bukkit.craftbukkit.inventory.SerializableMeta for deserialization
java.lang.NullPointerException: Cannot invoke "java.lang.Bool...

rustic folioBOT
#
this.resolved = SerializableMeta.getBoolean(map, CraftMetaBookSigned.RESOLVED.BUKKIT); // Paper - General ItemMeta fixes
        Integer generation = SerializableMeta.getObject(Integer.class, map, CraftMetaBookSigned.GENERATION.BUKKIT, true);
        this.generation = generation != null ? generation : 0;

This is the proper fix

#

looks like both are affected, this is why i asked for a yaml file

I managed to pinpoint the issue, its a signed book created by a plugin, so it only has these fields set in the yml:

    '27':
      ==: org.bukkit.inventory.ItemStack
      v: 2586
      type: WRITTEN_BOOK
      meta:
        ==: ItemMeta
        meta-type: BOOK_SIGNED
        display-name: 
        lore:
        ItemFlags:
        PublicBukkitValues:
        title:
 ...
#

also, whats the best way to disable auto remapping? its breaking plugins

java.lang.ExceptionInInitializerError: null
at CalendarEvents (2).jar/me.nikl.calendarevents.EventListener.<init>(EventListener.java:41) ~[CalendarEvents (2).jar:?]
at CalendarEvents (2).jar/me.nikl.calendarevents.EventsManager.<init>(EventsManager.java:45) ~[CalendarEvents (2).jar:?]
at CalendarEvents (2).jar/me.nikl.calendarevents.CalendarEvents.onEnable(CalendarEvents.java:43) ~[Calendar...

#

also, whats the best way to disable auto remapping? its breaking plugins

java.lang.ExceptionInInitializerError: null at CalendarEvents (2).jar/me.nikl.calendarevents.EventListener.(EventListener.java:41) ~[CalendarEvents (2).jar:?] at CalendarEvents (2).jar/me.nikl.calendarevents.EventsManager.(EventsManager.java:45) ~[CalendarEvents (2).jar:?] at CalendarEvents (2).jar/me.nikl.calendarevents.CalendarEvents.onEnable(CalendarEvents.java:43) ~[CalendarEvents (2).jar:?] at org.bukkit.pl...

rustic folioBOT
rustic folioBOT
#

Expected behavior

In 1.20.4 it was possible to use itemMeta.addItemFlags(ItemFlag.values()) to hide all item tooltips.

Observed/Actual behavior

The item tooltips are still present, and the returned item will cause an error while chunk saving, entity saving or using /paper dump item: https://pastebin.com/raw/sWPARh80

Steps/models to reproduce

Just get the "broken" item using something like

  @EventHandler(priority = EventPriority.MONITOR)
  public void listen(final @...
rustic folioBOT
#

Duplicate entries detected means a plugin (in this case PAPIProxyBridge) is shading classes multiple times, they should fix that/join paper-dev for help.

The version of PlaceholderAPI you are using also contains unsupported parsing code, though I think they fixed that in an update. The same applies to InventoryRollbackPlus and WanderingTrades. Make sure you are up to date (!) and if they still don't work, report it to the plugin authors: https://forums.papermc.io/threads/important-dev-ps...

#

Expected behavior

Item serialization to yaml should work

Observed/Actual behavior

java.lang.IllegalStateException: List must have contents; List must have contents
at com.mojang.serialization.DataResult$Error.getOrThrow(DataResult.java:275) ~[datafixerupper-7.0.14.jar:?]
at org.bukkit.craftbukkit.inventory.CraftMetaItem.serialize(CraftMetaItem.java:1719) ~[paper-1.20.5.jar:git-Paper-"37b3891"]
at org.bukkit.craftbukkit.inventory.CraftMetaPotion.serialize(...

#

Please provide example code on how to generate this item stack. This is a issue-rich time for paper, creating replication code would be great to get such issues sorted out quickly.

It would be nice if there was some kind of debug message when an itemstack is failed to serialize, that outputs its nbt? Its very difficult to determine which item is failing serialization/deserialization

#

Expected behavior

Command to not error and give you the player head

Observed/Actual behavior

When command is run this error is given: Malformed 'minecraft:profile' component: 'Not a string; Player name contained disallowed characters: '''

Steps/models to reproduce

Run Command: `give @p minecraft:player_head[minecraft:custom_name='"Basketball"',minecraft:profile={name:"",properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZ...

#

I was able to dump some of the problematic area (unhandledTags):

unhandledTags: {minecraft:can_break->Optional[AdventureModePredicate{predicates=[], showInTooltip=false}], minecraft:can_place_on->Optional[AdventureModePredicate{predicates=[], showInTooltip=false}]}

java.lang.IllegalStateException: List must have contents; List must have contents
at com.mojang.serialization.DataResult$Error.getOrThrow(DataResult.java:275) ~[datafixerupper-7.0.14.jar:?]
at org.bukkit.cra...

#

Adds a simple disguise api that also makes sure that invalid entity data, not belonging to the type that is faked, is filtered.
It also adds a server generator module to reduce maintenance of the entity data filter.

TODO:

  • [ ] figure out how to get teams working with real teams, client side ones worked in my fork
  • [ ] remove test plugin code
  • [ ] comment paper-server-generator
  • [ ] discuss if common generator code should be move to a separate module to reduce duplications
rustic folioBOT
rustic folioBOT
#

After the initial round of internal discussion, this is a tricky issue.
Remapping every library is annoying given this is mostly used for thirdparty libraries unrelated to minecraft (think kotlin standard library, hikaricp or the likes).

Remapping all of these libraries and their dependencies is a huge waste of disk space and computing power.

This might end up with us having to put some work on the shoulders of said library developers to include a similar "opt-in" to being remapp...

rustic folioBOT
#
[PaperMC/Paper] New branch created: discussions
rustic folioBOT
#
[PaperMC/Paper] New branch created: fix/discussion-template-file-name
rustic folioBOT
#
[PaperMC/Paper] New branch created: library-reflection
rustic folioBOT
#
[PaperMC/Paper] New branch created: feature/snbt-serialization
rustic folioBOT
#
[PaperMC/Paper] branch deleted: library-reflection
rustic folioBOT
#
[PaperMC/Paper] New branch created: remap-libraries-specifying-spigot-ns
rustic folioBOT
#

Probably, however, out of 90 plugins, the one and only one that just needs to be added so that the server crashes when starting with openJ9 is Spark. So it's obvious that there is a problem with this particular plugin.
Whether it is related to an environment or not, my server is far from being the only one to be affected by this problem (and it is not hosted by a small host that no one knows...). Just type the keywords into Google to find out, in addition to the link I provided above.

I...

rustic folioBOT
#

Expected behavior

in BaseTag, the method isTagged(T) parameter name is "item" which is confusing, because it also applies to entity types now

Observed/Actual behavior

N/A

Steps/models to reproduce

N/A

Plugin and Datapack List

N/A

Paper version

This server is running Paper version git-Paper-"4491ac0" (MC: 1.20.5) (Implementing API version 1.20.5-R0.1-SNAPSHOT) (Git: 4491ac0)
You are 9 version(s) behind
Download the new version at: https://papermc.io/downloads/pap...

#

With plugins adopting paperweights mapping namespaces in their manifest file in and after paper 1.20.5, incorrectly spelled namespaces previously were simply implied as the spigot namespace.

This commit properly ensures plugin authors are using a known mapping namespace in their manifest, avoiding down the line confusion on incorrect remapping behaviour.

The commit also fixes two incorrect log parameters.

rustic folioBOT
#

Expected behavior

Being able to put SWEEPING_EDGE on a Sword / Item.

Observed/Actual behavior

Other enchants seem to work just fine, but when applying SWEEPING_EDGE, it will result in an error: https://pastebin.com/raw/J6kTz7wL

Steps/models to reproduce

Something like

  @EventHandler(priority = EventPriority.MONITOR)
  public void listen(final @NotNull PlayerJumpEvent event) {
    final @NotNull ItemStack itemStack = new ItemStack(Material.DIAMOND_SWORD);
    itemSta...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I am not able to get this to work in vanilla singleplayer 1.20.4. I placed the blocks like in your screenshot and filled the hopper and dropper with the same items. However, nothing happens. The comparator just stays powered all the time.

Are there any additional steps required to get this to work? Is there anything else I should look for other than the power of the comparator?

#

This feels a little bit too ambiguous. Is it removing the patch? Is it removing it entirely? Even if specified in javadoc, it will be often forgotten.

Maybe instead of remove method, it could be:

  • set(Key, null) - forces the absence of the data ("!minecraft:tool")
  • reset(Key) - removes the patch/resets to vanilla (default) value
  • unset(DataKey.NonValued) - forces the absence of the key (no unit value in nms)
#

What exactly is the bug you are experiencing here? Listening to packets is not part of the Paper API. If something behaves weirdly there or breaks, its due to whatever you or ProtocolLib are doing with that packet. I am also not really able to see any obvious issue in your video.

Generally, the server will send inventory packets more often than required in a lot of cases to reduce the potential of desync, so just the ClientboundContainerSetSlotPacket getting sent while not required is not something that needs to be fixed.
We also would need to rule out that this is a ProtocolLib issue - sometimes just listening to a packet can have weird side effects. You could use a client-side packet logger for that.

rustic folioBOT
#

If the remapped version hasn't changed however, there is a good (in my experience 75%) chance that it will work.

I don't think this is a good metric to use if you are basing it off of probabilities. Internals can change at any time even within a minecraft version, that's why they are called internals, and not API. Paper can make changes to internal mechanisms within a version's lifespan. The best way to know that no changes have been made to logic that is unmodified by paper, is the actual minecraft version. That has a 100% chance of changing whenever anything mojang writes changes, and a 0% chance of changing when mojang doesn't change anything.

rustic folioBOT
rustic folioBOT
#

Expected behavior

Stone in stonecutter input slot

Observed/Actual behavior

No item in stonecutter input slot

Steps/models to reproduce

public void openStonecutterGUI(Player player) {
Inventory inventory = Bukkit.createInventory(null, InventoryType.STONECUTTER, "text");
ItemStack stone = new ItemStack(Material.STONE);
inventory.setItem(0, stone);
player.openInventory(inventory);
}

Plugin and Datapack List

no additional

Paper version

This server is running Paper version git-Paper-334 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 47b2c18)\nYou are 162 version(s) behind\nDownload the new version at: https://papermc.io/downloads/paper

Other

i have also tried setting the item after the inventory is opened, same issue:

public void openStonecutterGUI(Player player) {
Inventory inventory = Bukkit.createInventory(null, InventoryType.STONECUTTER, "text");
ItemStack stone = new ...

rustic folioBOT
#

Expected behavior

1.20.5 introduced new gamerule spawnChunkRadius that can manage how many of spawn chunks should be always loaded. When setting to 0, no spawn chunks should be loaded.

Observed/Actual behavior

Gamerule keeps resetting back to 2 after each server restart.

Steps/models to reproduce

  1. Set gamerule to different setting than 2 (i.e. /execute in minecraft:overworld run gamerule spawnChunkRadius 0 or /gamerule spawnChunkRadius 0
  2. Restart the server
  3. Check gamerule - it resets back to 2 (i.e. /execute in minecraft:overworld run gamerule spawnChunkRadius or /gamerule spawnChunkRadius

Plugin and Datapack List

[23:17:10 INFO]: Bukkit Plugins:
[23:17:10 INFO]: - antiRedstoneClock, ChestShop, Citizens, ClearLag, CMI, CMILib, DeluxeMenus, DeluxeTags, DropEdit2, Duels
[23:17:10 INFO]: Factions, FastAsyncWorldEdit, Funkcijos, IllegalStack, InteractionVisualizer, LiteBans, LuckPerms, Multiverse-Core, OldCombatMechanics, PilisV2
[23:17:10 IN...

rustic folioBOT
#
[PaperMC/Paper] New branch created: update/1.20.6
rustic folioBOT
#
[PaperMC/Paper] branch deleted: update/1.20.6
#
[PaperMC/Paper] New branch created: update-upstream
#

Expected behavior

According to the wiki, creatures spawned using a Bucket of <creature> should be marked as persistent and not despawn. Note this seems to be a bug within vanilla Minecraft itself. I have also reported this to Mojang here.

Observed/Actual behavior

Placing creatures via Bucket of <name> doesn't properly give them the persistent tag, leading to them quickly despawning.

The fish didn't spawn with the persistent tag regardless of survival or creative, or whether placing the animal into water that was already there. It doesn't matter whether the item was obtained from the creative inventory, or was an empty bucket that later picked up a fish. It affects buckets of cod, salmon, tropical fish, pufferfish, axolotl, and tadpole.

Steps/models to reproduce

  1. Place a bucket of <creature>.
  2. Run /data get entity @e[limit=1,sort=nearest,type=!player]
  3. Note that the tag "PersistenceRequired" is equ...
rustic folioBOT
#

General changes:

  • DataKey -> DataComponentType (legit just went with vanilla names, we can trim names if need be)
  • PatchedDataComponentMap no longer has remove, but has unset, and reset. Which I think make the most sense in this case.
    • Reset will remove the patch present on the map
    • Unset will unset it (so, like !minecraft:tool)
  • ItemStack now implements PatchedDataKeyMapHolder which contains methods like setData which can be accessed on ItemStack directly, rather than needing to call components() evey time

Builder Types:

  • Unbreakable: Unbreakable.unbreakable().showInTooltip(false).build()
  • ItemLore: ItemLore.lore().lore(List.of(Component.text("h"))).build()

It should be noted that there are builder for most components for not-simple future-proofing. Advanced objects that might hold a bit more context to them...

Additionally it helps gain a little more power in the data component API (such has being able to get the style...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

ItemFlags set on an ItemStack are persisted and respected

Observed/Actual behavior

ItemFlags are only persisted and respected if the associated data is on the item.

example: Adding ItemFlag.HIDE_ENCHANTS does not get set/persisted if there are no enchantments on the ItemStack

Steps/models to reproduce

  1. Create and ItemStack
  2. Set an itemFlag which the stack doesn't have data for (ie ItemFlag.HIDE_ENCHANTS)
  3. Print out the set flags on the ItemStack

Plugin and Datapack List

Every plugin running is private but here is the list
[09:12:59 INFO]: Server Plugins (4):
[09:12:59 INFO]: Bukkit Plugins:
[09:12:59 INFO]: - EasyCommands, LocalMarket, RPG, YamlSaver

Paper version

[09:13:07 INFO]: Checking version, please wait...
[09:13:08 INFO]: This server is running Paper version git-Paper-27 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 937a67a)

Other

I have a feeling that this is a result of the backend da...

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: pw-163
rustic folioBOT
#

They definitely disappeared from my aquarium I built, but it's possible they simply died. I'm not sure what specifically you mean by "Setting that tag isn't the only thing the game uses to know if the entity can be despawned." Are you saying the presence of the FromBucket:1b tag or some other tag is enough to prevent it from despawning?

From the wiki:

Tropical fish caught in buckets then released do not despawn, unlike mobs that spawn naturally in their aquatic environments.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Bed explode after trying to use it in the Nether

Observed/Actual behavior

Bed breaks when trying to use it in the Nether

Steps/models to reproduce

Create a server on Aternos.org, use Paper MC software 1.20.6, try to use a bed in the Nether.

Plugin and Datapack List

Vanilla (built-in), file/bukkit(world), paper(built-in)

Paper version

This server is running Paper version git-Paper-28 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 8c058f8)
You are running the latest version
Previous version: git-Paper-25 (MC: 1.20.6)

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Thats's not how it works. It should update comparator constantly. Like, when hopper tries to get item from dropper it updates dropper => comparator updates. The vanilla hopper logic marks the source inventory as changed even if no item is moved out of it. That causes comparator updates constantly. It not visible in game. I'll send a video.

Possible solution:
Add to the hopper pull method

container.setChanged();

rustic folioBOT
rustic folioBOT
#

Expected behavior

getPower() should return 1.0 at maximum bow tension

Observed/Actual behavior

getPower() at maximum bow tension returns the value 3

Steps/models to reproduce

run method getPower() in EntityShootBowEvent

Plugin and Datapack List

example plugin for send getPower() to chat

Paper version

This server is running Paper version git-Paper-22 (MC: 1.20.5) (Implementing API version 1.20.5-R0.1-SNAPSHOT) (Git: 8f7ac62)

Other

power is limited to 3.0 and not 1.0

rustic folioBOT
rustic folioBOT
#

Depends. You need to duplicate the perfectly working vanilla system (having another time check, changing equipment on some entities, controlling bat's spawn rules and keeping track of changes in the future) while also not having any communication with other plugins.

I'd love for plugins to be able to add features during Halloween while also providing a ground to control it from one place (Paper's a good source to depend on, unlike some obscure plugin). I don't think maintaining this is much of a pain.
Feel free to close if doomed unwanted though.

rustic folioBOT
#

Expected behavior

In vanilla or spigot worlds a saved Chunk in a region files has 24 sections

Observed/Actual behavior

In paper a saved Chunk in a region file has 25 sections

Steps/models to reproduce

  1. Setup server
  2. Start server
  3. Open any region file using an NBT viewer

Plugin and Datapack List

none, just the server

Paper version

image

Other

I'm not sure if this could be considered a bug or if that is intended behaviour, some clarification would be great.

rustic folioBOT
#

Expected behavior

EntityLoadCrossbowEvent setConsumeItem values should work as follows
true; consumes an item from the inventory
false: does not consume item from the inventory

Observed/Actual behavior

EntityLoadCrossbowEvent item consumption is working the opposite

Steps/models to reproduce

@EventHandler
public void onLoadCrossbow(EntityLoadCrossbowEvent event) {
    event.setConsumeItem(false);
}

Plugin and Datapack List

This happens with no plugins installed

With a simple plugin with just the eventhandler above you can get the crossbow to comsume items

Paper version

[15:51:46 INFO]: This server is running Paper version git-Paper-34 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 544ce20)

Other

No response

rustic folioBOT
rustic folioBOT
#

Expected behavior

I expected using Component.translatable(...) would work on Sign blocks. Using server-side translations with GlobalTranslator should show the translated text to the client in a line of a Sign that uses that implementation of Component.

Observed/Actual behavior

In lines that uses TranslatableComponent, it only shows the translation key as text instead of the actual translation from ResourceBundle. I've checked the keys and they're all correct. Styles as color and decorations work well, only the text shown is the problem.
imagem_2024-05-01_174404945

Steps/models to reproduce

Just get a Sign block from a World and try to use Component.translatable(...) to write some of its lines. Update the Sign using the SignSide method.

Here is my code:

MinigameInfo info = minigame.getInfo();
Component[] lines = new Component[4];
lines[0] = Component.text(info.name() ...

rustic folioBOT
#

Expected behavior

Adding lines of lore to a minecraft:shield in different ticks should work

Observed/Actual behavior

After setting the lore of a minecraft:shield in one tick you can no longer modify or clear the lore in following ticks

Steps/models to reproduce

// excerpt from test plugin using a command system

        public boolean runCommand(Player player) {
            ItemStack stack = player.getInventory().getItemInMainHand();
            ItemMeta meta = stack.getItemMeta();
            List<Component> lore = meta.lore();
            if(lore == null || lore.isEmpty()) {
                System.out.println("lore empty, adding line");
                lore = new LinkedList<>();
                lore.add(Component.text("This is lore line "+(lore.size() + 1)));
            } else {
                System.out.println("lore not empty, clearing");
                lore = null;
            }
            meta.lore(lore);
            stack.setItemMeta(met...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
66fd94322 SPIGOT-7652: Remove remap for SPELL_MOB_AMBIENT which no longer exists ecfa4f973 SPIGOT-7654: ItemStack#isSimilar does not work with empty BlockStateMeta 4460ecc49 SPIGOT-7655: ItemMeta#addItemFlags(ItemFlag.HIDE_ATTRIBUTES) not working when no attribute modifiers set 5d84f48a4 SPIGOT-7653: Update ApiVersion.CURRENT with latest version and include tests

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Timings or Profile link

N/A

Description of issue

Upon examining (after getting rate limited lol), I noticed paper nodes are making mojang api calls upon every player join which was interesting to me as velocity should forward all of this info.

Upon digging deeper I realized this is completely redundant.

ServerLoginPacketListenerImpl#callPlayerPreLoginEvents(GameProfile) gets called on all occasions, upon forwarding using velocity, or just generic standalone paper.

What's interesting is that the this call always gets executed even when it shouldn't need to.

image
image

This call ultimately results in either;
#1 The usercache needing to lookup this gameprofile again
#2 A mojang api call (this is the main issue, however saving some CPU usage in case #1 is also nice).

If y...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

I noticed that paper 1.20.6 has something called "PluginRemapper" now. I don't quite understand yet what exactly it does, but I found it surprising that it casually overwrites the original .jar files in the plugins folder. None of the paper/spigot, forks has done it before, including paper and spigot itself. That's why I find this behavior not ideal: I don't expect the server software to modify other server's executable files in such an intrusive way.

Describe the solution you'd like.

Instead of modifying the original .jar files, I would rather prefer the PluginRemapper to write the modified files somewhere else, e.g. /cache/paper/remapped-plugins, and load modified plugins from there.

Describe alternatives you've considered.

As far as I understand, there's no way to alternate PluginRemapper's behavior to handle this issue at the moment.

Other

Also, I would like to note that when Mohist did a similar thing in the...

#

The plugin remaps a jar from spigots mappings over to papers (and redirects reflective calls to a tool intended to remap those); I wasn't aware that it modified jars in the plugins folder, that's news to me

(I'd also clarify that mohist wasn't remapping jars, they where downloading a jar off a 3rd party server to replace a jar you installed, entirely different scope of issues)

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

outdated info is, afaik, generally not updated unless something goes out of it's way to do that. There is generally no manner in which this method is called in which we're not just calling complete because we're expecting a new game profile, or that we're trying to recycle something old; I don't think that this will generally have an impact on anything reasonable

Indeed shouldn't, you could make the argument that you'd want to validate the gameprofile every time a user swaps sub-servers (which I wouldn't want, as a server owner), but there is very little reason to have this. If a user wanted to stay online with an expired profile they could also just not swap subservers ๐Ÿคท

rustic folioBOT
#

I marked this as low priority, because the fix for this is currently pretty ugly as it would require re-creating specific packets for each player instead of using the same packet data for all players it's being sent to. The reason this same problem doesn't apply to other areas, is that the text is "translated" as it's written to the bytebuf, so after the packet has been created. It's very possible mojang will also change block entities to a similar system in the future, and this is more feasible then. You can see where I got to on this branch.

rustic folioBOT
#

Looking into the code I don't think it makes sense to address this functionality before we converted the Biome enum to a class (I think this is going to happen). Right now, you cannot directly add this method to Biome so you would have to add it to World. And this is ugly considering its just a temporary "fix" until we get BiomeType.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Applying this attribute should hide weapon damage in tooltip

Observed/Actual behavior

It doesn't

Steps/models to reproduce

meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES)

Plugin and Datapack List

N/A

Paper version

This server is running Paper version git-Paper-"0db72ac" (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 0db72ac)
You are running the latest version
Previous version: git-Paper-"8f7ac62" (MC: 1.20.5)

Other

No response

rustic folioBOT
rustic folioBOT
#

Stack trace

paste your stack trace or a paste.gg link here!

Plugin and Datapack List

paper 1.20.6 server
kicked client minecraft 1.20.2
kicker client Forge 1.20.1 version of forge 47.1.46

Actions to reproduce (if known)

load a crossbow with a specrtal arrow in paper server mc version 1.20.6 and shoot it at a player. the player will be arrow banned off the server

Paper version

Unknown im not the owner

Other

image

rustic folioBOT
rustic folioBOT
#

Expected behavior

When flying around alone on a server, I expect the chunks that I pass to eventually unload.

Observed/Actual behavior

Once they're loaded, chunks never unload as shown by the /paper chunkinfo command. (inactive)
image

/paper holderinfo also shows the unloadable, but not unloaded chunks.
image

Essentials /gc does show a normal count though (around 200 for 1 player)

Steps/models to reproduce

What I did is:

  • Create a new server with paper 1.20.4 build 496
  • Execute /paper chunkinfo to get a baseline
  • Execute /save-off
  • Fly around in creative a little
  • Execute /paper chunkinfo again to see the "inactive" count filling up without it ever going down. /paper holderinfo also shows some important info

Bonus: execute /save-on and watch the unloa...

rustic folioBOT
#

Expected behavior

Commands should not be logged if disabled in spigot.yml (commands.log)

Observed/Actual behavior

Commands are indeed logged

Steps/models to reproduce

disable commands.log in spigot.yml
execute a command

Plugin and Datapack List

[17:31:30 INFO]: Server Plugins (7):
[17:31:30 INFO]: Paper Plugins:
[17:31:30 INFO]: - Commander, HologramAPI, Protect, Tweaks, Worlds
[17:31:30 INFO]: Bukkit Plugins:
[17:31:30 INFO]: - FastAsyncWorldEdit, LuckPerms

datapack list
[17:31:33 INFO]: There are 6 data pack(s) enabled: [trade_rebalance (feature)], [bundle (feature)], [vanilla (built-in)], [file/bukkit (world)], [file/tectonic.zip (world)], [paper (built-in)]
[17:31:33 INFO]: There are no more data packs available

Paper version

git-Paper-37 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 156675c)

Other

Fixed this issue once
https://github.com/PaperMC/Paper/pull/8624

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: feature/RegistryAccess
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

My problem is caused by the fact that the blocks are replaced either with stone or with already prepared ones, and I want that the replacement will look natural

Describe the solution you'd like.

I want the blocks that need to be hidden to be replaced by those blocks that are on the bottom or if there is empty, then with the block that is on the side or on top

Describe alternatives you've considered.

I tried using Orebfuscator and decided to switch to RayCastAntiXray and it doesn't have such a feature as I wont

Other

For exmple this is without antixray
photo_5310101465613853004_y
photo_5310101465613853007_y

This is paper angine mod 1
![photo_5310101465613853005_y](https://github.com/PaperMC/Paper/assets/65243837/12f0607a-da2...

rustic folioBOT
rustic folioBOT
#

Expected behavior

Using shears on a wolf with armor should drop the armor.

Observed/Actual behavior

Using shears on a wolf with armor removes armor but the armor disappears.

Steps/models to reproduce

User armor on a tamed wolf. Use shears to remove armor. The armor is removed and disappears.

Plugin and Datapack List

PaperTweaks
Celeste
Chunky
floodgate
Gyser-Spigot
Gwarp
ViaBackwards
ViaVersion

Paper version

This server is running Paper version git-Paper-36 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 0db72ac)
You are 3 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: git-Paper-26 (MC: 1.20.6)

Other

No response

#

Stack trace

[20:51:10 ERROR]: Error sending packet clientbound/minecraft:disconnect (skippable? false)
io.netty.handler.codec.EncoderException: Sending unknown packet 'clientbound/minecraft:disconnect'
        at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:46) ~[paper-1.20.6.jar:git-Paper-38]
        at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:20) ~[paper-1.20.6.jar:git-Paper-38]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:26) ~[paper-1.20.6.jar:git-Paper-38]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:12) ~[paper-1.20.6.jar:git-Paper-38]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty....
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Spawn eggs shouldn't lose data after using them

Observed/Actual behavior

Spawn eggs do lose data after using them

Steps/models to reproduce

  1. Give yourself a custom spawn egg, e.g. /give @p chicken_spawn_egg[entity_data={id:"minecraft:cow"}]
  2. Use the spawn egg once and notice how a cow is spawned
  3. Use the spawn egg a second time and it will now spawn a chicken

Plugin and Datapack List

No plugins or data packs

Paper version

This server is running Paper version git-Paper-40 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 7401313)
You are running the latest version
Previous version: git-Paper-462 (MC: 1.20.4)

Other

No response

rustic folioBOT
#

The craftbukkit implementation stores the old and new data patch of an item during ItemStack#useOn(UseOnContext) to properly cancel events via comparison and change detection of the component patch.

However, it uses #getComponentsPatch to fetch the new stack component patch, which always yields an empty patch set if an itemstack is considered empty by the game.
As the restoration of an itemstack's count to its previous state is handled after the entire ItemStack#useOn method, items used in creative mode temporarily have a count of zero, which causes craftbukkit to consider their new component patch as EMPTY even tho said item may have data.
The new patch is applied and, after useOn completes, the count is reset if the player is in creative mode, leading to lost data.

This commit fixes said inconsistency by directly accessing the components of the item via components#asPatch, storing the proper component patch even for an item that temporarily has a count of zero.

Resolves...

rustic folioBOT
#

Expected behavior

shouldn't consume arrow

Observed/Actual behavior

it consumes it

Steps/models to reproduce

cancel entity bow shoot event

Plugin and Datapack List

N/A

Paper version

This server is running Paper version git-Paper-"0db72ac" (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 0db72ac)
You are 5 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: git-Paper-"8f7ac62" (MC: 1.20.5)

Other

No response

rustic folioBOT
#

Expected behavior

If you have an item with NBT within a shulker serialized into yaml, after deserialization the item should have nbt?

Observed/Actual behavior

All items in the shulker are stripped of nbt (yikes)

Steps/models to reproduce

Serialize itemstack to yml

Plugin and Datapack List

N/A

Paper version

This server is running Paper version git-Paper-"7ae2c67" (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 7ae2c67)
You are running the latest version
Previous version: git-Paper-"0db72ac" (MC: 1.20.6)

Other

No response

#

Stumbled on that as well. I experienced it without plugins, using runDev via IDE. Server was in startup and my client pinged the server fairly early using the mulitplayer serverlist actively spamming the refresh.

I can replicate that, so it may be the same issue however it's not exclusive to server start up as I've had it occur long after. I cannot replicate it after startup, but I am locally hosting so that's probably why.

#
[PaperMC/Paper] branch deleted: update-upstream
rustic folioBOT
#

Going to close this as WAI. Mojang really should add a way to hide attributes without having to copy over the default attributes for an item type. We have no interesting in maintaining a hacky fix where we implicitly do that copying over if someone sets the hide flag, and we don't want to keep upstream's broken fix that just deletes all implicit attribute modifiers for items.

rustic folioBOT
rustic folioBOT
#

@ThrowerWay can you clarify what you mean by "an item with NBT"? I tested this by putting 2 stacks in an anvil and renaming them, then putting them in a shulker. after serializing to yaml and back, they still had the custom names. Did you mean actually "custom" nbt, like in the custom_data component?

Some exact reproduction steps would be good, cause I can't seem to reproduce this.

try upgrading from 1.20.4, by custom nbt i mean, lore, display name, enchants, persistant data container etc.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

If the server reaches the maximum of players, all other players should be disconnected.

Observed/Actual behavior

e.g. i send 4 players on a velocity server onto another backend server with maximum of 2 players, all 4 players can connect.

Steps/models to reproduce

Setup a network with velocity and two backend servers
set the maximum players of the other server than the lobby to e.g. 2
send more than 2 players to the backend server with the maximum players of 2

Plugin and Datapack List

image
image

[00:11:37] [Server thread/INFO]: Server Plugins (8):
[00:11:37] [Server thread/INFO]: Paper Plugins:
[00:11:37] [Server thread/INFO]: - SignedVelocity
[00:11:37] [Server thread/INFO]: Bukkit Plugins:
[00:11:37] [Server thread/INFO]: - CloudNet-Bridge, FastAsyncWo...

rustic folioBOT
#

Adds a cancellable event that gets fired whenever a dispenser would spawn a entity (mainly useful for projectiles and primed tnt).

Workarounds for this would involve cancelling the entire event per item stack which in my opinion is not the best solution. Another workaround would be to use ASM or similar to manually adjust the source code. Or one could use NMS to manually override the dispense behaviors, which would be more effort over all though.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Yes, i could do that, but i will only have access to exactly the item using that approach. And for what i want to do i need access to the entity created when dispensed and the dispenser itself. Correct me if i'm wrong, but ItemDispenseEvent only gives access to the item.

And i would need to replicate the entire logic for entity spawning through dispensed items (e.g. eggs, tnt, arrow and so on) for it to be accurate.

The other way that i'm aware of is using ASM or mixins or similar to achieve this or to use NMS and to re-register all the dispenseBehaviors with altered code.

rustic folioBOT
#

Expected behavior

I expect this method to work like on 1.20.4

Observed/Actual behavior

When using the hover event to show item, the vanilla/base item is shown, and no modifications are show (ex: enchantments, display name).
<img width="288" alt="Screenshot 2024-05-06 at 9 32 07โ€ฏAM" src="https://github.com/PaperMC/Paper/assets/20008482/901268f4-b0ec-4411-870a-408b4196f5d2">

Steps/models to reproduce

Test Code:

ItemStack itemStack = new ItemStack(Material.DIAMOND);
itemStack.editMeta(itemMeta -> {
    itemMeta.displayName(Component.text("Mr Diamond"));
    itemMeta.addEnchant(Enchantment.SHARPNESS, 3, true);
});
TextComponent letsSeeThatItem = Component.text("lets see that item");
BinaryTagHolder binaryTagHolder = BinaryTagHolder.binaryTagHolder(itemStack.getItemMeta().getAsString());
HoverEvent.ShowItem showItem = HoverEvent.ShowItem.showItem(itemStack.getType().key(), 1, binaryTagHolder);
TextComponent textComponent = letsSeeThatItem.hoverEvent(...
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: fix-ping-event
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: bugfix/fix-invalid-holder-comparison-in-beacon-fix
#
[PaperMC/Paper] branch deleted: bugfix/fix-invalid-holder-comparison-in-beacon-fix
rustic folioBOT
#

Just noting here for prosperity, we had a bit of an internal discussion regarding this and generally posit that the better idea would be to make the stack itself store the SNBT and get ItemMeta out of the picture, that way we stay closer to what vanilla is doing here and have something we can almost directly just pass into DFU/DataConvertor without worrying how broken ItemMeta is, especially when it comes to the upgrade path (or complete lackthereof)

rustic folioBOT
#

Good catch, though I believe it needs to be re-added in the other branch of the if-statement. But you could also drop the if-statement and just do

final LiteralArgumentBuilder<CommandSourceStack> builder = Commands.literal(aliasLiteral)
    .executes(redirectTo.getCommand())
    .redirect(redirectTo)
    .requires(redirectTo.getRequirement())
for (final CommandNode<CommandSourceStack> child : redirectTo.getChildren()) {
    builder.then(child);
}

return this.registerIntoDispatcher(new PluginCommandNode(aliasLiteral, plugin, builder.build(), description), override);
rustic folioBOT
#

Just noting here for prosperity, we had a bit of an internal discussion regarding this and generally posit that the better idea would be to make the stack itself store the SNBT and get ItemMeta out of the picture, that way we stay closer to what vanilla is doing here and have something we can almost directly just pass into DFU/DataConvertor without worrying how broken ItemMeta is, especially when it comes to the upgrade path (or complete lackthereof)

Do you mean a format similar to

item:
  ==: org.bukkit.inventory.ItemStack
  version: 3839
  id: minecraft:shulker_box
  count: 1
  components:
    minecraft:container:
    - slot: 0
      item:
        id: minecraft:oak_log
        count: 64
    - slot: 1
      item:
        id: minecraft:oak_log
        count: 64
    - slot: 2
      item:
        id: minecraft:oak_log
        count: 64
    - slot: 3
      item:
        id: minecraft:oak_log
        count: 64
    - slot: 4
      item:
        id:...
#

Related to #10405 (and various other console issues, such as being unable to run the jar on windows without a terminal)

There are various libraries relating to our logging + terminal framework which are outdated, updating this stuff may aid with mitigating this. Creating this issue as a reminder unless somebody wants to take over the assignment.

rustic folioBOT
rustic folioBOT
#

Need to also look into log4j, but, so far

  1. Updated to jline-terminal 3.26.1 - jline, however, has deprecated their jansi provider,
    and so, we're going back to JNA. FFM looks interesting, but, might not work on java 21,
    and, seems to requore some additional java flags to open stuff up to allow it to work,
    however, seemed to work without on macOS?

  2. added a hackaround to try to migate the terminal issues we're facing on windows, will
    probably look towards adding a detection step for PS7 so we can disable the hack, but,
    in the meantime, this at least works around the issue.

(Closes #10674)
(Closes #10405)
Cross ref: https://github.com/jline/jline3/issues/952

rustic folioBOT
#
The command source type for Brigadier commands registered using Paper API.

<p>While the general use case for CommandSourceStack is similar to that of {@link CommandSender}, it provides access to important additional context for the command execution. Specifically, commands such as {@literal /execute} may alter the location or executor of the source stack before passing it to another command.</p>
#
Vanilla Minecraft includes several custom {@link ArgumentType}s that are recognized by the client. Many of these argument types include client-side completions and validation, and some include command signing context.

<p>This class allows creating instances of these types for use in plugin commands, with friendly API result types.</p>

<p>{@link CustomArgumentType} is provided for customizing parsing or result types server-side, while sending the vanilla argument type to the client.</p>
rustic folioBOT
#

Expected behavior

I wish PluginRemapper could be switched off in paper-global.yml or somewhere else, because in version 1.20.6 I found a lot of plugins being switched off due to problems caused by Remapper!

Observed/Actual behavior

[ModernPluginLoadingStrategy] Could not load plugin 'PlaceholderAPI.jar' in folder 'plugins.paper-remapped'
org.bukkit.plugin.InvalidPluginException: java.lang.ExceptionInInitializerError
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:127) ~[paper-1.20.6.jar:git-Paper-53]
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:35) ~[paper-1.20.6.jar:git-Paper-53]
at io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:116) ~[paper-1.20.6.jar:git-Paper-53]
at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(Sim...

#

Plugin & Datapack List
none

I find that really hard to believe seeing as the error provided is because of plugin loading.

[13:55:40 ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'LoaderLib.jar' in folder 'plugins.paper-remapped'
org.bukkit.plugin.InvalidPluginException: Cannot find main class `me.loader.Loader'
at org.bukkit.plugin.java.PluginClassLoader.(PluginClassLoader.java:80) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:123) ~[paper-1.20.6.jar:git-Paper-53]
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:35) ~[paper-1.20.6.jar:git-Paper-53]
at io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:116) ~[paper-1.20.6.jar:git-Paper-53]
at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimplePr...

#

Plugin & Datapack List
none

I find that really hard to believe seeing as the error provided is because of plugin loading.

There are some plug-ins that will lead to a lack of class files after being remapper, this problem will be very serious, not only will lead to the MD5 file has been modified, but also may make the plug-in author think that you may be in the magic of his plug-ins, and some plug-ins are not allowed to be remapper, be removed will be less class files.

rustic folioBOT
rustic folioBOT
#

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 d...

rustic folioBOT
#

Expected behavior

I expect to see a inv with my contents. However I get kicked every time I try to open it.

Observed/Actual behavior

Player got kicked from server

Steps/models to reproduce

inventory.setItem(x, ItemStack);

Plugin and Datapack List

only my own plugin and Spark

Paper version

1.20.6

Other

[10:45:10 ERROR]: Error sending packet clientbound/minecraft:container_set_content (skippable? false)
io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:container_set_content'
at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:53) ~[paper-1.20.6.jar:git-Paper-53]
at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:20) ~[paper-1.20.6.jar:git-Paper-53]
at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:26) ~[paper-1.20.6.jar:git-Paper-53]
at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:12) ~[paper-1.20....

#
[PaperMC/Paper] New branch created: timings/use-internals
#

For a long time I've been meaning to move some of this logic internally as this would allow us to avoid hitting systems like block state snapshots which can create issues as many of the spigot implementations of this stuff are increasingly broken, leading to unexpected crashes during ticking, even if the API cannot properly interact with these such states/items, it's generally more preferable to not crash the server in the course, and just let those interactions fail more gracefully.

#
[PaperMC/Paper] New branch created: profiles
#

Is your feature request related to a problem?

sometimes I need to stop the server immediately while startup and to do this I need to kill the process but it is not a good way to shutdown the server shutdown

Describe the solution you'd like.

make the server listen for the "stop" command while startup and if the "stop" command is executed, the server immediately shuts down.

Describe alternatives you've considered.

killing the server process in the terminal but it is not a good way to shutdown the server.

Other

No response

#

sending stop to a sane console while the process is starting up will allow the command to be read as soon as the console is actively starting, adding extra stop points would just be pointlessly invasive for generally 0 gain, as we'd need to figure out how to manage to tear it back down properly in whatever state you're in, which is just not worth it or viable for a process

#

it would require us to have logic in order to hijack the console before the actual console takes over, there is just little gain, and that does not solve the logic of how to shut down properly in any such state, the only known state we know how to shutdown from is when the server is ready to start ticking, and by that point, we already have a fully established terminal which will read any existing command you sent to it from (unless, you're using windows)

rustic folioBOT
#

PlaceholderAPI is parsing the Craftbukkit package to determine the Minecraft version. However, Craftbukkit package relocation has been removed in recent versions of Paper, so this no longer works. This has been anounced quite a while ago so there was sufficient time to prepare for this change.
PlaceholderAPI has already updated to support this. You currently need to use the dev builds, which you can download here. Using the dev build, PAPI loads fine on latest Paper 1.20.6

I am unable to find "LoaderLib" anywhere online, only a Fabric mod of the same name. We would need that plugin to reproduce the issue.

rustic folioBOT
#

Expected behavior

Players can spectate entities without getting timed out.

Observed/Actual behavior

Players that spectate entities, without sending other packets (commands e.g.) get timed out after ~30 seconds.

Steps/models to reproduce

  • Enter spectator mode
  • Left-click target entity or use the /spectate command
  • Wait ~30 seconds without sending any other packets to the server (commands e.g.)

Plugin and Datapack List

  • Plugins: None
  • Datapacks: vanilla, file/bukkit, paper

Paper version

Paper version git-Paper-54 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: f2512b1)

Other

No response

rustic folioBOT
#

Expected behavior

All modifiers added by /attribute are removed upon death

Observed/Actual behavior

The modifiers added by /attribute to still exist after rebirth

Steps/models to reproduce

  1. run /attribute @s minecraft:generic.armor modifier add 1-0-0-0-0 "" 1 add_value
  2. run /attribute @s minecraft:generic.armor modifier value get 1-0-0-0-0
  3. run /kill @s
  4. Respawn
  5. Run again /attribute @s minecraft:generic.armor modifier value get 1-0-0-0-0

Plugin and Datapack List

plugins
[10:43:44 INFO]: Server Plugins (0):

datapack list
[10:44:13 INFO]: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
[10:44:13 INFO]: There are no more data packs available

Paper version

version
[10:44:27 INFO]: Checking version, please wait...
[10:44:28 INFO]: This server is running Paper version git-Paper-55 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 1b67e02)
You are running the latest...

rustic folioBOT
rustic folioBOT
#

Stack trace

[paste your stack trace or a paste.gg link here!](https://paste.gg/p/anonymous/ee895ee8a955477fb29e73a49ce0692e)

Plugin and Datapack List

[07:45:04 INFO]: Server Plugins (59):
[07:45:04 INFO]: Bukkit Plugins:
[07:45:04 INFO]: - AdvancedChests, antiRedstoneClock, BetterRTP, *BukkitHiddenSyntaxBlocker, ChatFeelings, ChatGames-Premium, ChestShop, Chunky, Citizens, ClientDetector
[07:45:04 INFO]: CMI, CMILib, CoreProtect, DatabaseDrivers, DecentHolograms, Denizen, EpicElevatorSystem, EpicJoschDEUtils, EpicMarketSystem, EpicPlotSystem
[07:45:04 INFO]: EpicVoteSystem, FastAsyncWorldEdit, floodgate, GSit, HeadDatabase, JumpAndRun, JumpPads, LootConomy, LuckPerms, MineGPT
[07:45:04 INFO]: Multiverse-Core, NBTAPI, NeoPerformance, NexEngine, PlaceholderAPI, Plan, PlotSquared, PocketGames, ProCosmetics, ProtocolLib
[07:45:04 INFO]: PvPManager, SelectionVisualizer, ServerBackup, SimplePortals, SimpleScore, SkinsRestorer, spark, TAB, TabTPS, Vault
[...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Moving an item in an inventory shouldn't change the item data

Observed/Actual behavior

Moving an item with attribute_modifiers:{show_in_tooltip: 0b, modifiers:[]} removes the attribute_modifiers component and the tooltip will become visible

Steps/models to reproduce

  1. Use the command /give @p netherite_chestplate[minecraft:attribute_modifiers={show_in_tooltip:0b,modifiers:[]}] to give yourself a custom chestplate which hides the armor info
  2. Pick the item up with your cursor and place it in the inventory again
  3. Notice how the armor info will now be shown
  4. You can use /data get entity @s SelectedItem to see that the attribute_modifiers component was deleted

Plugin and Datapack List

No plugins or data packs

Paper version

This server is running Paper version git-Paper-60 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 4fd58a1)
You are running the latest version
Previous version: git-Paper-40 (MC: 1.20.6)

...

rustic folioBOT
rustic folioBOT
#

Expected behavior

Player slowly loses health upon exiting the border, the damage gradually increasing with the distance traveled

Observed/Actual behavior

Player dies instantly

Steps/models to reproduce

Exit the world border by any means, in the following clip I used an Ender Pearl: https://youtube.com/clip/UgkxpLiVhNci-DqPA0DaZ_em7i99NGBNLSiR?si=q1sc3_W_-WuS4Ns3

Plugin and Datapack List

BisectHosting, Chunky, Graves, InstantRestock, NationsDeathBan, ProtocolLib, ViaBackwards, ViaVersion, voicechat

Paper version

Unsure, all I know is that it's an experimental 1.20.6 build.

Other

No response

#

I want to hide the custom tooltip from tools and weapons. The only working way I found so far in 1.20.6 was setting the attribute component like this, or is there another way?

By setting the modifiers to an empty list like you are doing in your example, you aren't just hiding the attribute modifiers, you are removing any implicit ones. Various item types have implicit attribute modifiers and if the data component exists on the itemstack, those will be used over the implicit ones. And since you set it to an empty list, the stack will have no attributes at all.

rustic folioBOT
#

Oh I see. I added the empty list, since the command won't work without specifying a modifier. So I guess 1.20.6 has nothing comparable to /give @p diamond_sword{HideFlags:2} which just hides the attribute tooltip without changing them?

I came across this error, since neither the ItemFlag HIDE_ATTRIBUTES, nor HIDE_ADDITIONAL_TOOLTIPS nor all flags all at once hide the attribute tooltip anymore, which worked in 1.20.4, and I thought this might be the root of the problem.

Anyway, it's still a bug that on a paper server the empty modifier list gets removed completely after interacting with the item, which doesn't happen in vanilla.

rustic folioBOT
#

Addressed issue with experience orbs by filtering them out. Mentioned that exclusion in the JavaDoc.

Additionally found an issue with ElderGuardian when disguising them as a Player on the client side. That happens only when the ElderGuardian is in the water. First thought is the ElderGuardian stream sucking health from other entities. To be sure I need to deobf the client stacktrace.

Failed to handle packet adm@395c0068
java.lang.ClassCastException: class gct cannot be cast to class ckb (gct and ckb are in unnamed module of loader 'app')
	at fxy.a(SourceFile:1068)
	at adm.a(SourceFile:41)
	at adm.a(SourceFile:13)
	at zz.a(SourceFile:25)
	at bpm.d(SourceFile:162)
	at bpq.d(SourceFile:23)
	at bpm.A(SourceFile:136)
	at bpm.bA(SourceFile:121)
	at ffh.c(SourceFile:1275)
	at ffh.f(SourceFile:888)
	at net.minecraft.client.main.Main.main(SourceFile:265)
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Hi, thank you for your PR ๐ŸŽ‰

Could you please elaborate on the usage of this API over simply listening to the respective events (Combust, HangingBreak, DamageEvent) which all expose the lightning strike entity?

For me it is better to use more "direct" way to somehow ignore other entities than to check with EntityDamageByEntityEvent, of course it could be done just with this event.

I would be more in favor of an event fired right before the lighting searches for an entity to hit to configure the parameters for that search or even to specify a specific entity before the search even happens. That seems more useful to me.

That's good idea, I'll look how could I make it.

rustic folioBOT
#

That's ClientPacketListener handleEntityEvent, Player can't be cast to Guardian

Found the reason why. I basically moved away from the entity, the chunk or at least the entities got unloaded.
Due to the state that the disguise data is not persisted on the entity, when loading the entity again it published itself to the client without the disguise info. The client knows the entity uuid only as the disguised type but gets the original one.

I updated the test plugin snippet to reflect the needed change - cache cleaning on death excluded.

It would be way better to persist the disguise data in NBT to avoid manual caching per plugin.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
fa99e752 PR-1007: Add ItemMeta#getAsComponentString()
94a91782 Fix copy-pasted BlockType.Typed documentation
9b34ac8c Largely restore deprecated PotionData API
51a6449b PR-1008: Deprecate ITEMS_TOOLS, removed in 1.20.5
702d15fe Fix Javadoc reference
42f6cdf4 PR-919: Add internal ItemType and BlockType, delegate Material methods to them
237bb37b SPIGOT-1166, SPIGOT-7647: Expose Damager BlockState in EntityDamageByBlockEvent 035ea146 SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it
8c7880fb PR-1004: Improve field rename handling and centralize conversion between bukkit and string more
87c90e93 SPIGOT-7650: Add DamageSource for EntityDeathEvent and PlayerDeathEvent

CraftBukkit Changes:
4af0f22e8 SPIGOT-7664: Item meta should prevail...

rustic folioBOT
#

Is your feature request related to a problem?

Currently, only InventoryMoveItemEvent can detect when an item in Hopper moves.
In that event, it was previously answered in this issue that it is not possible to manipulate the number of items in paper.
https://github.com/PaperMC/Paper/issues/10434

Currently, in Spigot, it is possible to manipulate the number of items in the hopper and connected inventory using this event.

When Hopper operates, the act of manipulating an item is a very important event for the Storage plugin.
By doing so, it is possible to further increase the ways to play RedStone in-game, such as automatic item production equipment.

On the server I manage, White Carpet alone handles 20 billion items.
I created a storage plugin called StorageSign to manage those items.
If it's true, I would like to use paper on the 55 servers I manage to save weight, but due to this I can't use it and I'm having a lot of trouble.

Describe the solution you'd l...

rustic folioBOT
rustic folioBOT
#

This bug appears to be fixed for armor, but it still persists for tools and weapons. Here the used give commands:
/give @p minecraft:diamond_pickaxe[minecraft:attribute_modifiers={show_in_tooltip:0b,modifiers:[]}]
/give @p minecraft:diamond_sword[minecraft:attribute_modifiers={show_in_tooltip:0b,modifiers:[]}]
/give @p minecraft:diamond_horse_armor[minecraft:attribute_modifiers={show_in_tooltip:0b,modifiers:[]}]
These items have the same problem that the data changes after picking it up with the cursor and placing it again in the inventory.

/give @p minecraft:shield[minecraft:attribute_modifiers={show_in_tooltip:0b,modifiers:[]}]
Shields have an even weirder problem, which can be seen with /data get entity @s SelectedItem. After picking it up the first time, the attribute_modifiers component disappears and instead the panner_patterns component with an empty list appears. After picking the shield up a second time, this component also disappears.

rustic folioBOT
#

Shields have an even weirder problem, which can be seen with /data get entity @s SelectedItem. After picking it up the first time, the attribute_modifiers component disappears and instead the panner_patterns component with an empty list appears. After picking the shield up a second time, this component also disappears.

This is a separate, more complicated issue. You can open a new issue with this as the subject. It was not fixed in a61d58d

rustic folioBOT
#

Expected behavior

i create a item with ItemFlag.HIDE_ATTRIBUTES and i expect to not see the the item attributes.

Observed/Actual behavior

Instead i still see them.
i print the item that i save as public object and the item that is in the inventory and i could see the ItemFlag.HIDE_ATTRIBUTES not longer exists.

Console:
[17:34:25 INFO]: ItemStack{BARRIER x 1, UNSPECIFIC_META:{meta-type=UNSPECIFIC, display-name="Reset Effect", ItemFlags=[HIDE_ATTRIBUTES, HIDE_UNBREAKABLE], Unbreakable=true}}

[17:34:25 INFO]: ItemStack{BARRIER x 1, UNSPECIFIC_META:{meta-type=UNSPECIFIC, display-name="Reset Effect", ItemFlags=[HIDE_UNBREAKABLE], Unbreakable=true}}

Steps/models to reproduce

Code:
public final static ItemStack resetEffect = createItem("Reset Effect", Material.BARRIER);

public static ItemStack createItem(String name, Material material) {
return setMeta(new ItemStack(material), name, true, null);
}

public static ItemStack setMeta(ItemStack itemStack...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Adding methods for ignoring entities seems wrong. Why not call the event right after the server looks for entities to hit? then you can pass in the entities to the event and let the user add/remove entities

In that case, I think it would make sense to be in LightningStrikeEvent then, though I don't really know how would I put entities there, as this method is called in tick method and I would be unable to get these entities. Though I think having event where you can specify your prediction on what entities do you really want there would be better. Passing a list with entities where you can add own entity could get little bit tricky and would probably require more checks, so making event through which you could make your own selection based on the predicate seems better for me.

#

For me it is better to use more "direct" way to somehow ignore other entities than to check with EntityDamageByEntityEvent, of course it could be done just with this event.

why exactly do you not want to use EntityDamageByEntityEvent? this really seems like a very simple and intended way of doing this. we also don't have an event that gets called for when a zombie is checking for players they can attack, so why add one for this?

#
[PaperMC/Paper] New branch created: fix-book-page-serialization
rustic folioBOT
rustic folioBOT
#

For me it is better to use more "direct" way to somehow ignore other entities than to check with EntityDamageByEntityEvent, of course it could be done just with this event.

why exactly do you not want to use EntityDamageByEntityEvent? this really seems like a very simple and intended way of doing this. we also don't have an event that gets called for when a zombie is checking for players they can attack, so why add one for this?

You could use this event as a more direct way for filtering entities, I could also imagine more features in this event in the future as configuring selection radius which you wouldn't want in EntityDamageByEntityEvent. Event for zombie checking for players which he could attack does not exist though there is more general event for this EntityTargetEvent.

rustic folioBOT
rustic folioBOT
#

Expected behavior

Moving an item in an inventory shouldn't change the item data

Observed/Actual behavior

Moving a shield with attribute_modifiers:{show_in_tooltip: 0b, modifiers:[]} adds banner_patterns:[] to the item components

Steps/models to reproduce

As requestes in this bug report (https://github.com/PaperMC/Paper/issues/10686), here is the new bug report for the shield issue.

  1. Give yourself a custom shield with /give @p minecraft:shield[minecraft:attribute_modifiers={show_in_tooltip:0b,modifiers:[]}]
  2. Use /data get entity @s SelectedItem to confirm that the shield just has this component
  3. Pick this item up with your cursor and place it in the inventory again
  4. Use /data get entity @s SelectedItem again and notice how the shield now also has the component banner_patterns:[]

Plugin and Datapack List

No plugins or data packs

Paper version

This server is running Paper version git-Paper-64 (MC: 1.20.6) (Implementing API version 1.20.6...

rustic folioBOT
#
[PaperMC/Paper] branch deleted: fix-book-page-serialization
rustic folioBOT
#

So after a bit of discussion on this, I think we'd be (for now) best of to only
pull changes regarding full release versions.

Snapshot handling is complex, specifically with isAtLeast.
The commits in this PR will keep the logic around, so when we do get to releasing paper for snapshots they can serve as starting point.

Beyond that, see below for changes for request.
Again, thank you for the pr :partying_face:

rustic folioBOT
#

setter

It's quite niche, but is used exactly for that: either to reset the current editor, or to set one without immediately opening the sign screen

getter

Player instance is obtained from uuid, and in some cases only the uuid is needed (e.g. if you just care whether the sign is being edited, or want to get value from Map by uuid). Getting Player isn't that bad for those cases, but since there's setter, getter doesn't hurt

rustic folioBOT
#

Expected behavior

That the brushed block when turning from suspicious sand/gravel into sand/gravel that it fires the BlockBreakBlockEvent or a similar event.

Observed/Actual behavior

Can't find any event fired when dusted block changes.

Steps/models to reproduce

Grab a dust and a suspicious block and have at it (:

Plugin and Datapack List

[03:21:54 INFO]: - LuckPerms, Mastery, Vault

Paper version

[03:22:08 INFO]: Checking version, please wait...
[03:22:08 INFO]: This server is running Paper version git-Paper-49 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: ac3a547)
You are 19 version(s) behind
Download the new version at: https://papermc.io/downloads/paper

Other

No response

rustic folioBOT
#
[PaperMC/Paper] New branch created: feature/RegistrySet
#

This API is supposed to introduce an API equivalent to nms' HolderSet and HolderSet$Named.

RegistrySet is the base interface with subtypes in RegistryKeySet and RegistryValueSet. RegistryKeySet is equivalent to a HolderSet filled only with "reference" holders whereas a RegistryValueSet is filled with only "direct" holders. We can safely assume that a HolderSet will only contain 1 type of holder at a time because all the codecs that encode HolderSets require that.

rustic folioBOT
#

Stack trace

[22:08:33 ERROR]: Failed to handle packet net.minecraft.network.protocol.game.ServerboundUseItemPacket@32d4e0dd, suppressing error
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.Entity.getDeltaMovement()" because "entity" is null
        at net.minecraft.world.entity.projectile.FishingHook.pullEntity(FishingHook.java:599) ~[paper-1.20.6.jar:git-Paper-68]
        at net.minecraft.world.entity.projectile.FishingHook.retrieve(FishingHook.java:502) ~[paper-1.20.6.jar:git-Paper-68]
        at net.minecraft.world.item.FishingRodItem.use(FishingRodItem.java:33) ~[paper-1.20.6.jar:git-Paper-68]
        at net.minecraft.world.item.ItemStack.use(ItemStack.java:596) ~[paper-1.20.6.jar:git-Paper-68]
        at net.minecraft.server.level.ServerPlayerGameMode.useItem(ServerPlayerGameMode.java:483) ~[paper-1.20.6.jar:git-Paper-68]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItem(ServerGamePacketListenerImpl.j...
rustic folioBOT