#paper

1 messages · Page 21 of 1

rustic folioBOT
#

Close #12213 by handle two cases where this can happen.

  • You try pass the displayname to a component for chat
ItemStack itemStack = new ItemStack(Material.STICK, 200);
player.sendMessage(Component.text("Item1").appendSpace().append(itemStack.displayName()));
  • You try to pass an item for the hover event
ItemStack itemStack = new ItemStack(Material.STICK, 200);
player.sendMessage(Component.text("Item2").hoverEvent(itemStack));

for the first case the only "easy" way is just mention in javadocs about how use this for chat messages can cause issues because mess with precontitions breaks others "normal" behaviours, the second case is more easy add a Precondition and the mention in javadocs about this.

rustic folioBOT
#

Expected behavior

When PlayerLaunchProjectileEvent is cancelled any relog for players should be natural without teleportation.

Observed/Actual behavior

When PlayerLaunchProjectileEvent is cancelled for ender pearl throw and player relogs after that, they will be teleported as if the pearl was thrown.

Steps/models to reproduce

  1. Listen to PlayerLaunchProjectileEvent and specifically ender pearls.
  2. Cancell all events.
  3. Throw an ender pearl and see it does not get thrown.
  4. Leave and join the server.
  5. Notice player gets teleported for all throws.

How it works for my plugin with a cooldown on the "special" ender pearl:

https://github.com/user-attachments/assets/214bf92a-a281-44ab-a576-47bc0434292e

Plugin and Datapack List

[15:51:06 INFO]: Paper Plugins: (0):
[15:51:06 INFO]: Bukkit Plugins: (2):
[15:51:06 INFO]: - LuckPerms, MilkyItems

The portion for the code in my plugin

    @Override
    public @NotNull Listener getListener() {
      ...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

The redirect flattening previously copied over children nodes without checking node requirements (e.g. permissions)

Before https://github.com/PaperMC/Paper/pull/11954, this caused node requirements to be ignored for second-level command nodes created using the brigadier api (if namespaced commands were prevented from being sent using the spigot config option), see https://github.com/PaperMC/Paper/pull/11953

Since https://github.com/PaperMC/Paper/pull/11954 is merged now, it's much less of an issue, but as https://github.com/PaperMC/Paper/pull/12136 has been merged, it still is an issue

rustic folioBOT
#

This PR aims to silence the feedback from server sprinting via the API.

When using the API to request the server to sprint:
https://jd.papermc.io/paper/1.21.4/org/bukkit/ServerTickManager.html#requestGameToSprint(int)

The tick manager still provides feedback as if a command vanilla /tick sprint were run:
<img width="520" alt="Screenshot 2025-03-02 at 10 45 31 PM" src="https://github.com/user-attachments/assets/f16344a5-fa5a-4b89-9f70-3aa88a160655" />

When using the API to do this task, the server shouldn't be responding as if a command were run.

This has driven me nuts since Bukkit added this, I just kept forgetting to report it and/or actually do something about it.
But nows my chance.

One thing I did think was someone out there using this API might actually like this feedback?!?!?
So I was thinking, should I make another ServerTickManager#requestGameToSprint method with an option to silence?
Looking for feedback!

rustic folioBOT
#

Replaces #8913.

In the end I have deprecated the old .deathMessage() methods in the event and replaced it with deathChatMessage and deathScreenMessage to allow changing those two independently. I tried to make it so the behavior does not change at all when using the old methods.

I have not yet tested it, will do later, but can be reviewed....

rustic folioBOT
#

Wouldn't this mean that if the method is invoked multiple times, the feedback might not be printed correctly?
For example, suppose Player 1 uses the /tick sprint command to make the game sprint forward by 10 seconds. During this sprint, a plugin unexpectedly decides to silently sprint the game forward by an entire day. As a result, Player 1's message is not printed immediately, but instead appears only after a full day has passed.
I

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Adds an Unimplemented type for data component types that have yet to receive an API implementation. This replaces using DataComponentType.NonValued for such cases. Using DataComponentType.NonValued here causes issues as you're able to get instances of unimplemented data component types using methods like Registry#get and ItemStack#getDataTypes.

Tested with ItemStack#hasData, ItemStack#resetData, and ItemStack#unsetData.

Not a big fan of using raw types for the converters, but unsure of a different way to do it properly.

rustic folioBOT
#

The other way around is more tricky to handle but i don't think it's worth (when a plugin sprint and the stop command is executed)

I agree.
Sprinting isn't something servers are going to be doing on a regular basis outside of testing/debugging/stress-testing.
I cant imagine a plugin randomly issuing a sprint without the owner/admins knowledge, to the point they'd ALSO use the /tick sprint command.

#

Call me crazy, but do you think it might be a good idea to add the unimplemented types to DataComponentTypes?
With a note saying they're currently not supported by the API?
This could cut down on people asking "Where is X component, I saw it on McWiki?"

ex:

/**
* Not Currently Implemented
*/
@Deprecated (or some other annotation)
static final DataComponentType.Unimplemented CUSTOM_DATA;
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

The spawn reason for fish spawn from bucket should be "SPAWNER_EGG"

Image

This screen shot is from 1.16

Observed/Actual behavior

The spawn reason for fish spawn from bucket is "DEFAULT"

Image

This screen shot is from 1.21

Steps/models to reproduce

Listen for CreatureSpawningEvent and check spawn reason for fish in 1.16 and 1.21

@EventHandler
public void onFishSpawn(CreatureSpawnEvent event) {
    if (event.getEntity() instanceof org.bukkit.entity.Fish) {
        getLogger().info("A fish was spawned with reason: " + event.getSpawnReason() + " at " + event.getLocation());
    }
}

Plugin and Datapack List

Im only running my plugin to test spawn reason.

Paper version

This server is running Paper version 1.21.4-188-main@8de7e35 (2025-03-03T16:59...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

mentioned that in the description of the original pr.
each entity is actually pushed twice, once during its own tick and once during the other entities tick. i don't think we should give the user the wrong idea by making it seem like one is pushing the other when that is not the case (that would also imply that cancelling the event would only cause one entity to not be pushed)
image

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

Expected behavior

Curing a Zombie Villager that is holding an item should drop the item once cured.

Observed/Actual behavior

Curing the Zombie Villager that is holding something will void the item upon cured state.

Steps/models to reproduce

Have a Villager turned by a Zombie, toss the Zombie Villager an item/block/tool, start the curing process. Once cured the item will be voided instead of dropped.

Plugin and Datapack List

05.03 02:09:47 [Server] INFO ℹ Server Plugins (66):
05.03 02:09:47 [Server] INFO Paper Plugins (3):
05.03 02:09:47 [Server] INFO - FancyHolograms, FancyNpcs, HuskHomes
05.03 02:09:47 [Server] INFO Bukkit Plugins (63):
05.03 02:09:47 [Server] INFO - ajLeaderboards, ArcadeGames, AutoMessage, BattlePass, BentoBox, BentoBox-AOneBlock, BentoBox-BSkyBlock, BentoBox-Challenges, BentoBox-Level, BentoBox-MagicCobblestoneGenerator
05.03 02:09:47 [Server] INFO BentoBox-TopBlock, BlueBridgeCore, BlueBridgeGP, BlueBridgeWB, BlueBridgeWG, BlueMap, BlueMa...

rustic folioBOT
rustic folioBOT
#

Expected behavior

When calling:
boolean success = Bukkit.unloadWorld(world, false);
and receiving success = true, we expect the world to be unloaded without being saved.
This means the world will be unloaded as is, without first saving any of it's files.

Observed/Actual behavior

When unloading via
boolean success = Bukkit.unloadWorld(world, false);
the world gets unloaded correctly. But not before the server tries to save raids.dat in the incorrect location. The server thinks the world is in its root.

I've observed this by not having the world folder in the server's root folder and am getting the following error for a world stored in /plugins/pluginname/worlds/MZ:
`[09:54:57 ERROR]: Could not save data to raids.dat
java.nio.file.NoSuchFileException: ./MZ/data/raids.dat
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]
at java.base/sun....

rustic folioBOT
#

there is a fun annoying issue where you can technically shove a folder path into create world and it works, we should probably figure out how we want to handle that, but, that's an issue for another time.

The issue here is that Mojang doesn't support multiple 'worlds' in the same way that the API pretends it does, and a lot of the per-dimension data is basically a global state as far as the server is really concerned. There would need to be a huge effort to clean this up, but I feel that one of the first goals before we start fighting this would be to remove spigots, half-maintained world dimension changes and revert back to vanilla logic here, but that's another entire issue to contend with...

rustic folioBOT
#

This is how I'm creating a new world:

`Bukkit.getScheduler().runTaskAsynchronously(PluginName.getInstance(), () -> {

        File tempWorldsFolder = new File(Bukkit.getWorldContainer(), "plugins/PluginName/worlds/");
        File worldFolder = new File(Bukkit.getWorldContainer(), worldName);

        if (!tempWorldsFolder.exists()) {
            tempWorldsFolder.mkdirs();
        }

        Bukkit.getScheduler().runTask(PluginName.getInstance(), () -> {
            WorldCreator creator = new WorldCreator(worldName);
            creator.environment(World.Environment.NORMAL);
            creator.generator(new Generator()); // Generic flat world generator as placeholder
            creator.seed(new Random().nextLong());

            World world = Bukkit.createWorld(creator);

            if (world != null) {
                world.setAutoSave(false); // Attempt to prevent saving these worlds

                // Move the world to ...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Originally, I wanted to fix a small memory leak when parsePending occurs
tail equals head = last task, the last task is saved and lives until new tasks arrive. To count ticks, it is not necessary to have a counter for each scheduler (for asynchronous and synchronous)

Pain.
I wanted to handle the angular moment when tasks are added in the main thread by adding them to a local non-blocking list, that's what temp does, for example, without overloading the priority queue while traversing the actual tasks. But the scheduler api has a lot of unnecessary methods, and no necessary ones

For example, canceling a task by id is probably a bad idea, both in terms of performance and security.
The isQueued / isCurrentlyRunning methods also relate to this.
This functionality should be (if it is needed at all) in BukkitTask
At the same time, there are no really useful methods like pool closing (at least for asynchronous)

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Called when an item is put in a slot for repair by an anvil.

Observed/Actual behavior

The event is not called at all.

Steps/models to reproduce

Register a single listener for the event, open Anvil and try to use it in different ways to fire the event.

Plugin and Datapack List

Single plugin to reproduce the issue.

Paper version

This server is running Paper version 1.21.4-190-main@5538d24 (2025-03-05T12:40:02Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-188-8de7e35 (MC: 1.21.4)

Other

No response

rustic folioBOT
rustic folioBOT
#

Expected behavior

In previous versions when you enabled the experimental config setting to allow sand duping through end portals. The sand would come flying out in the end in 4 directions North, East, South and West

Observed/Actual behavior

but in the current versions of paper (im on 1.21.4-190) it comes out flying diagonally in the end. I know this is a experimental setting and you guys can decide to cancel it at any time. but since alot of people use it maybe you guys can look into it?

Steps/models to reproduce

i have build this sand duper: https://www.youtube.com/watch?v=BAPyHRb3kZU
I have used it on previous versions of paper i think last one was 1.20 and then it worked fine.
I have also tried to replicate this on vanilla and there the sand duping works as expected.

Plugin and Datapack List

ℹ Server Plugins (16):
Bukkit Plugins:
BlueBridgeCore , BlueBridgeGP , BlueBridgeWB , BlueMap , BlueMapDeathMarkers , BlueMapOfflinePlayerMarkers, BMMarker , ...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Currently, ChunkUnloadEvent#setSaveChunk doesn't affect saving entity chunk, while it does affect chunk and poi chunk.
This is intended, however it still would be useful to abort saving the whole chunk with all its data.

Describe the solution you'd like.

I propose 3 solutions

  1. (best) Deprecate ChunkUnloadEvent#setSaveChunk and allow specifying which chunk parts/types should not be saved.
    For example:
// note: this is usage example, method/class naming is subject to change
@EventHandler
public void onChunkUnload(ChunkUnloadEvent e) {
    // to skip entity chunk saving:
    e.setSavedParts(ChunkUnloadEvent.ChunkPart.CHUNK, ChunkUnloadEvent.ChunkPart.POI_CHUNK);

    // to skip poi chunk saving:
    e.setSavedParts(ChunkUnloadEvent.ChunkPart.CHUNK, ChunkUnloadEvent.ChunkPart.ENTITY_CHUNK);

    // to skip poi chunk and entity chunk saving
    e.setSavedParts(ChunkUnloadEvent.ChunkPart.CHUNK);
    
...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

PlayerBucketEmptyEvent events should be called for all types of bucket items (water/lava/powder snow) like PlayerBucketFillEvent is.

Observed/Actual behavior

The event isn't called for powder snow buckets.

Steps/models to reproduce

  1. Setup a Paper plugin
  2. Add listeners to the events mentioned above
  3. See that PlayerBucketEmptyEvent isn't called when using powdered snow buckets while the other one is.

Plugin and Datapack List

The server is running plain except my testing plugin adding event listeners to both events.

Paper version

[00:01:34 INFO]: Checking version, please wait...
[00:01:34 INFO]: This server is running Paper version 1.21.4-DEV (2025-03-07T23:01:15Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running a development version without access to version information
Previous version: 1.21.4-DEV-5538d24 (MC: 1.21.4)

Other

No response

rustic folioBOT
#

Fixes attribute swap exploit: https://www.youtube.com/watch?v=jL98SsqfdvU
TLDR: You can swap an item right before using it and the new item will contain the same attributes as the first item: attack speed, attack damage, dig speed, etc.

This exploit allows you to use the attributes from the previous weapon/tool right before swapping. Could you let me know if I missed any easily abusable actions other than attack/intract? Let me know if anyone also finds issues with this patch. It should work perfectly with my limited testing, but it would be nice to know if this causes new exploits.

#

Fixes attribute swap exploit: https://www.youtube.com/watch?v=jL98SsqfdvU
TLDR: You can swap an item right before using it and the new item will contain the same attributes as the first item: attack speed, attack damage, dig speed, etc.

This exploit allows you to use the attributes from the previous weapon/tool right before swapping. Let me know if I missed any easily abusable actions other than attack/interact? Let me know if anyone also finds issues with this patch. It should work perfectly with my limited testing, but it would be nice to know if this causes new exploits.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I have tried to look deeply into all of the changes that may be caused by this and I have seen the following, note that I would like a second opinion from some of these. Note that for analyizing these you must look at the parameter passed and ensure that the itemstack is either cloned or removed from the container properly before being called.

Some interesting calls:

  • ResultSlot.onTake(Player, ItemStack) (net.minecraft.world.inventory) — This looks like where the above bug fix occurs?
  • Inventory.placeItemBackInInventory(ItemStack, boolean) (net.minecraft.world.entity.player) — looked suspicious, altough is fine
  • StonecutterMenu.quickMoveStack(Player, int) (net.minecraft.world.inventory) — This is sus, there is defo mutation in that slot occuring here. Do we cause another bug here?
  • Bucketable.bucketMobPickup(Player, InteractionHand, T) (net.minecraft.world.entity.animal) — behavior change, bucketItemStack will now respect in advancement
  • AbstractContainerMenu#614 -mutat...
rustic folioBOT
rustic folioBOT
#

I had left a review about that, though i don't think there is a way for us to get rid of the boolean without breaking existing plugins. Since Plugins currently overriding this message probably don't check for the gamerule this could potentially lead to players information being exposed (on a pvp enabled server for example other players on the server now know you are standing around at your bed/spawn without any stuff). Not sure if we really need to break api here. We could mention the allowDisplayingDeathMessage method in the deathMessage(Component) methods jdocs to make it more clear to plugin devs.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
  • Currently we do not have an event which fires when the cursor actually picks up the crafted item from result slot.
  • ItemCraftedEvent is an event which fires only when the ItemStack is picked up.
  • This event differs from CraftItemEvent which fires even if the cursor doesn't pick up the ItemStack (Eg. when the cursor has max stack of items.)
#
  • Currently we do not have an event which fires when the cursor actually picks up the crafted item from result slot.

  • ItemCraftedEvent is an event which fires only when the ItemStack is picked up.

  • This event differs from CraftItemEvent which fires even if the cursor doesn't pick up the ItemStack (Eg. when the cursor has max stack of items.)

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

It builds

Observed/Actual behavior

Downloading https://services.gradle.org/distributions/gradle-8.12-bin.zip
.............10%.............20%.............30%.............40%.............50%.............60%.............70%.............80%.............90%.............100%

Welcome to Gradle 8.12!

Here are the highlights of this release:

  • Enhanced error and warning reporting with the Problems API
  • File-system watching support on Alpine Linux
  • Build and test Swift 6 libraries and apps

For more details see https://docs.gradle.org/8.12/release-notes.html

Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
Calculating task graph as no cached configuration is available for tasks: applypatches

Configure project :paper-server
paperweight-core v2.0.0-beta.14 (running on 'Linux')

FAILURE: Build failed with an exception.

  • What went wrong:
    Configuration cache state could not be cached: field __paperDependencies__ o...
rustic folioBOT
#

It’s still global state, you would need to rename the entries inside of the
data pack to apply to the dimension you want, this is generally not
something that we can support, especially given that it would require out
of phase modifications of global state, or further mangling of the registry
system. If you want to use data packs to modify a custom dimension, you’d
probably be better off defining that dimension in the pack rather than with
a plugin

On Sun, 9 Mar 2025 at 05:04, 雨落 @.***> wrote:

How about the datapacks with only the world generation part?
Recipes and advancements may should be applied globally, but world and
structures generation needn't.


Reply to this email directly, view it on GitHub
https://github.com/PaperMC/Paper/discussions/10518#discussioncomment-12438072,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJMAZFMNYZF5ND3EI5NGTD2TPDU3AVCNFSM6AAAAABYT2LZY2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Quantity data from dropped item entities should probably not be obfuscated, as it makes all item entities appear as though they have a quantity of 1 (i.e. no clumping), even if they have a quantity of 64 for example.

Observed/Actual behavior

Already described in "Expected behaviour" section.

Steps/models to reproduce

  1. Enable item obfuscation.
  2. Drop an item stack of 64 on the ground.
  3. Observe as it appears to be an item stack of 1.

Plugin and Datapack List

N/A

Paper version

This server is running Paper version 1.21.4-188-main@8de7e35 (2025-03-03T16:59:40Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)

Other

No response

rustic folioBOT
rustic folioBOT
#

Expected behavior

EntityKnockbackByEntityEvent getting called for a player that gets knocked back as a result of a mace smash attack AoE.

Observed/Actual behavior

A knockback event is called only for the main target of the attack, not for the additional player affected by the AoE.

Steps/models to reproduce

Have a way of logging events or listen to the EntityKnockbackByEntityEvent event directly.

public class KnockbackListener implements Listener {
    @EventHandler
    public void onKnockback(EntityPushedByEntityAttackEvent e) {
        Bukkit.getLogger().info("Knockback on " + e.getEntityType());
    }
}

Log: [18:01:20 INFO]: Knockback on SHEEP

Do a smash attack with a mace on a mob standing next to another player. This requires falling for at least 1.5 blocks and hitting the mob.

Plugin and Datapack List

EventLogger (simply logs on knockback event)

Paper version

This server is running Paper version 1.21.4-204-main@3d13b11 (2025-03-09...

#

Expected behavior

You should be able to break blocks normally.

Observed/Actual behavior

This change (https://github.com/PaperMC/Paper/commit/a2b0ff0644e76fb4a644d870bc335bf81bc6a109) broke plugins which are setting block to same position, as u can see in the video - when I am holding left button still, it only adds 1 mine, I need to release mouse button everytime so it counts right...

https://cdn.discordapp.com/attachments/289587909051416579/1348341689122816040/Zaznam_2025-03-09_180628.mp4?ex=67cf1c8d&is=67cdcb0d&hm=e69f05616e44b7ff1be7c6764418b0ff30f33b9a0a2bbe851e075ca661aa3e3f&

Steps/models to reproduce

I used plugin, which is setting blocks at the same positon and u mine them.

Plugin and Datapack List

Paper version

This server is running Paper version 1.21.4-204-main@3d13b11 (2025-03-09T09:36:05Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are 1 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous ve...

#

I am noticing this too in the latest build #205

I ran this test in a test plugin with API version: 1.21.4-R0.1-SNAPSHOT

    @EventHandler
    public void onTest(BlockBreakEvent e) {
        e.setCancelled(true);
        getLogger().info("Event should fire!");
    }

Steps I took to reproduce:

  1. Enter survival mode
  2. Break a block
    3 Notice the break event is cancelled (Expected)
  3. Notice that the test message is logged in the console
  4. Continue to break block (by continuing to hold down the break button)
  5. Notice the block is cancelled again, however the BreakBlockEvent is not triggered

I tested #199, the build right before the commit mentioned above and it works as expected.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

No block place event shall be dispatched when stripping a log.

Observed/Actual behavior

A block place event is dispatched when stripping a log.

Steps/models to reproduce

A minimal plugin reproducing the issue is available here.

Plugin and Datapack List

Plugins:

[23:59:57 INFO]: ℹ Server Plugins (1):
[23:59:57 INFO]: Paper Plugins:
[23:59:57 INFO]: - MinimalPlugin

Datapacks:

[00:00:22 INFO]: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
[00:00:22 INFO]: There are no more data packs available

Paper version

[23:36:48 INFO]: This server is running Paper version 1.21.4-207-main@1a7288a (2025-03-09T18:15:59Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-117-a35cfe9 (MC: 1.21.4)

Other

This unexpected behavior caused my plugin to put unwa...

#

I just filled this issue: https://github.com/PaperMC/Paper/issues/12256
Then I discovered this one is related to what I wanted to report.

Someone reported me a bug with my plugin and, after investigations, I discovered it was due to weird behaviors from the API (more details here).

I don't know if there is any progress so far related to this topic, the eventual depreciation of BlockPlaceEvent and so on...

rustic folioBOT
#

Expected behavior

Boss bar interface should have title(component) to go with setTitle(string)

Observed/Actual behavior

it only has setTitle(string)

Steps/models to reproduce

N/A

Plugin and Datapack List

N/A

Paper version

This server is running Paper version 1.21.4-DEV-main@1a7288a (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are 1 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 1.21.4-DEV-5538d24 (MC: 1.21.4)

Other

No response

rustic folioBOT
#

Expected behavior

Since 743346a5da36015063d834ecd6013fa40913e5f8 some players reporting their armor bar is missing for some players

Observed/Actual behavior

a

Steps/models to reproduce

a

Plugin and Datapack List

a

Paper version

This server is running Paper version 1.21.4-DEV-main@1a7288a (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are 1 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 1.21.4-DEV-5538d24 (MC: 1.21.4)

Other

No response

rustic folioBOT
rustic folioBOT
#

For what it's worth I tested the PR and it works. The event now gets fired for all targets of the AoE.

@EventHandler
public void onKnockback(EntityKnockbackEvent e) {
    Bukkit.getLogger().info(e.getClass().getSimpleName() + " (" + e.getEntityType() + ")");
}

When hitting a sheep next to another player:

[21:59:54 INFO]: EntityKnockbackByEntityEvent (SHEEP)
[21:59:54 INFO]: EntityPushedByEntityAttackEvent (PLAYER)
rustic folioBOT
#

Stack trace

[22:34:24] [ServerMain/INFO]: [bootstrap] Running Java 21 (OpenJDK 64-Bit Server VM 21.0.6+7; Arch Linux null) on Linux 6.12.16-1-lts (amd64)
[22:34:24] [ServerMain/INFO]: [bootstrap] Loading Paper 1.21.4-207-main@1a7288a (2025-03-09T18:15:59Z) for Minecraft 1.21.4
[22:34:25] [ServerMain/INFO]: [PluginInitializerManager] Initializing plugins...
[22:34:25] [ServerMain/INFO]: [PluginInitializerManager] Initialized 0 plugins
[22:34:27] [ServerMain/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[22:34:28] [ServerMain/INFO]: Loaded 1370 recipes
[22:34:28] [ServerMain/INFO]: Loaded 1481 advancements
[22:34:28] [ServerMain/INFO]: [MCTypeRegistry] Initialising converters for DataConverter...
[22:34:28] [ServerMain/INFO]: [MCTypeRegistry] Finished initialising converters for DataConverter in 122.7ms
[22:34:28] [Server thread/INFO]: Starting minecraft server version 1.21.4
[22:34:28] [Se...

rustic folioBOT
#

Stack trace

https://mclo.gs/G2OHmQA

Plugin and Datapack List

None

Actions to reproduce (if known)

No response

Paper version

This server is running Paper version 1.21.4-207-main@1a7288a (2025-03-09T18:15:59Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)

Other

A potion entity is loaded with NaN motion, causing failure when it's being ticked.
Position, yaw and pitch are guarded against NaN in Entity.load, but delta movement is not.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

It's indeed not worth big discussion as the gain is minimal, so won't continue past this message explaining my thoughts. If someone could mark this as resolved would be glad

Since the check is already present, it makes sense to make the easy check first that already has all the data on stack instead of the pointer chasing through all the ram, especially since in current implementation the majority of items passing here will be from entiy equipment, which is mostly either 1 for unstackable items (armor) or 0 for empty slots, so since it's true it's not gonna even need to check the config

#

Post-softspoon version of #8564
Resolves: #8544

Spigots implementation of the growth modifier boils down to a plain chance for a plant to either grow immediately or to grow a single age value towards its fully grown age.

This behaviour is specifically troubling for plants like the cactus or the sugar cane, as they change an unrelated block when growing up (the free air block above their tip). This blocks validity is checked during neighbour updated which are triggered by resetting the previous tip of the plant back to [age=0].

With spigots modifier implementation, blocks at the age of zero are able to grow a new block above them however, causing the block change of the previous tip to change a block of age zero to a block of age zero, which does not cause a neighbour update as nothing actually changed. This means that the about block is not updated and hence may remain in an otherwise invalid state. (E.g. a cactus block next to a solid block).

This commit rewrites the ...

#

Post-softspoon version of https://github.com/PaperMC/Paper/pull/8564
Resolves: https://github.com/PaperMC/Paper/issues/8544

Spigots implementation of the growth modifier boils down to a plain chance for a plant to either grow immediately or to grow a single age value towards its fully grown age.

This behaviour is specifically troubling for plants like the cactus or the sugar cane, as they change an unrelated block when growing up (the free air block above their tip). This blocks validity is checked during neighbour updated which are triggered by resetting the previous tip of the plant back to [age=0].

With spigots modifier implementation, blocks at the age of zero are able to grow a new block above them however, causing the block change of the previous tip to change a block of age zero to a block of age zero, which does not cause a neighbour update as nothing actually changed. This means that the about block is not updated and hence may remain in an otherwise invalid state...

rustic folioBOT
#

Expected behavior

Expected Behavior: The ignored-directories: [".paper-remapped"] setting in paper-global.yml should prevent Paper from scanning the plugins.paper-remapped\ directory for plugins, eliminating errors like java.lang.IllegalArgumentException: Directory 'plugins.paper-remapped\Expansion-advancements.jar' does not contain a paper-plugin.yml or plugin.yml!.

Observed/Actual behavior

Observed Behavior: Despite the correct configuration, Paper recreates the .paper-remapped\ directory during startup, remaps files (e.g., Expansion-advancements.jar, Expansion-vault.jar), and attempts to load them as plugins, causing log errors.

Steps/models to reproduce

Steps to Reproduce:
Set up a Paper 1.21.4 server with build #207.

Install PlaceholderAPI with expansions (e.g., Expansion-advancements.jar, Expansion-vault.jar) in plugins/PlaceholderAPI/expansions/.

Add plugin-loader: ignored-directories: [".paper-remapped"] to paper-global.yml.

Start the server, delete plugi...

rustic folioBOT
rustic folioBOT
#

Expected behavior

As per the javadocs, setting the FireworkExplodeEvent to cancelled = true should remove the firework entity

Observed/Actual behavior

The firework entity remains, and continues to call the FireworkExplodeEvent for every tick that it continues living. It seems to live an arbitrary amount of ticks longer.

Steps/models to reproduce

@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onFireworkExplode(FireworkExplodeEvent event) {
    event.setCancelled(true);
    Bukkit.getServer().getLogger().warning("kaboom!");
}

### Plugin and Datapack List

plugins
[23:25:56 INFO]: ℹ Server Plugins (1):
[23:25:56 INFO]: Bukkit Plugins:
[23:25:56 INFO]: - RoseParticles
datapack list
[23:25:58 INFO]: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
[23:25:58 IN...

rustic folioBOT
#

I see that nothing moved in the last half a year, every LevelChunkSection is still creating empty ShortList on every section in newest Paper. So Moonrise decided to not implement it on their own end?

Maybe it would be ok to apply a 1.21.4 version of this patch? :D
NGL, I don't think that users care if it's a "Moonrise" patch or "Paper" patch.

#

Paper is a patch set over vanilla, and moonrise is one is one of the
feature patches which is basically copied over more or less manually, we
generally do not want patches over feature patches because they become a
headache to track

On Tue, 11 Mar 2025 at 08:58, xymb-endcrystalme @.***>
wrote:

Paper is not a patchset on top of Moonrise? I always assumed it is.

Well, I don't use Paper/Folia directly, but a fork, so it doesn't affect
me if it ever gets upstream.


Reply to this email directly, view it on GitHub
https://github.com/PaperMC/Paper/pull/11500#issuecomment-2713216969, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJMAZHNGXEFY342QIQCAZ32T2QS3AVCNFSM6AAAAABQGSOYBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMJTGIYTMOJWHE
.
You are receiving this because your review was requested.Message ID:
@.***>
[image: xymb-endcrystalme]xymb-endcrystalme left a comment
(PaperMC/Paper#11500)
<https:...

rustic folioBOT
#

ignored-directories is not a thing, and paper doesn't scan recursively, or inside of the remapped folder, for plugin jars; the remapper showing in the path is just a side-effect of how remapping works; if a jar is inside of the plugins folder, it will try to be loaded; as for what is going on with PAPI and that, you'd need to take that to them.

rustic folioBOT
#

Sorry for the late reply
I don't think we need to overthink this and imo this impl should be straightforward it's just spigot that has made a unwise decision in the first place. But i really like your solution and think that just a note on the paperdoc about what we change for theses config is enough and say that even if we fixed spigot it can still break niche plugin/command/datapack/resource pack for map maker purpose i guess when the percent overflow 100 percent since it skip some natural step.
There potentially some similar issue for the beetroot and crops where the percent change the moisture rate and so is not independent like the other. The beetroot/torchflower has even a bigger issue since its class override the parent method with a 1/3 chance.

There's also another issue when the cactus reach its maximum age (15) it normally creates a new block only in the next random tick however with this pr the new block is created instantly without waiting a new randomtick. That...

rustic folioBOT
#

Expected behavior

The block should be removed and drop an item as expected.

Observed/Actual behavior

Since Paper version 200, blocks placed using the off-hand (shield hand) can no longer be broken properly. When attempting to break them, they immediately reappear and do not drop an item.
Steps to reproduce

Steps/models to reproduce

  • Place a block using the off-hand.
  • Try to break the block.
  • The block reappears instantly and does not drop an item.

Plugin and Datapack List

all off

Paper version

Versions
Paper >=200 (bug occurs)
Paper <199 (works fine after downgrade)

Other

The issue may be related to the following commit:
Fix cancelling PlayerInteractEvent at (0, 0, 0)

rustic folioBOT
rustic folioBOT
#

"Some players report" is not a useful issue report. Please provide some actual reproduction steps. Just equipping and unequipping armor is working fine, and that is all I can test with so little information.

Additionally, you do not seem to be running an official Paper build. Please test with a build downloaded from https://papermc.io/downloads.

Figured out the steps, you must die while wearing armor then respawn, your armor bar will disappear

#

Expected behavior

https://youtu.be/0tCiYMXaFc8

Vanilla 1.21.4

You can one tap the cow while applying Fire Aspect to it.

Observed/Actual behavior

https://youtu.be/6m1E7duJguk

Paper 1.21.4

You cannot one tap the cow while applying Fire Aspect to it.

Steps/models to reproduce

  1. Give yourself a cow spawn egg
  2. Give yourself a Wooden Axe and a Wooden Sword
  3. Enchant the Wooden Sword with Fire Aspect
  4. Spawn the cow
  5. While holding the axe, first swap to your sword then quickly hit the cow
  6. Observe the difference between the result of Vanilla vs. Paper

Plugin and Datapack List

Image

Paper version

This server is running Paper version 1.21.4-207-main@1a7288a (2025-03-09T18:15:59Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-131-84281ce (MC: 1.21.1)

Other

Seeing as Attribute Swapping is vanilla behavi...

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

Previously, people (I) have been using the spigot and paper file configurations to determine whether the server is configured for proxy online mode
Now the spigot interface got deprecated for good reasons, but there is no alternative

image

This commit introduces methods to check the online mode and enablement status of Velocity and BungeeCord. These changes allow plugins to easily query proxy-related server configurations.

I would like to have some input on the method names since Bukkit uses getOnlineMode
Also, I wasn't really sure on whether to return bungee/velocity online mode true only if the server is actually using bungee or velocity

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: feature/simplify-remote-item-matching
rustic folioBOT
#
[PaperMC/Paper] New branch created: skip-compile-warnings
#

I am not sure if the issues with the other PR have already been resolved There was a bug with armadillos not keeping their state Also personally I would prefer a generale event that includes all entities but that's probably not easily possible since states are an awful mess

if not wrong Lulu fix the issues in my PR for the roll methods and has Kenny approve then i think is all resolved in that xd

#

Is your feature request related to a problem?

There is no way for a plugin to directly create an instance of an Item

Describe the solution you'd like.

Add BlockDropItemEvent::addDrop(ItemStack)

Describe alternatives you've considered.

I could use World drop item, but this is rather annoying and breaks the event handling chain of BlockDropItemEvent as any downstream handlers will encounter an empty drops list (or not find the Item I wish to add) and will have to also hook an item spawn event and have no idea that spawn was caused by a block having "dropped" it.

Other

No response

rustic folioBOT
rustic folioBOT
#

Expected behavior

Using OpenJDK 23, paper should build.

Observed/Actual behavior

Using OpenJDK 23, paper fails with compiler errors.

Steps/models to reproduce

  1. Clone Paper
  2. Set JDK to OpenJDK 23, in PATH
  3. Verify: javac -version returns javac 23.0.2
  4. applyPatches
  5. createMojmapBundlerJar
  6. Observe

Plugin and Datapack List

N/A

Paper version

N/A; commit f0388e2f3840c6f9577b389ccd163e172ce563bd

Other

I've tried to reclone paper entirely, stopped all gradle daemons, nuked all paths except for openjdk 23 and it still fails. Openjdk 23 javac can compile the switch case in question perfectly fine, just not when invoked with gradle.

Compile error (in german, my locale is set to german):

/home/x150/Downloads/Paper/paper-server/src/main/java/io/papermc/paper/util/Holderable.java:39: Fehler: Unzulässiger Ausdrucksbeginn
            case JsonObjectWrapper(final JsonObject element) -> {
                                   ^
/home/x150/Downloads/P...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Really cool vanilla feature that is used a lot in mapmaking doesn't seem to work with Paper:
Putting NBT storage inside of a Written/Writable Book makes the NBT storage appear inside the book.

Observed/Actual behavior

Putting NBT storage inside of a Written/Writable Book gives you a blank book.

Steps/models to reproduce

  • Run the command: /data modify storage numbers 123 set value '["123"]'
  • Run the command: /give @p written_book[written_book_content={title:"",author:"",pages:['{"nbt":"numbers","storage":"storage","interpret":true}']}] 1

Plugin and Datapack List

Plugins:
WorldEdit

Paper version

This server is running Paper version 1.21.4-209-main@f0388e2 (2025-03-12T10:27:34Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-12-c17ef64 (MC: 1.21.4)

Other

No response

rustic folioBOT
#

This PR is fairly simple and just adds a open method to InventoryView. Seeing as InventoryView has a single non changeable non null player on it to begin with this is extremely nice with the InventoryViewBuilders.

// Before

player.openInventory(MenuType.GENERIC_9X3.builder()
	.location(location)
	.title(Component.text("This is my awesome InventoryView"))
	.build(player));

// After

MenuType.GENERIC_9X3.builder()
	.location(location)
	.title(Component.text("This is my awesome InventoryView"))
	.build(player)
	.open();
#

This PR is fairly simple and just adds a open method to InventoryView. Seeing as InventoryView has a single non changeable non null player on it to begin with this is extremely nice with the InventoryViewBuilders.

// Before

player.openInventory(MenuType.GENERIC_9X3.builder()
	.location(location)
	.title(Component.text("This is my awesome InventoryView"))
	.build(player));

// After

MenuType.GENERIC_9X3.builder()
	.location(location)
	.title(Component.text("This is my awesome InventoryView"))
	.build(player)
	.open();
rustic folioBOT
#

@Lulu13022002 now the console spam is fixed,

basically now plugins can cancel/set state of the armadillo at will and temporarily disable AI from changing states.

and then the AI can be re enabled later whenever needed using Armadillo#clearBlockedState()

plugins can also set the state outside of events with Armadillo#setBlockedState()

this implementation works by storing the blocked state in the entity's memory module

demonstraion:
https://www.youtube.com/watch?v=snHIl-M7jbE

rustic folioBOT
#

Expected behavior

getActivePotionEffects should be fast

Observed/Actual behavior

its slow, possibly because of papers registry implementation, seems to add alot of overhead

Steps/models to reproduce

Call getActivePotionEffects often, i.e in an anti-cheat

Image

Image

Plugin and Datapack List

N/A

Paper version

This server is running Paper version 1.21.4-DEV-main@f0388e2 (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-DEV-1a7288a (MC: 1.21.4)

Other

Maybe we do a cache? Kinda like blockdata conversion

#

Provide a link to the spark profile or the actual profile file itself

Sorry, the owner doesn't let me for "security" reasons (pretty dumb)

heres some example java code you can use to replicate the issue

 @EventHandler
    public void onPlayerMove(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        AntiCheatData data = DATA_MAP.computeIfAbsent(player.getUniqueId(),k -> new AntiCheatData());
        Collection<PotionEffect> potionEffects = player.getActivePotionEffects();
        data.activeEffects = potionEffects;
    }
    
    class AntiCheatData{
        private Collection<PotionEffect> activeEffects;
        
        public Collection<PotionEffect> getActiveEffects(){
            return activeEffects;
        }
    }
rustic folioBOT
#
[PaperMC/Paper] branch deleted: feature/simplify-remote-item-matching
rustic folioBOT
#

We don't accept performance reports only containing spark screenshots, especially if the screenshot doesn't show it being slow. I will update a few lines of key handling somewhere in there that look like odd code in general, but this is still an invalid issue

I provided code to replicate this issue, simply call getActivePotionEffects, the spark report is only for illustrative purposes.

rustic folioBOT
#

So this would solve issues with plugin compatibility in the future. I encountered a problem where my modern plugins were unable to load the entire listener class due to one method being a non-existing event. So I think it's better to just not load the specific event but still display the error.

rustic folioBOT
#
[PaperMC/Paper] branch deleted: ver/1.8.8
#
[PaperMC/Paper] branch deleted: ver/1.9.4
#
[PaperMC/Paper] branch deleted: ver/1.10.2
#
[PaperMC/Paper] branch deleted: ver/1.11.2
#
[PaperMC/Paper] branch deleted: ver/1.12.2
#
[PaperMC/Paper] branch deleted: ver/1.13.2
#
[PaperMC/Paper] branch deleted: ver/1.16.5
#
[PaperMC/Paper] branch deleted: ver/1.18.2
#
[PaperMC/Paper] branch deleted: ver/1.17.1
#
[PaperMC/Paper] branch deleted: ver/1.15.2
#
[PaperMC/Paper] branch deleted: ver/1.14
#
[PaperMC/Paper] branch deleted: ver/1.19.4
#
[PaperMC/Paper] branch deleted: ver/1.20.4
#
[PaperMC/Paper] branch deleted: ver/1.20.6
#
[PaperMC/Paper] branch deleted: ver/1.21.1
languid raptor
rustic folioBOT
#
[PaperMC/Paper] branch deleted: softspoon
rustic folioBOT
#

Is your feature request related to a problem?

When adding custom craftings manually, people may use the PrepareItemCraftEvent to edit the crafting result. However that currently doesn't work for crafters.

Describe the solution you'd like.

Make PrepareItemCraftEvent fire for crafters as well.

Describe alternatives you've considered.

There are no alternatives. The CrafterCraftEvent doesn't edit the crafter preview.

Other

This was implemented in Spigot after the hard fork, I don't really know how much the codebase changed, however you can find the commit that added this here.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: update/1.21.5
#

When clients are sent packets about advancements, those advancements are stored in a HashMap. This makes the order in which those entries are read essentially random.

By switching to a TreeMap, which orders based upon the advancement namespacedkey, it ensures that tabs from the same namespace are grouped together, and that within a namespace, the tabs are alphabetical.

The client appears to read advancement data in the order that it is written to the packet. So by changing the order, the client will read the alphabetised order and display them accordingly.

Existing code

Testing with two datapacks which add more advancements.

image

The order of the tabs here is:

  1. diamond:building/root
  2. diamond:husbandry/root
  3. diamond:homestead/root
  4. diamond:end/root
  5. diamond:completionist/root
  6. item_catalogue_page_8:root
  7. item_catalogue_page_9:root
  8. `item_ca...
#

When clients are sent packets about advancements, those advancements are stored in a HashMap. This makes the order in which those entries are read essentially random.

By switching to a TreeMap, which orders based upon the advancement namespacedkey, it ensures that tabs from the same namespace are grouped together, and that within a namespace, the tabs are alphabetical.

The client appears to read advancement data in the order that it is written to the packet. So by changing the order, the client will read the alphabetised order and display them accordingly.

I have also renamed a couple variables for better readability.

Existing code

Testing with two datapacks which add more advancements.

image

The order of the tabs here is:

  1. diamond:building/root
  2. diamond:husbandry/root
  3. diamond:homestead/root
  4. diamond:end/root
  5. diamond:completionist/root
  6. `item_ca...
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

The BlockDispenseLootEvent does not currently provide a way to get the LootTable being run. This makes it impossible to determine what loot table a Trial Spawner is dropping loot for. Vaults are excluded from this, because they can only contain a single loot table which can be acquired through the block state, unlike trial spawners which can contain many weighted entries.

Describe the solution you'd like.

I've taken a look at the patches for where the BlockDispenseLootEvent are being called, it looks like the LootTable being run is already available in scope and just needs to be mapped to a Bukkit version and given to the event.

Describe alternatives you've considered.

None, I don't think there are any reasonable alternatives

Other

No response

rustic folioBOT
#

Expected behavior

Item Obfuscation should not cause item names in frames to disappear. I am convinced that this was not intended to cause the problem described here, but if I am mistaken, I think it would be worth adding a config option for that

Image

Observed/Actual behavior

I can't see item name when Item Obfuscation is enabled
Image

Steps/models to reproduce

  1. Enable Item Obfuscation option readded in 1.21.4
  obfuscation:
    items:
      all-models:
        also-obfuscate: []
        dont-obfuscate:
        - minecraft:lodestone_tracker
        sanitize-count: true
      enable-item-obfuscation: true <-- set this to true
      model-overrides:
        minecraft:elytra:
          also-obfuscate: []
          dont-obfuscate:
          - minecraft:damage
          sanitize-count: tru...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

.dat file isn't marked dirty since drawImage drawing the image only modifies the buffer inside the craft canvas and not the underlying colors array the game saves

Observed/Actual behavior

.dat file is marked dirty, causing it to save unnecessarily

Steps/models to reproduce

  • Use MapCanvas#drawImage on a map with a custom MapRenderer

Plugin and Datapack List

none

Paper version

latest. minecraft 1.21.4, paper build 211

Other

This can cause large lag spikes (of more than 10s in some cases) on servers largely utilizing imageonmap-like plugins

#

no we just add an overload to the nms rollup/rollout with a boolean ignoreFrozen and that one is used by the api to still change state if the armadillo state is frozen

I think it would be best if there are seperate methods for frozen states

why though? it seems very unnecessary to me to have multiple methods which essentially do the same thing.

besides wouldn't this freezing api be better implemented in the original PR from doc?

#

Fixes #12295

Currently, MapCanvas API unnecessarily causes map data file to save.

The API calls this.mapView.worldMap.setColorsDirty() to mark colors dirty for players, however this has the side-effect of saving the map .dat files as well:

public void setColorsDirty(int x, int z) {
    this.setDirty(); // This saves the data file! 

    for (MapItemSavedData.HoldingPlayer holdingPlayer : this.carriedBy) {
        holdingPlayer.markColorsDirty(x, z); // This is what the API wants to do!
    }
}

This causes unnecessary lag during world saves, which scales with the amount of maps handled with API since last save. On servers that heavily rely on imageonmap-like plugins, it can cause lag spikes of dozens of seconds.

This PR changes this method to add a boolean argument to the method that determines whether the file is saved or not, which is used by the API. An overload is added for compatibility, and for vanilla.

rustic folioBOT
#

no we just add an overload to the nms rollup/rollout with a boolean ignoreFrozen and that one is used by the api to still change state if the armadillo state is frozen

I think it would be best if there are seperate methods for frozen states

why though? it seems very unnecessary to me to have multiple methods which essentially do the same thing.

besides wouldn't this freezing api be better implemented in the original PR from doc?

Well, now i overloaded the rollUp() and rollOut() methods with boolean ignoreFrozen instead of freezeRollUp(0 and freezeRollOut()

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
#

Is your feature request related to a problem?

The PDC set on an ItemStack which results in a BlockEntity when placed (ex. shulker box) is preserved in the BlockEntity in components.custom_data.PublicBukkitValues. I would like to be able to access those values from the Block object after the ItemStack is placed. There is currently no way to do this.

Getting / setting PDC values on block.getState() instanceof TileState tileState uses PublicBukkitValues in the BlockEntity NBT for storage leaving the values in components.custom_data.PublicBukkitValues inaccessible.

Describe the solution you'd like.

I'd propose to simply change where TileState accesses and stores its PDC data. Instead of storing at the NBT root of simply PublicBukkitValues, use the BlockEntity's component storage at components.custom_data.PublicBukkitValues.

I understand this may result in unexpected or backwards incompatible behavior, it may prove difficult to deal with existing blocks that have...

#

The PDC serves as a means of allowing you to store data onto something itself, the component stored in the block entity doesn't directly belong to the block entity, it belongs to the block that placed it down; dealing with moving data around would induce work for us to do which introduces a level of data corruption and passaround otherwise unexpected, so, I generally just cannot support such a move and feel that it would be a dangerous change in general.

Exposing the stored stack component is something that I've had some considerations towards

#

Is your feature request related to a problem?

It seems needlessly complicated to register a fresh merchant recipe and replace the original when all you want to change is the result item.

Describe the solution you'd like.

I think just adding this to paper-api/src/main/java/org/bukkit/inventory/MerchantRecipe.java oughta do it. Haven't tested it, though.

    public void setResult(@NotNull ItemStack item) {
        Preconditions.checkArgument(!item.isEmpty(), "Result cannot be an empty itemstack.");
        result = item.clone();
    }

Describe alternatives you've considered.

The recommended approach I've seen is to unregister the recipe and register a new one in its place, which requires copying in all the old values and doesn't seem like a very robust solution.

Other

I've poked around and haven't seen any discussion about why this would be a bad idea, so I'm assuming it was just never added. I don't see a reason why the result has to be immutable, ...

rustic folioBOT
rustic folioBOT
#

Expected behavior

Calling craftItemResult with a crafting matrix that forms a valid recipe should return an ItemCraftResult where getResultingMatrix() reflects the correct state of the crafting grid after the operation.

For example, given the following input:

H H A
H H A
A A A

(H = Honey Bottle, A = Air, G = Glass Bottle)

The expected getResultingMatrix() should be:

G G A
G G A
A A A

Where honey bottles have been replaced by glass bottles as expected.

Similarly, attempting to uncraft a gold block into 9 gold ingots with the input:

A A A
B A A
A A A

(B = Gold Block, A = Air)

Should result in:

A A A
A A A
A A A

Where the gold block has been removed as expected.

Observed/Actual behavior

Instead of returning the expected matrices, getResultingMatrix() returns:

For honey bottles:

G G G
G H A
A A A

Where a honey bottle remains in the matrix incorrectly and one glass bottle is incorrectly placed.

For gold block uncrafting:
...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: feat/config-api
#

Please provide feedback on naming, and general event consensis.

But my goal is to have the following:

  • Full cookie getting/setting support in the login/config/play stage. This means you'll be able to disconnect players during LOGIN depending on sent cookies. (Bukkit only allows play stage, and PARTLY config stage) (CookieConnection)
  • Allowing to boot players into the config stage/ out of it
  • Allow to add custom configuration tasks, so for example being able to load player data. (AsyncPlayerConnectionConfigurateEvent)
  • Allowing to load resource packs during config stage better
  • Transfer the player in config/player
  • send custom report details (shown in client debug log)
rustic folioBOT
#

With loot table modification (via data pack) the BlockEntity component_data can be configured to survive the block->item lifecycle as well. For my specific usecase at hand, having readonly access to the BlockEntity component_data stored PDC would suffice. However, I can easily foresee situations where I may want to modify that state so when the block transitions back to an item everything would be consistent. I'm onboard with keeping TileState PDC and the BlockEntity component_data stored PDC separate if paper eng feels it more appropriate.

My current hack-around for not having access to the BlockEntity component_data stored PDC, captured from the ItemStack that created the block, is to simply copy the ItemStack's PDC into the Block's PDC when the block is placed. This, effectively gives me the read-only view I require... but it doesn't work when a BlockEntity placed via a Dispenser - in which case the ItemStack and created block don't seem to be exposed within a single event. So ...

rustic folioBOT
rustic folioBOT
#

This PR aims to add a getter/setter for the custom name of a Skull (tile entity) block.
I believe Minecraft added this fairly recently?

We were talking about this over at Skript recently, and realized Paper didn't have API for this.

I've never touched BlockState stuff with CraftBukkit before, so I'm hoping I did this correctly.
I was basically going off how the profile was done.... 🤞

rustic folioBOT
rustic folioBOT
#

Expected behavior

Player#isChunkSent(Chunk) returns true for chunks players have loaded

Observed/Actual behavior

Player#isChunkSent(Chunk) is inconsistent with Player#getSentChunks() and returns false

Steps/models to reproduce

Chunk chunk = player.getChunk();
player.sendMessage("Player#isChunkSent() = " + player.isChunkSent(chunk));
player.sendMessage("Player#getSentChunks().contains() = " + player.getSentChunks().contains(chunk));

Output:

Player#isChunkSent() = false
Player#getSentChunks().contains() = true

Plugin and Datapack List

ℹ Server Plugins (2):
Bukkit Plugins:
 - BugReport, ProtocolLib
There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
There are no more data packs available

Paper version

icanhasbukkit
[20:00:44 INFO]: Checking version, please wait...
[20:00:45 INFO]: This server is running Paper version 1.21.4-211-main@6ea4202 (2025-03-13T11:49:31Z) (Implementi...
#

addresses an indexing bug in the crafting matrix logic of CraftInventoryCrafting.java that was causing incorrect handling of remaining items in the crafting grid. The previous implementation used a single-loop approach, which failed to properly calculate the slot indices for a standard 3×3 crafting grid. This resulted in issues with certain recipes—most notably with the honey bottle and gold block recipes.

Changes Made:

Replaced the single-loop approach with nested loops that iterate over rows and columns.
Calculated the correct index for each matrix slot using the formula: row * 3 + col.
Offset the matrix items correctly by the number of result inventory items, ensuring that the combined contents array is accurately populated.

rustic folioBOT
#

Expected behavior

When opening the inventory in creative mode, and having a stack of any item in any slot, when holding Q on it to drop it fast, some of the items get deleted

Observed/Actual behavior

Items dropped on the ground when dropping excessively gets deleted

Steps/models to reproduce

https://github.com/user-attachments/assets/f29e9d37-227a-4e27-b510-ecc19dfc5dc2

Plugin and Datapack List

[12:39:48 INFO]: Server Plugins (0):

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

Paper version

[12:40:30 INFO]: This server is running Paper version 1.21-130-master@b1b5d4c (2024-08-10T10:02:42Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
You are running the latest version

Other

No response

#

I always thought that is vanilla behavior, I just tried it in single-player and there the issue doesn't exist

I just tried it in a singleplayer and the bug is there also so it might just be Minecraft? and any item that doesn't stack to 64 such as ender pearls have the same issue, but they necessarily don't always delete the same amount, but sometimes the ones that do stack to 64 always seem to delete 51 items so 13 is left but this is not always true.

rustic folioBOT
#

Just want to mention something related, which is, that I proposed a way to set remaining items for the CrafterCraftEvent to Spigot, which got accepted and resulted in a getRemainingItems() method returning a List<ItemStack> that could be modified.

While that method is useful for the Crafter - and should probs be ported to Paper too - would I go a different route with the CraftItemEvent, since here, the items would remain in the crafting grid, while the Crafter spits them out alongside the item.
So it would need a way for us to define the Slot in the crafting grid to put the item at.
Tho, the event also extends InventoryClickEvent, so you could just set the inventory content per slot too I would assume...

Either way, point is, a method to get the ItemStacks returned in the crafting grid would be useful for sure.

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: fix/craftItemResult
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Fixes #10640.

After testing, the broken behavior started in 1.20.5. In 1.20.4, EntityShootBowEvent#getForce worked as expected, returning a draw strength of [0, 1] for bows, and 1 for crossbows.

Additionally, a constant 0.8 was passed for force in AbstractSkeleton#performRangedAttack and Illusioner#performRangedAttack. After checking RangedBowAttackGoal, which calls the method with:

this.mob.performRangedAttack(target, BowItem.getPowerForTime(ticksUsingItem));

Which prompted changing it to passing the distanceFactor parameter as the force.

rustic folioBOT
#

Stack trace

https://mclo.gs/lSgg8o5

Plugin and Datapack List

CleanroomGenerator, DriveBackupV2, FastAsyncWorldEdit, GameOfLifePlugin, HeadDB, HideAndSeekPlugin, LuckPerms, MagicStuff, MultipleSpawns, Multiverse-Core, MyCommand, OpenInv, PlaceholderAPI, Terra, TrollBoss, Vault, VoidGen, WorldEditSelectionVisualizer

Actions to reproduce (if known)

Just leave the server running. At some point it crashes, even without any players.

Paper version

This server is running Paper version 1.21.4-203-main@34c794d (2025-03-08T22:19:07Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are 8 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 1.21.4-187-1d5e5a5 (MC: 1.21.4)

Other

I know this is not a normal server crash, but in some way a Java thing. I already reported it to Java, but I wanted to report it here too, for the case that it has something to do with paper or some plugins.

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: update/data-components
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

It seems the problem is worse than the looks of it, the issues suggest that even periodically saving from Paper or Bukkit isn't enough to prevent data loss in case of power loss even if it was saved recently. If this were the case backups would be more reliable when they cost similar performance while having the backup separated from the source...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

This PR aims to add a method to retrieve the current fish hook casted by a player.
I've seen this asked for many times, so I think its my time to add this.

Looking for some feedback on a few things:

  1. Javadocs = I think I described things well? But always looking for feedback. Especially with the return value
  2. Using CraftItemStack.asNMSCopy() = I chose this method to prevent actually damaging the original ItemStack, allowing the dev to do the damage themselves, they may or may not want this.
    Opinions here would be appreciated. Should it be a copy? Should it be the original?
    Another option could be nixing the ItemStack all together, and internally handle it (grab based on slot chosen), maybe a boolean like shouldDamage, where could then decide to use copy/original.
    This could go so many different ways, so feedback would be nice :)
rustic folioBOT
rustic folioBOT
#

This PR aims to add an option to ChunkGenerator.ChunkData to get the current height.
This allows to get the height generated in a previous step.
For example, let's say I have a generator where I allow Minecraft to generate the noise, but I want to generate the surface.
I can get the height that was previously generated in the noise step, and plop my surface block on top of that in the surface step.

Closes #12048

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Spigot added a RegistryAware implementation to few classes (like enchantments, sounds, particles ...), see this commit.

Observed/Actual behavior

But Paper API doesn't seem to have done this implomentation.
So when spigot plugins use some of RegistryAware's methods on Paper servers, an NoSuchMethodError is thrown.

Steps/models to reproduce

Use the spigot's getKeyOrNull method on an Enchantment object, for example.

Plugin and Datapa...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Yep it was added back in 2023, PR #8782

Paper/paper-api/src/main/java/org/bukkit/entity/Player.java

Lines 2131 to 2137 in bb1beda

 /** 
  * Lists the {@code other} player. 
  * 
  * @param other The other {@link Player} to list. 
  * @return True if the {@code other} player was not listed. 
  */ 
 boolean listPlayer(Player other);

listPlayer() how does it work? What I want to do is hidePlayer() without hiding the target player from the tab.

#

Yep it was added back in 2023, PR #8782
Paper/paper-api/src/main/java/org/bukkit/entity/Player.java
Lines 2131 to 2137 in bb1beda

 /** 
  * Lists the {@code other} player. 
  * 
  * @param other The other {@link Player} to list. 
  * @return True if the {@code other} player was not listed. 
  */ 
 boolean listPlayer(Player other);

listPlayer() how does it work? What I want to do is hidePlayer() without hiding the target player from the tab.

maybe like this?

player.hidePlayer(plugin, otherPlayer);
player.listPlayer(otherPlayer); //make appears again in list

also can go to discord for more help.

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

I tested with passing in a Diamond (that was enchanted) as well as a fishing rod.
Both "work", but they don't really seem to do much.

The luck appears to be based on the fishing rod that cast the fish hook, so I'm not even sure what the itemstack is used for. (I see it's used in the LootTable thingy, but I dont know what it's actually providing).

That said, my apologies, but I dont understand what you're asking me to change?

#

I personally don't see a reason to restrict that.
I have limited knowledge of LootTables so Im not sure what the LootTable is actually looking for, but I feel other people are most likely more versed on that topic and may find it useful to pass in other random items.

Minecraft doesn't appear to restrict it and/or get mad about it. So I feel it should stay as is.
(Also, with all the new components Mojang keeps adding, who knows what they'll bring next. Leaving this open makes it more future safe)

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

The EntityTeleportEvent event fires once when an entity teleports, with for example the /minecraft:tp command.

Observed/Actual behavior

The EntityTeleportEvent event fires twice when an entity teleports.

Steps/models to reproduce

I used a plugin called ExecutableEvents that utilizes this event. It allows you to fire commands when one of these events happen. According to the plugin developer, this does indeed use the EntityTeleportEvent event and fires twice.

Plugin and Datapack List

Image

Image

Paper version

[10:31:55 INFO]: Checking version, please wait...
[10:31:55 INFO]: This server is running Paper version 1.21.4-211-main@6ea4202 (2025-03-13T11:49:31Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are 1 version(s) behind
Download the new version at: https://pap...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Currently, there is no way to prevent critical damage for specific damage instances. Simply if the conditions for crit are met, it will be crit, otherwise, it won't. You can disable it in config, but that's too global.

Describe the solution you'd like.

Currently, there are two events revolving player attack: PrePlayerAttackEntityEvent and EntityDamageByEntityEvent.

Former is too soon for decision of crits and the latter is too late.

I would suggest adding something like preventCriticalHit() method to PrePlayerAttackEntityEvent, which would prevent the whole crit logic.

I will gladly make a PR for that, but wanted to ask whether something like this has chance on being accepted, before I start working on it...

Describe alternatives you've considered.

I could use PrePlayerAttackEntityEvent to give player a Blindness effect, prevent blindness packets from being sent to the player, then removing the effect in DamageE...

rustic folioBOT
rustic folioBOT
#

Would fit well on PreAttack yea. Arrows already have a setter so, that ought to work out.
I personally wouldn't mind it, I don't think it is particularly the most intuitive of APIs but given how vanilla sadly works here in terms of damage computation, we can't just "revert" the critical modifier down the line.

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

I'd prefer document that broken behaviour in the constructor of ItemStack and setAmount (and the related methods to it), and then mention the few methods that support those oversized stack in the first place. Then some replacement to those methods can be added and at the end the precondition after some times. There's no need to be overly focused on those methods.

You mean also add more mentions not?

rustic folioBOT
#

In my opinion just preventing creation of such itemstacks in the first place would be better instead of dealing with individual cases like this.

The codec being unable to encode stacks with invalid amounts leads to inventories not saving, so data loss. That is pretty catastrophic, especially as that will affect the entire inventory and not just the oversized item itself.
The client is also unable to decode the stack, so previous uses of invalid stacks like GUI displays etc. are no longer possible. I really don't see why this still has to be allowed in the API, at all.

So if we continue this down route instead of disabling oversized stacks outright, but still want to prevent plugins using the API from accidentally causing data loss or client errors, we would need to add checks to every other API method that causes items to be sent to the client, or to be placed/modified in an inventory.

The only method where it somewhat makes sense is creating ItemStacks and then using Inv...

rustic folioBOT
#

depends on how you do the limit, you either risk losing items or potentially introducing unexpected behavio

An addition to this: since vanilla often clamps the count, a lot of affected API already has losing behaviour, like Inventory#setItem having an inconsistent behaviour of sometimes clamping and sometimes leaving the count as it is (it depends on the nms Container implementation)

rustic folioBOT
rustic folioBOT
#

At the moment, if we want to get a cookie during the login process, we have to stall the PlayerLoginEvent, which is way worse than stalling the AsyncPlayerPreLoginEvent. There is a reason we want to access cookies data during the login process: we might want to decide whether to reject a player based on a cookie, and it would be much better if we could do this before player authentication. This is also particularly useful if we could, for instance, skip the player's authentication process and just let them in onto the server, so that every time we transfer a player between our servers, we won't have to make them wait for authentication.

I am proposing a simple solution to this: plugins register one or more namespaced keys representing a cookie to the API (similar to how we do it with plugin channels) so that just before the AsyncPlayerPreLogin event those cookies are being retrieved from the client, making them available on the AsyncPlayerPreLogin event with a "getRegisteredCooki...

rustic folioBOT
#

Thanks for the quick reply. That's great news. I hope I can use that soon, it would solve all my issues!
Is there any chance we can get a method to decide whether to run the session authentication with Mojang on the AsyncPlayerPreLogin event? That way, we can allow direct connections to the server by properly authenticating players, and at the same time have players being transferred from other trusted servers not authenticate with Mojang (plugin devs will handle this properly with session cookies). Thanks!

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I do agree that this system in general can be improved. The Entity#canSee check can also be quite heavy when entities are hidden from many players. But I think this is outside the scope of this PR. My goal was to fix that cancelling the PlayerTrackEntityEvent leads to a inconsistent state. If this approach is considered too hard of a performance hit then I am happy to wait for a broader rework of the tracking system. However I don't think this is too much of a problem with my updated implementation. The event will only be called upon initial tracking or for entities for which tracking was cancelled by this event. So for servers that aren't cancelling this event at all there should be no performance impact at all.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

I'm currently trying to detect when a player interacts with an item, here I mean just right/left click with it. We currently can only use the PlayerInteractEvent, which is called in a number of other cases, because hand swinging also triggers it with an action of LEFT_CLICK_AIR.

Describe the solution you'd like.

I'd like a way to distinctively detect when a player right/left clicks with an item, including the information about the click, like in the PlayerInteractEvent aka. with left click block, left click air etc. and knowledge about the item.

I partly want this for GUIs that are opened when a player left clicks with an item: Using the PlayerInteractEvent would also open the GUI when holding the item being detected and dropping any "other" item in the inventory which is not wanted.

I'd specifically prefer a new event over additional information in the PlayerInteractEvent, in order to reduce the usage of said ev...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

After a quick test, it does indeed call PrepareItemCraftEvent when it displays the result, allowing the display to be modified in the Crafter. However, if you want to create a custom item without using Bukkit#addRecipe (as we do with PrepareItemCraftEvent), CrafterCraftEvent isn’t called. Therefore, I think we would need to create a new event, something like PreCrafterCraftEvent, which would anticipate the check on existing crafts so we can choose the result.

rustic folioBOT
#
[PaperMC/Paper] New branch created: update/generators
rustic folioBOT
#

I can still reproduce this issue

I can't find exactly when this got fixed, but we now check if the connection is still open before going through this logic, which fixes this issue.

iirc that was there before. The problem resides
here https://github.com/PaperMC/Paper/blob/bb1beda67bfd94632815acc8ac5d68f5a8e3e410/paper-server/patches/sources/net/minecraft/network/Connection.java.patch#L238-L249
and (actually where the event is fired) https://github.com/PaperMC/Paper/blob/bb1beda67bfd94632815acc8ac5d68f5a8e3e410/paper-server/patches/sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch#L70-L72
The isConnected checks if the channel is still open, but since this part of the process runs on the server thread, Channel#close needs to jump to the netty event loop. No clue why this would take multiple tick-times to process, especially on a simple test server, but I guess it can. Simple solution would be to gate disconnection behind a CAS and have isConnected che...

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

Expected behavior

.hasMeta() should never throw due to the ItemStack containing an improper NamespaceKey in its data.

Observed/Actual behavior

When an ItemStack contains an invalid NamespacedKey .hasMeta() will throw the error below.

java.lang.IllegalArgumentException: Invalid key. Must be [a-z0-9/._-]:
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:218) ~[guava-33.3.1-jre.jar:?]
        at org.bukkit.NamespacedKey.validate(NamespacedKey.java:119) ~[paper-api-1.21.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.NamespacedKey.<init>(NamespacedKey.java:91) ~[paper-api-1.21.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(CraftNamespacedKey.java:24) ~[paper-1.21.4.jar:1.21.4-214-894631f]
        at org.bukkit.craftbukkit.attribute.CraftAttributeInstance.convert(CraftAttributeInstance.java:110) ~[paper-1.21.4.jar:1.21.4-214-894631f]
        at org.bukkit.craftbukkit.inventory.CraftMetaItem.b...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

these jdocs are still kinda misleading/unclear. Perhaps an example for a bed and for a respawn anchor could be included. Besides i think we should stick to returning a Location as returning an air block when the player had their spawn location changed in another way feels weird because the block itself isn't directly linked to the player having their respawn location there. getRespawnBlockLocation might be a good name then (also makes it clear that this doesn't just return the block at the location of #getRespawnLocation).

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

This PR aims to remove the player as vehicle restriction in the vanilla /ride command.
Its well know that the API allows mounting any entity to the player as a passenger, so it seems fitting to allow this in the ride command as well.
Unfortunately Mojang imposed a restriction here.
Some people may often rely on this command for funsies, or possibly even for debugging/testing when writing code.

rustic folioBOT
rustic folioBOT
#

I just started a server running on Debian using the Microsoft OpenJDK and for a few days it worked but now my server is throwing that same error that eventually leads to the server not even starting. I've tried multiple world seeds and attempted different server starting configurations nothings works. I cannot copy any logs due to my server being primarily headless. On closer inspection my error string is reported it to be "Cuased By: java.util.zip.ZipException: invalid distance too far back" but shows the same failure states for everything else. Unsure why I have a corrupt chunk or why it seems to appear on any seed, I'm almost convinced I'm having a permission issues but that should all be set correctly. Running stable branch Paper version 1.21.4-214.

rustic folioBOT
rustic folioBOT
#

Expected behavior

Every time a signed written book and a wither skeleton skull are dropped together, a player skull should spawn with the texture matching the book's author name. This behavior should be consistent across multiple attempts, with no degradation or fallback to default textures (e.g., "Steve"). The correct workflow observed in Fabric 1.21.4—where the skull texture always matches the book's author—demonstrates the intended functionality.

Observed/Actual behavior

Versions:

PaperMC: 1.21.4#211 1.21.4#114 1.21.3#82 (reproducible in both)
Minecraft: 1.21.4
Datapack: Player_skull_maker (unknown version, attached in report)
Working reference: Fabric 1.21.4 (no issue observed)
Description:
When using the Player_skull_maker datapack, dropping a signed written book and a wither skeleton skull generates a player skull. The first execution works correctly (skull matches the book's author), but subsequent attempts produce a default "Steve" skull instead. This suggests...

rustic folioBOT
#

Is your feature request related to a problem?

When dynamically creating worlds with the goal of an in-game map editor, saving a world does, by default, not flush the level data save. (World#save() calls ServerLevel#save(null, false, false). The first false declaring the flush variable). This makes subsequent file copy operations on the world folder unreliable, as not all chunks have been saved yet.

Describe the solution you'd like.

I would like to expose another function, World#save(boolean flush), which allows an API user to directly set the flush parameter without relying on internals.

Describe alternatives you've considered.

Currently, the only way to achieve this is with the use of internals. More specifically:

final World world = ...;
((CraftWorld) world).getHandle().save(null, true, false);

Other

None 🚀

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

Is your feature request related to a problem?

Back in the day I would build Spigot locally and add it as a test dependency. This allowed me to write unit tests for my plugins that, quite frankly, never steered me wrong.

I stuck with making "spigot plugins" for a very long time because I couldn't reasonably do the same with Paper. As Paper has diverged, and now has hard-forked, I've had to make the switch and there is much I can no longer unit test.

Describe the solution you'd like.

I'd like to be able to add Paper as a test dependency, even if I have to build it locally to make it work, and for Paper to expose a simple static method tests can call that will bootstrap Paper, all the registries, all the enum replacements (Biomes, PotionEffects, etc.), and allow plugin developers to properly unit test their code.

Describe alternatives you've considered.

MockBukkit - it's a nice attempt but it will NEVER have parity with the real thing. I'm constantly running into gap...

#

This is something I can see being of interest, but, I'm not sure this would be something we'd be able to take as an internal project right now with everything moving around, both on our side but also mojang working through some substantial changes around this area; This is also generally more of a userdev thing rather than the part of the API that we "lovingly expose", and so, would not be a high priority sorta deal, even though, I see it as being somewhat of an inevitable thing when stuff is being more data defined rather than hardcoded values inside of a registry.

Maybe there is some interest for outside collab here

rustic folioBOT
rustic folioBOT
#

We shouldn't allow plugins to pass in an itemstack at all. instead we should get the itemstack thats in the provided hand and ensure its a fishing rod. i am not sure whether calling this method with a stack other than a rod will cause any internal problems however i think it might cause some issues for plugins expecting the PlayerFishEvent to always be called with a rod

I can definitely change it, since it seems to be consensus.

for the record:

i am not sure whether calling this method with a stack other than a rod will cause any internal problems

The passed ItemStack appears to be only used for criteria triggers and for the loot table. (Although not sure what it does exactly in the loot table)

however i think it might cause some issues for plugins expecting the PlayerFishEvent to always be called with a rod

The event doesn't use this itemstack, it appears to grab straight from the slot of the player.

I guess at the end of the day its pretty useless to allow...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: master
#
[PaperMC/Paper] branch deleted: brain
#
[PaperMC/Paper] branch deleted: rework-bstats
#
[PaperMC/Paper] branch deleted: fix/persistence
#
[PaperMC/Paper] New branch created: fix/persistence
#
[PaperMC/Paper] New branch created: rework-bstats
#
[PaperMC/Paper] branch deleted: mappings/mojang/base
#
[PaperMC/Paper] branch deleted: fix/remove-world-name
#
[PaperMC/Paper] branch deleted: feat/WorldUnloadResult
#
[PaperMC/Paper] branch deleted: feature/tag-modification-api
#
[PaperMC/Paper] branch deleted: feat/max-map-deco-limit
#
[PaperMC/Paper] branch deleted: attempt/teleport-crash
#
[PaperMC/Paper] branch deleted: improve-sysoutcatcher
#
[PaperMC/Paper] branch deleted: version-catalogs
#
[PaperMC/Paper] branch deleted: merged-properties
#
[PaperMC/Paper] branch deleted: feature/snbt-serialization
#
[PaperMC/Paper] branch deleted: feature/bibliothek
#
[PaperMC/Paper] branch deleted: brig-command-dispatcher
#
[PaperMC/Paper] branch deleted: experimental
#
[PaperMC/Paper] branch deleted: feat/plugin-scoped-resources
#
[PaperMC/Paper] branch deleted: experiment/sectorfile
#
[PaperMC/Paper] branch deleted: cre-not-called
#
[PaperMC/Paper] branch deleted: player-join-ticket
#
[PaperMC/Paper] branch deleted: rework-bstats
#
[PaperMC/Paper] branch deleted: fix/persistence
#
[PaperMC/Paper] branch deleted: feature/bytecode-modification
#
[PaperMC/Paper] branch deleted: feature/improve-Registry
#
[PaperMC/Paper] branch deleted: feature/position-split