#paper

1 messages ยท Page 13 of 1

rustic folioBOT
#

Youโ€™re missing the actual causing part of the error, and are also outdated

On Wed, 24 Jul 2024 at 13:06, Senken12 @.***> wrote:

Stack trace

at wf.a(SourceFile:33)
at zj.a(SourceFile:62)
at fzc.a(SourceFile:136)
at fzc.a(SourceFile:127)
at vt.exceptionCaught(SourceFile:161)
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346)
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:325)
at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:317)
at io.netty.channel.DefaultChannelPipeline$HeadContext.exceptionCaught(DefaultChannelPipeline.java:1377)
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346)
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:325)
at io.n...

#

Youโ€™re missing the actual causing part of the error, and are also outdated
โ€ฆ
On Wed, 24 Jul 2024 at 13:06, Senken12 @.***> wrote: Stack trace at wf.a(SourceFile:33) at zj.a(SourceFile:62) at fzc.a(SourceFile:136) at fzc.a(SourceFile:127) at vt.exceptionCaught(SourceFile:161) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:325) at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:317) at io.netty.channel.DefaultChannelPipeline$HeadContext.exceptionCaught(DefaultChannelPipeline.java:1377) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:325) at io.netty.channel.DefaultChannelPipel...

rustic folioBOT
#

Adds bunch of basic API to get/set properties of vault blocks

Not finished but opening to get some feedback on structure and whatnot

All accessing of VaultServerData is done through TileEntity instead of a snapshot, due to snapshot always having a ServerLevel null
Therefore VaultServerData would always return null
Unsure if its a bug in my implementation or another issue
image

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New tag created: 1.20.6
#
[PaperMC/Paper] New tag created: 1.20.4
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Note: This is copied from an upstream bug report SPIGOT-7846

Hanging sign items should return a BlockStateMeta (CraftMetaBlockState) when calling ItemStack#getItemMeta and ItemFactory#getItemMeta.

Observed/Actual behavior

Hanging sign items return an unspecific CraftMetaItem.

Steps/models to reproduce

public void onEnable() {
    getLogger().info(Bukkit.getItemFactory().getItemMeta(Material.OAK_SIGN).getClass().getName());
    getLogger().info(Bukkit.getItemFactory().getItemMeta(Material.OAK_HANGING_SIGN).getClass().getName());
} 

Result:

[18:20:51 INFO]: [Paper-Test-Plugin] org.bukkit.craftbukkit.inventory.CraftMetaBlockState
[18:20:51 INFO]: [Paper-Test-Plugin] org.bukkit.craftbukkit.inventory.CraftMetaItem

Both should return a CraftMetaBlockState.

Plugin and Datapack List

Paper test plugin only

Paper version

Built from 5a5035be

Othe...

#

Expected behavior

ItemStack#setAmount should be restricted to 1-99 and refuse values outside the allowed range.

Observed/Actual behavior

ItemStack#setAmount can be used to set the count to any value. Setting it to a value outside the allowed range of 1-99 causes saving to break for the inventory the item stack is in (e.g. the player's), as the ItemStack codec will throw when trying to parse the item:
IllegalStateException: Value must be within range [1;99]: 128

The entire inventory will not save, not just the invalid stack:

[03:38:25 WARN]: Failed to save player data for Malfrador
net.minecraft.ReportedException: Saving entity NBT

Steps/models to reproduce

  1. Set an ItemStack count to an invalid value, for example with player.getInventory().getItem(0).setAmount(128);
  2. Disconnect to trigger an inventory save
  3. An exception will be thrown.
  4. Log back in and notice your inventory did not save

Plugin and Datapack List

not relevant

P...

rustic folioBOT
rustic folioBOT
#

I was debating on talking about this, the big issue however is all the legacy logic that exists surrounding this, I'm not sure it's tenable to make this a hard fail right now, especially as many plugins use oversized stacks internally, it only becomes an issue if placed into inventories or the world

I wonder if this is one where it kinda makes sense to record the causing trace if an oversized stack is created and then print that if added into something where it would cause issues, i.e. inventories, the world, etc

rustic folioBOT
#

Expected behavior

Casting Block from CrafterCraftEvent to org.bukkit.block.Crafter should be possible.

Observed/Actual behavior

Following error occures when type cast is performed

Steps/models to reproduce

use something similar to this

@EventHandler
void event(CrafterCraftEvent e)
{
Crafter c = (Crafter) e.getBlock();
}

Plugin and Datapack List

13:36:38 INFO]: Server Plugins (14):
[13:36:38 INFO]: Bukkit Plugins:
[13:36:38 INFO]: - ICraft2.0-Special, *JoinFullServer, Multiverse-Core, Multiverse-Inventories, Multiverse-Portals, NoChatReports, *PermissionsEx, PexTabCompleter, ProtocolLib, *SimplePrefix-Reloaded
[13:36:38 INFO]: TreasureChestX, *VoidWorld, WorldEdit, WorldGuard

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

Paper version

13:37:14 INFO]: Checking version, please wait...
[13:37:14 INFO]: This server is r...

#

Since it may be challenging to identify or fix the cause of the issue, please try not to put too much pressure on the developers. Thank you for your understanding. :)

While I strongly agree with this point, I also think we should still show how much of an impact this is really having by respectfully stating that we're affected by it.

Definitely do not pressure the lovely devs who make this awesome software who should be praised for it BUT still respectfully say you're affected and would like to see this fixed. At least that's my opinion and I just wanted to share it :)

rustic folioBOT
#

Expected behavior

Max interaction range server-side was 6 blocks, this could result in hits not registering for players with very high ping, but it was uncommon.
In 1.20.5 and onwards, mojang lowered it to 4 blocks, this makes hits not registering a lot more common.

Observed/Actual behavior

in 1.20.5+, mojang lowered the max interaction range from 6 to 4 blocks.

1.20.4 (6 blocks):
public static final double MAX_INTERACTION_DISTANCE = Mth.square(6.0D); if (axisalignedbb.distanceToSqr(this.player.getEyePosition()) < ServerGamePacketListenerImpl.MAX_INTERACTION_DISTANCE) {

1.20.5 (+1 block reach expansion = 4 blocks):
if (this.player.canInteractWithEntity(axisalignedbb, 1.0D)) {

This is causing hit registration issues on my server and other PVP servers.
The max interaction range should be raised back to 6 or perhaps be configurable.

Steps/models to reproduce

If a player with 250ms ping is attacking another player who is sprinting away with spee...

#

Fixes #11163

In 1.20.5, mojang, failing to consider network latency, lowered the max interaction range from 6 blocks to 4.
This causes hits from high latency players in specific scenarios such as the target sprinting away to not register.
this patch increases the expansion to 3 blocks, meaning the max interaction range is 6 blocks, as it was in 1.20.4

rustic folioBOT
#

My initial reason for creating this issue was that I did update and only noticed that it made inventories unsavable after a plugin added such stacks to every inventory.

Maybe instead of hard failing with an exception just limit the stack to 99 when it's added to an inventory? Not the biggest fan of such a silent behaviour change either though tbh.

The addItem method correctly splits up an oversized stack into two when adding it to an inventory.

rustic folioBOT
rustic folioBOT
#

Generally, I think this is a valid enough solution.

Alternatively we could have override deflect in AbstractArrow
instead, store previous state there and restore. Kinda annoying tho
as it does unwanted computation.

The diff right now also uses an early return, so we are hoping setOwner isn't further abused
in regards to added logic, so that future versions do not have logic skipped there that would
have been needed.
Seems unlikely tho, so I am fine with this under the pretext of minimal diff.

rustic folioBOT
#

depends on how you do the limit, you either risk losing items or potentially introducing unexpected behavior, I would probably just add a debug mode that causes it to store a stack trace whenever the amount limit is exceeded and print a warning when it's sent somewhere precarious, maybe on saving it makes sense to cap it as a "better losing some than everything", but, I'm not sure what the best behavior would be otherwise

rustic folioBOT
#

Expected behavior

Shaped and shapeless crafting recipes output their corresponding result regardless of the 'usingConvertsTo' properties of the ingredients.

Observed/Actual behavior

Shaped and shapeless crafting recipes register and show up correctly in the recipe book. However, putting the ingredients into the crafting table doesn't give an output item at all if one of the ingredients contains a food component with a 'usingConvertsTo' property.

Steps/models to reproduce

  1. Create a crafting recipe (shaped or shapeless) with one of the ingredients being an item that has a usingConvertsTo property.
  2. Try to input the recipe into a crafting table

Example:

  1. Create an ItemStack of material Material.PAPER
  2. Retrieve a food component from the itemstack using ItemMeta#getFood()
  3. Set an ItemStack of material Material.DIRT as the usingConvertsTo using FoodComponent#setUsingConvertsTo(ItemStack var1)
  4. Create a recipe using the first itemstack a...
rustic folioBOT
#

usingConvertsTo does not seem to be relevant, it is just that the item has a food-component and the recipe does not
Im guessing this is a similar issue as to when items have enchantments, lost durability and so on
Another example where the PredicateChoice PR would be useful

no food component, as recipe intends:
<img src="https://github.com/user-attachments/assets/f0209afc-f565-41fa-8c89-df458f22c200" width=50% height=50%>

food component with/without usingConvertsTo:( no result)
<img src="https://github.com/user-attachments/assets/83333086-bfaf-4fad-8557-66f617486d50" width=50% height=50%><img src="https://github.com/user-attachments/assets/d82e58f8-0204-4a6b-9fd6-46debfe21295" width=50% height=50%>

rustic folioBOT
#

Okay, I did some more tests on that. Here's what I found:

  1. When you create a recipe and tell it to use an item that has a food component via RecipeChoice.ExactChoice then it will give the correct output (assuming that the input item has the correct food properties of course)
  2. When you create a recipe and tell it to use an item that has a food component with a usingConvertsTo property, it won't give you an output even if the input item has exactly the usingConvertsTo defined in the recipe (and the other properties are also correct)
  3. When you create a recipe that just uses a material and no RecipeChoice.ExactChoice, the crafting table will output the correct result even if the input has a food component and a usingConvertsTo property

So we have two "variables":

  1. The recipe expects the input item to have usingConvertsTo
  2. The input item actually HAS usingConvertsTo

The test results are:

  1. If expected and provided, it doesn't craft...
#

Not able to reproduce the part where if the recipe expects an ingredient with food-component that has usingConvertsTo it will never work
On my end it seems to work fine

https://github.com/user-attachments/assets/c345b050-cc74-4cb3-9c62-75e93e0a4a8f

All it would do is compare itemmeta 1:1, and since these match, it is correct
Still PredicateChoice or some other form of way to specify an item in a recipe is heavily needed
Custom Items in recipes are painful to deal with because of the need for ExactChoice, thus breaking with enchantments, durability and other such component/meta differences

rustic folioBOT
#

Not able to reproduce the part where if the recipe expects an ingredient with food-component that has usingConvertsTo it will never work On my end it seems to work fine

Still doesn't work for me.
For context: I have an item (cooked rice) that converts to a bowl when eaten (because the cooked rice is crafted with a bowl). I wanted to create a recipe for sushi that uses the cooked rice, dried kelp and cooked salmon.
I created the recipe using ExactChoice, it showed up correctly in the recipe book, but when I input the items, it doesn't give me an output at all.
I know that this is almost exactly the same you showed in the video, but I wonder what I did wrong/what is wrong with the recipe or the items.
Crafting with my other food items that don't have usingConvertsTo works absolutely fine.
Also, when I remove the usingConvertsTo from the cooked rice item, it works just fine.

rustic folioBOT
#
  • Adds overloads to World#rayTrace and World#rayTraceBlocks that take a BlockCollisionMode, instead of the boolean ignorePassableBlocks, to determine block collisions.
  • Add missing FluidCollisionMode.WATER.
  • Remove outdated javadocs on World#rayTrace and World#rayTraceBlocks that mention caveats with portal blocks and fluids that no longer exist. Portal blocks are always considered passable, and the value of ignorePassableBlocks has no effect on fluid collisions.
rustic folioBOT
#

Expected behavior

Explosions created using World#createExplosion should deal damage and knockback to all entities within the range of the explosion, including the entity specified as the explosion cause.

Observed/Actual behavior

Explosions created using World#createExplosion deal the proper damage and knockback to all entities other than the entity specified as the source argument.

Steps/models to reproduce

I encountered this issue while developing my plugin. The instant TNT feature does not work correctly because of this, and functions as described above.

Steps to reproduce:

  • Create a new server with the latest vers...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Bedrock breaking to work like in vanilla.

Observed/Actual behavior

Bedrock breaking does not work like in vanilla.

Steps/models to reproduce

Follow the steps in the video:
https://www.youtube.com/watch?v=azfFQP7y-Z8

Plugin and Datapack List

none

Paper version

This server is running Paper version 1.21-109-master@5a5035b (2024-07-23T08:16:30Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21-99-f1f01a1 (MC: 1.21)

Other

No response

rustic folioBOT
#

"mirror" ItemStacks are already in inventories.

Yes I forgot about them... This makes things much more complicated

Plugins doing things like overstacking, but not actually doing anything with the stack seems like not a good reason to keep that behavior.

It's not that plugins could not do anything, things like Inventory.addItem and Inventory.removeItem always worked with oversized stacks and splitted them.. Many of our plugins currently use that behaviour and it is currently explicitly allowed as it is described in those javadocs

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

killing the raid captain in a raid makes other illagers pick up the banner to become the new captain

Observed/Actual behavior

well ... they dont, they dont even try

Steps/models to reproduce

spawn raid, kill captain, check what happens. I spawn the raid waves in the usual 5x5 square used in raid farms to make it easier to observe, but the issue applys to any raid wave.

Plugin and Datapack List

no datapacks or plugins on the server (i created a vanilla and paper testserver to investigate this issue)

Paper version

[11:05:31 INFO]: Checking version, please wait...
[11:05:31 INFO]: This server is running Paper version 1.21-109-master@5a5035b (2024-07-23T08:16:30Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
You are running the latest version

Other

i noticed the issue when building an ominous bottle farm on a public paper server, while testing in a vanilla local singleplayer world.
to test if its a issue with paper i created a ...

rustic folioBOT
#

Expected behavior

Plain text should mean plain text, and it did pre 1.20.5, now it includes color codes, legacycomponentserializer should support color codes

Observed/Actual behavior

a

Steps/models to reproduce

a

Plugin and Datapack List

N/A

Paper version

This server is running Paper version 1.21-DEV-master@5a5035b (2024-07-25T12:25:25Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21-DEV-aa36ae6 (MC: 1.21)

Other

No response

rustic folioBOT
rustic folioBOT
#

Expected behavior

Spark commands should be run right away when the user input is detected.

Observed/Actual behavior

Spark command is actually taking some time when it's command first executed, regardless of any arguments or typo included in it's
arguemnt.

Steps/models to reproduce

  1. Launch a Paper server (latest)
  2. Run any Spark command (ex: spark tps)
  3. Run any Spark command again and you can see it's execution being delayed. Seems like it's not happening all executions.

Plugin and Datapack List

Plugins:

> pl
[21:02:42 INFO]: Server Plugins (0):

Datapacks:

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

Paper version

> version
[21:03:25 INFO]: Checking version, please wait...
[21:03:26 INFO]: This server is running Paper version 1.21-109-master@5a5035b (2024-07-23T08:16...
rustic folioBOT
rustic folioBOT
#

This is working as intended, it's collecting the contents of the components into a string, it does not promise to perform any operations on malformed component contents

These "malformed component contents" are produced by DFU, the item itself was made pre 1.16 using itemstack.setdisplayname and itemstack.setlore, instead of converting &aTest to {color:green,content:Test} it seems to make it into {content:&aTest}

rustic folioBOT
rustic folioBOT
#

Expected behavior

When using setLeashHolder method on llama with Wandering Trader llama becomes successfully leashed.

Observed/Actual behavior

Only wandering traders appears when llamas are leashed to him

Steps/models to reproduce

If I use following lines:

Location origin = <logic for getting proper location>
WanderingTrader trader = (WanderingTrader) origin.getWorld().spawnEntity(origin, EntityType.WANDERING_TRADER);
Llama llama1 = (Llama) origin.getWorld().spawnEntity(origin, EntityType.TRADER_LLAMA);
Llama llama2 = (Llama) origin.getWorld().spawnEntity(origin, EntityType.TRADER_LLAMA);

Both llamas and wandering trader spawns, but when I add those 2 lines only wandering trader appears

llama1.setLeashHolder(trader);
llama2.setLeashHolder(trader);

Plugin and Datapack List

[00:25:48 INFO]: Server Plugins (17):
[00:25:48 INFO]: Bukkit Plugins:
[00:25:48 INFO]: - dynmap, ICraft2.0-Special, *JoinFullServer, LogBlock, Multiverse-Core...

rustic folioBOT
#

Stack trace

[21:07:35] [Paper Watchdog Thread/ERROR]: The server has stopped responding! This is (probably) not a Paper bug.
[21:07:35] [Paper Watchdog Thread/ERROR]: If you see a plugin in the Server thread dump below, then please report it to that author
[21:07:35] [Paper Watchdog Thread/ERROR]: 	 *Especially* if it looks like HTTP or MySQL operations are occurring
[21:07:35] [Paper Watchdog Thread/ERROR]: If you see a world save or edit, then it means you did far more than your server can handle at once
[21:07:35] [Paper Watchdog Thread/ERROR]: 	 If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes
[21:07:35] [Paper Watchdog Thread/ERROR]: If you are unsure or still think this is a Paper bug, please report this to https://github.com/PaperMC/Paper/issues
[21:07:35] [Paper Watchdog Thread/ERROR]: Be sure to include ALL relevant console errors and Minecraft crash reports
[21:07:35] [Paper...
#

How certain are you that such a change does not break existing game mechanics?

Unless I am missing something, the current logic, while being costly due to the sync chunk load, would still load the respective chunk and perform the spawn. The chunk spawned in may be unloaded and the entity may be discarded then, but that isn't really a given.

Beyond that, a lot of other spawn placement types perform such checks. Should a patch like this (if we determine this change to not affect gameplay) also fix other spawn placement types?
Or does the fact that really only zombie reinforcements being the issue maybe mean we could just move this check into the zombie logic instead.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

This actually wouldn't work too since entity_effect take an argb integer and not a rgb so you would need to support both format in color(int) and handle conflict when the alpha channel is not set (for rgb it should be opaque, for argb it should be transparent).
I still believe there's no issue here except maybe the method name which is too generic but people should use #data directly for entity_effect.

rustic folioBOT
rustic folioBOT
#

How certain are you that such a change does not break existing game mechanics?

Unless I am missing something, the current logic, while being costly due to the sync chunk load, would still load the respective chunk and perform the spawn. The chunk spawned in may be unloaded and the entity may be discarded then, but that isn't really a given.

Beyond that, a lot of other spawn placement types perform such checks. Should a patch like this (if we determine this change to not affect gameplay) also fix other spawn placement types? Or does the fact that really only zombie reinforcements being the issue maybe mean we could just move this check into the zombie logic instead.

You could go either way, just fixing the zombie reinforcements would be simpler but there is a similar scenario that is possible in the WanderingTraderSpawner:

 @Nullable
    private BlockPos findSpawnPositionNear(LevelReader world, BlockPos pos, int range) { // range = 48
        Bloc...
#

So this is a rather annoying issue.
The equality check (far far down the line) compares two Optional<ItemStack> instances with each other.
ItemStack#equals does not exist. They are supposed to be compared with alternative methods. The two different ItemStack instances in there fail to compare, so the item fails.

diff --git a/src/main/java/net/minecraft/world/food/FoodProperties.java b/src/main/java/net/minecraft/world/food/FoodProperties.java
index c60cdb3ef4..57347bcb43 100644
--- a/src/main/java/net/minecraft/world/food/FoodProperties.java
+++ b/src/main/java/net/minecraft/world/food/FoodProperties.java
@@ -16,6 +16,20 @@ import net.minecraft.world.level.ItemLike;
 public record FoodProperties(
     int nutrition, float saturation, boolean canAlwaysEat, float eatSeconds, Optional<ItemStack> usingConvertsTo, List<FoodProperties.PossibleEffect> effects
 ) {
+    // Paper start - correct equality check
+    @Override
+    public boolean equals(final Object o) ...
rustic folioBOT
#

Paper has a changed behavior from Spigot regarding the EntityKnockbackByEntityEvent from Bukkit. This event is deprecated for Paper but this event shouldn't behave different than on Spigot.

The method org.bukkit.event.entity.EntityKnockbackByEntityEvent#getSourceEntity() returns different entities on Spigot than on Paper:

Used code:

    @EventHandler(ignoreCancelled = true)
    public void onEntityKnockbackByEntity(EntityKnockbackByEntityEvent event) {
        Entity damager = event.getSourceEntity();

        WorldGuardPlugin.inst().getLogger().info("Knockback from damager: " + damager.getClass().getCanonicalName());
    }

Spigot will call two events. I'm not sure why there are two events called.

[16:42:08] [Server thread/INFO]: [WorldGuard] Knockback from damager: org.bukkit.craftbukkit.v1_21_R1.entity.CraftPlayer
[16:42:08] [Server thread/INFO]: [WorldGuard] Knockback from damager: org.bukkit.craftbukkit.v1_21_R1.entity.CraftWindCharge

...

rustic folioBOT
rustic folioBOT
#

This PR is to add an API feature which expands the functionality of World#createExplosion by adding the option to deal damage to the source entity (this is not the default behaviour). This deals with this issue (not technically a bug, but still something that I think should be addressed).

The API is expanded by overloading existing World#createExplosion methods with a new boolean shouldDamageSource parameter. When true, the entity specified as the source will be damaged by the explosion. Existing behaviour is not changed.

#

Expected behavior

Players are respawning in their positions set with the /spawnpoint command

Observed/Actual behavior

Players are respawning in the world spawn, with no option to change that

Steps/models to reproduce

  1. Set a spawnpoint on coordinates different than your world spawn, note them down
  2. Use the kill command on yourself
  3. Observe, where are you going to respawn, compare your current coordinates with the noted custom spawnpoint ones
    For setting the spawnpoint, use the /spawnpoint

Plugin and Datapack List

Plugins: CoreProtect, GSit, ImageMaps, Multiverse-Core, SkinsRestorer, SpigotFixTeamChatPlugin, WorldEdit, WorldEditSelectionVisualizer, WorldGuard
Datapacks: My own works, I can send them over if necessary

Paper version

This server is running Paper version 1.21-106-master@3a47518 (2024-07-21T02:47:23Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
You are 5 version(s) behind
Download the new version at: https://papermc.io/downloads/p...

#

This PR is to add an API feature which expands the functionality of World#createExplosion by adding the option to deal damage to the source entity (this is not the default behaviour). This deals with this issue (not technically a bug, but still something that I think should be addressed).

The API is expanded by overloading existing World#createExplosion methods with a new boolean shouldDamageSource parameter. When true, the entity specified as the source will be damaged by the explosion. Existing behaviour is not changed.

rustic folioBOT
#

Is your feature request related to a problem?

Cancel the player opening a book, or perform an action when the player opens a book.

Describe the solution you'd like.

Add an event when the player to open/close a book.

Describe alternatives you've considered.

Listen for PlayerInteractEvent and check that the player is holding a book and that the player is not interacting with other blocks (such as opening a chest, a door, etc.)
It is impossible to check the behavior of all block interactions.

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

LakeFeature is deprecated and vanilla has moved away from using it for anything except for lava lakes.
The error for unsafe chunk gets you are removing here is an intentional safeguard against bad code, such as that in the dead path in LakeFeature when creating water lakes. While it may appear to 'fix' the problem at hand it is not a proper solution and will cause other more serious problems to go undetected. This should be reported to Mojang if it's reproducible with a datapack. Given the circumstances I don't really think this is something we should care to fix, but if it is it would need to be a targeted change to LakeFeature for the aforementioned reasons.

rustic folioBOT
#

Expected behavior

Currently during hte ocnstruciton of a normal ClientboundLevelChunkWithLightPacket, the boolean ready, is set to true, meaning the connection will be sent the chunk.

Observed/Actual behavior

value ready is not set to true when pulling the object from the codec, this is a problem because if so used this way, the connection will completely break, no packets will be sent to the client anymore due to this.

Steps/models to reproduce

Very simple:

        serverPlayer.getBukkitEntity().getScheduler().runDelayed(this, sc -> {
            for (Chunk chunk : event.getPlayer().getSentChunks()) {
                try {
                    LevelChunk levelChunk = (LevelChunk) serverPlayer.level().getChunk(chunk.getX(), chunk.getZ(), ChunkStatus.FULL, true);

                    ClientboundLevelChunkWithLightPacket packet = new ClientboundLevelChunkWithLightPacket(levelChunk, serverPlayer.level().getLightEngine(), null, null);

                ...
rustic folioBOT
#

This actually wouldn't work too since entity_effect take an argb integer and not a rgb so you would need to support both format in color(int) and handle conflict when the alpha channel is not set (for rgb it should be opaque, for argb it should be transparent). I still believe there's no issue here except maybe the method name which is too generic but people should use #data directly for entity_effect.

I've gone ahead and added the ARGB and tested it with DUST and normal Color and it works with both.

I'm unsure whether I should be changing anything within the color(color, size) function or whether it is fine as I am a bit confused so a bit of clarification would help.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: fix/vanillabiomeprovider
#
[PaperMC/Paper] New branch created: fix/vanilla-command-overriding
#

Expected behavior

A wooden shovel that hides all flags.

Observed/Actual behavior

A wooden shovel that still shows attributes

Steps/models to reproduce

Use ItemMeta in a wooden shovel and add all item flags.
Give yourself the wooden shovel and see it in game.

Plugin and Datapack List

[16:32:47 INFO]: Bukkit Plugins:
[16:32:47 INFO]: - Basics, BlobBuild, BlobDesign, BlobEconomy, BlobLib, BlobRP, BlobTycoon, Citizens, DecentHolograms, ItemEdit
[16:32:47 INFO]: LuckPerms, PhatLoots, PlaceholderAPI, TAB, Vault, VoidGen, VoxelSniper

Paper version

[16:33:11 INFO]: Checking version, please wait...
[16:33:12 INFO]: This server is running Paper version 1.21-113-master@f82bea6 (2024-07-28T18:30:03Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21-51-f7124df (MC: 1.21)

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Removed arbitrary restrictions in CraftAreaEffectCloud, CraftArrow and CraftMetaPotion that prevented adding multiple potion effects of the same type. There seems to be no such restriction in vanilla, and multiple effects of the same type do apply properly.

During testing, I noticed an issue introduced by the handling of EntityPotionEffectEvent that prevented some potion effects from properly applying, when compared to vanilla. I wasn't entirely sure of the best approach to fix this - as such, I tried sticking to the Javadoc description of EntityPotionEffectEvent#isOverride, where if override is true, the previous effect is entirely replaced. As such, a new effect hiding a previous effect is currently not considered "overriding", and EntityPotionEffectEvent#setOverride(true) force applies the new effect, removing the old effect.

Also includes a fix for [MC-259832...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

How certain are you that such a change does not break existing game mechanics?

Unless I am missing something, the current logic, while being costly due to the sync chunk load, would still load the respective chunk and perform the spawn. The chunk spawned in may be unloaded and the entity may be discarded then, but that isn't really a given.

Beyond that, a lot of other spawn placement types perform such checks. Should a patch like this (if we determine this change to not affect gameplay) also fix other spawn placement types? Or does the fact that really only zombie reinforcements being the issue maybe mean we could just move this check into the zombie logic instead.

I have decided just to do the simpler thing of preventing the reinforcements from loading chunks, I will make a separate PR in future to address wandering trader spawning also being able to potentially sync load chunks.

rustic folioBOT
#

645a677 Make max interaction range configurable (#11164) - NewwindServer
66165f7 Fix PickupStatus getting reset (#11154) - notTamion
dcbd99d Fix Owen's typos (#11179) - powercasgamer
f82bea6 Add argument for FinePosition to brig API (#11094) - Machine-Maker
694b120 Remove Entity tracker field - Spottedleaf
f774787 Copy missed changes to chunk system from Folia - Spottedleaf
50bdfc3 Null check tracker in Entity#resendPossiblyDesy... - Spottedleaf
3234b20 Do not allow chunk unloading outside of the reg... - Spottedleaf
0246a9d Add mob bucket items to item id to entity map i... - Spottedleaf

#
[PaperMC/Paper] branch deleted: patch/early-l4j-shutdown-hook
rustic folioBOT
#

Stack trace

https://pastebin.com/Nk06BP3i

Plugin and Datapack List

<img width="414" alt="image" src="https://github.com/user-attachments/assets/0ac306e1-6c86-4e91-8f7f-e3af3639eb6d">
<img width="414" alt="image" src="https://github.com/user-attachments/assets/ed574ef8-1d67-4ab5-89af-795f72446a4a">
(Sorry I am uploading screens because my server is not able to run commands actually)

Actions to reproduce (if known)

Unknown

Paper version

This server is running Paper version git-Paper-318 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 9271ee7)

Other

The server is blocked in start state when loading a world that I think it is corrupted, but isnโ€™t (the world came from a backup when it worked). I have to kill it to stop it. I had itemsadder and I thought it was the problem but if I remove it and rollback my worlds the issue is still here, so it isnโ€™t (cf issue https://github.com/ItemsAdder/ItemsAdderBlocksInjector/issues/17)

#

Expected behavior

When no players are in the nether no chunks are loaded in the nether.

Observed/Actual behavior

When the last player in the nether exits the dimension, the chunks stay loaded until another player enters the dimension.

Steps/models to reproduce

Enter the nether then exit it. I used a hopper to check if the chunks are still loaded.

Plugin and Datapack List

None

Paper version

1.21-117-master@0246a9d (2024-07-29T00:51:10Z) (Implementing API version 1.21-R0.1-SNAPSHOT)

Other

If this is intended behavior would it be possible to add an option to disable it?

rustic folioBOT
#

Expected behavior

Successfully jumped to server 2.

Observed/Actual behavior

image
image

Steps/models to reproduce

  1. Use bungee to connect two servers, in which bungee has a geyser installed on it.

  2. Players use the Bedrock client to enter the No.1 server under the name of [BE]TLKExcavator, which is very normal at this time! Right? !

  3. I tried to enter the No.2 server, and an accident happened at this time-No.2 server wouldn't let me in! !

Plugin and Datapack List

image

Paper version

version
[00:54:35 INFO]: Checking version, please wait...
[00:54:36 INFO]: This server is running Paper version git-Paper-318 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 9271ee7)
You are...

#

Failed to verify username!

Implies that your server is not configured properly for proxies, but, this is not a support forum (nor are you using a supported version)

The problem now is: as long as there are symbols in the name, you can't redirect the server. The compatibility of user names in your is so poor that even mohist can let Chinese names and even names with various strange symbols in, and there has never been a BUG.

#

Expected behavior

When a plugin adds a server link with a TranslatableComponent as its display name, the component is rendered using GlobalTranslator, just like any other component serialized to the network

Observed/Actual behavior

When a plugin adds a server link with a TranslatableComponent as its display name, the component is not rendered using GlobalTranslator, unlike any other component serialized to the network

Steps/models to reproduce

  1. Follow Paper's i18n guide: load translations for the custom server link, e.g. example-plugin.server-links.bug-report
  2. Add a link: Bukkit.getServerLinks().addLink(Component.translatable("example-plugin.server-links.bug-report"), URI.create("https://github.com/PaperMC/Paper/issues"))
  3. Build and upload the plugin to the server
  4. Join the server and open the server links menu on the client
  5. The link's display name is not rend...
rustic folioBOT
#

Expected behavior

When destroying Lodestone linked compasses stops pointing to lodestone location

Observed/Actual behavior

Compass in some situation still points out towards lodestone location even if Lodestone is destroyed

Steps/models to reproduce

  1. Place Lodestone and link a compass to it
  2. Put linked compass to your enderchest
  3. Destroy the Lodestone
  4. Unload the chunk the Lodestone was placed (i teleported away)
  5. Remove linked compass from your enderchest (right now it will still point towards former direction)
  6. Load the chunk lodestone was placed (i teleported back)
  7. Upon loading compass, acknowledges lodestone removal and start pointing in random direction

Plugin and Datapack List

[21:31:13 INFO]: Server Plugins (14):
[21:31:13 INFO]: Bukkit Plugins:
[21:31:13 INFO]: - ICraft2.0-Special, *JoinFullServer, Multiverse-Core, Multiverse-Inventories, Multiverse-Portals, NoChatReports, *PermissionsEx, PexTabCompleter, ProtocolLib, *SimplePr...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I found this trying to find out what was going on with my wind charges not working very well... and while filing a bug report, i managed to delete everything and found it was not a paper bug. Deleting small parts of my world until i narrowed the problem down to playerdata..... and then i narrowed it down to my boots.... with blast protection...

https://bugs.mojang.com/browse/MC-272483

I confirm that this fixed my issue too, so I'm closing this issue.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: upstream-update
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:
10671012 PR-1044: Add CrafterCraftEvent
4d87ffe0 Use correct method in JavaDoc
ae5e5817 SPIGOT-7850: Add API for Bogged shear state 46b6d445 SPIGOT-7837: Support data pack banner patterns d5d0cefc Fix JavaDoc error
b3c2b83d PR-1036: Add API for InventoryView derivatives 1fe2c75a SPIGOT-7809: Add ShieldMeta

CraftBukkit Changes:
00fc9fb64 SPIGOT-7853: AnvilInventory#getRepairCost() always returns 0 7501e2e04 PR-1450: Add CrafterCraftEvent
8c51673e7 SPIGOT-5731: PortalCreateEvent#getEntity returns null for nether portals ignited by flint and steel d53d0d0b1 PR-1456: Fix inverted logic in CraftCrafterView#setSlotDisabled 682a678c8 SPIGOT-7850: Add API for Bogged shear state fccf5243a SPIGOT-7837: Support data pack banner patterns 9c3bd4390 PR-1431: Add API for InventoryView derivatives 0cc6acbc...

rustic folioBOT
#

When the build workflow runs on the pull_request trigger, the commit ref ends up being the merge commit generated for the pull request instead of the actual commit in a PR. This PR fixes that by setting the checkout ref to be the most recent commit pushed in the PR.

Since this workflow also includes the push trigger, a conditional step was added to apply the ref only if it's being run under the pull_request trigger.

docs: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
references: https://github.com/actions/checkout/issues/261 https://github.com/actions/checkout#Checkout-pull-request-HEAD-commit-instead-of-merge-commit

#

I was not able to replicate this. Attribute modifiers remain on the item, so does general item meta data.
I have also not heard of any other such reports, hence I'll be closing this issue as "cannot reproduce".

If you still have this issue, please try to create a simple example plugin that achieves such a bug and that runs on latest paper without any other plugins installed. We can reopen the issue in that case to further investigate.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

I expect it to print the spawn reason as TRIAL_SPAWNER but it instead prints as DEFAULT
I am trying to modify creatures spawned only from trail spawners using CreatureSpawnEvent.SpawnReason.TRIAL_SPAWNER

Observed/Actual behavior

If you try and use the event CreatureSpawnEvent.SpawnReason.TRIAL_SPAWNER in order to modify and detect mobs from trial spawners it doesn't work
https://youtu.be/bMdTV3X8DTw

Steps/models to reproduce

You can see the code in this video https://youtu.be/bMdTV3X8DTw

Plugin and Datapack List

https://prnt.sc/Vxx0HmcdJqOM

Paper version

https://prnt.sc/Kyw29fNx3JCn

Other

No response

rustic folioBOT
rustic folioBOT
#

Expected behavior

These strange red words should not appear.

Observed/Actual behavior

image

Steps/models to reproduce

I ~ don t~ know ~ ~ This is just an ordinary server.

Plugin and Datapack List

AnimatedScoreboard, AuthMe, ChestCommands, *ChineseNickName, Citizens, CMILib,
*CommandNPC, ConsoleSpamFix, CoreProtect, dynmap
[12:50:28 INFO]: Essentials, HideAndSeek, HolographicDisplays, LaggRemover, LibsDisguises, *LiteCu
stomAnnouncer, LuckPerms, Multiverse-Core, NoSpawnChunks, PlaceholderAPI
[12:50:28 INFO]: PlugManX, ProtocolLib, Residence, *Shift_Menu, SkinsRestorer, TabTPS, TrChat, Vau
lt, ViaBackwards, ViaRewind
[12:50:28 INFO]: ViaVersion, WorldBorder, WorldEdit

Paper version

[12:59:52 INFO]: This server is running Paper version git-Paper-318 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 9271ee7)
You are running the latest version
Pr...

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

Expected behavior

In vanilla, item gets stacked in different stacks on drop and there is no errors or corrupted entity data

Observed/Actual behavior

item spawns with count more than 99 and it causes a lot of console errors, huge tps drop, and any '/data' command gets unexpected error message. (breaks any datapack functions that uses '/data' command)

console spam (only if /data command used in mcfunctions towards corrupted item entity):

[17:54:18 WARN]: Failed to execute function lbc:tick1s
net.minecraft.ReportedException: Saving entity NBT
        at net.minecraft.world.entity.Entity.saveWithoutId(Entity.java:2565) ~[paper-1.21.jar:1.21-123-0a1be9a]
        at net.minecraft.world.entity.Entity.saveWithoutId(Entity.java:2404) ~[paper-1.21.jar:1.21-123-0a1be9a]
        at net.minecraft.commands.arguments.selector.options.EntitySelectorOptions.lambda$bootStrap$50(EntitySelectorOptions.java:349) ~[paper-1.21.jar:1.21-123-0a1be9a]
        at net.minecraft.Util....
#

Expected behavior

ClientboundLoginDisconnect#write(FriendlyByteBuf) only falls back to Locale.US component codec if buf.adventure$locale is null

Observed/Actual behavior

ClientboundLoginDisconnect#write(FriendlyByteBuf) uses Locale.US component codec even when buf.adventure$locale is not null

Steps/models to reproduce

  1. Follow Paper's i18n guide: load translations for the custom kick message, e.g.
# example-plugin_en.properties
example-plugin.kick-message.potato=wen hardfork
# example-plugin_ja.properties
example-plugin.kick-message.potato=ใ‚ฆใ‚งใƒณใƒปใƒใƒผใƒ‰ใƒ•ใ‚ฉใƒผใ‚ฏ
  1. Create and register a new ChannelInitializeListener (this interface is in the server artifact, but :man_shrugging:) that changes sets the channel's adventure:locale attribute to some arbitrary Minecraft locale that isn't Locale.US (fallback locale):
ChannelInitial...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

The issue is that I am not calling the StructureAPI directly but a library I made for it, it's using Structure API in the end.
To give context, it's just a wrapper for Structures.
Here's the code it uses:

// includeEntities = true, StructureRotation = CLOCKWISE_180 (if its none issue is not present), Mirror = NONE, Palette = 0, Integrity = 1, Random = new Random()
public void simultaneousPlace(Location location, boolean includeEntities, StructureRotation structureRotation, Mirror mirror, int palette, float integrity, Random random) {
    this.structure.place(location, includeEntities, structureRotation, mirror, palette, integrity, random);
}
rustic folioBOT
#

This patch works, and stops my datapack heavy server (Terralith, Nullscape, etc...) from crashing. But, at the same time it makes new chunk generation performance x3-x4 worse! Why does it, and how can I make sure performance isn't so bad and it doesn't crash?

Can confirm that this changed code is called very often during world gen and could therefore potentially have a negative performance impact, I will make just the two features which call getBiome() during worldgen (LakeFeature and SnowAndFreezeFeature) use the uncached biome instead of overriding getBiome() entirely on WorldGenRegion.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

---- Minecraft Crash Report ----
// Surprise! Haha. Well, this is awkward.

Time: 2024-08-01 00:55:05
Description: Exception ticking world

java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.objects.ObjectArrayList.get(int)" because "this.wrapped" is null
	at it.unimi.dsi.fastutil.objects.ObjectOpenHashSet$SetIterator.next(ObjectOpenHashSet.java:575)
	at net.minecraft.network.protocol.game.ClientboundUpdateAttributesPacket.<init>(ClientboundUpdateAttributesPacket.java:34)
	at net.minecraft.server.level.ServerEntity.sendDirtyEntityData(ServerEntity.java:413)
	at net.minecraft.server.level.ServerEntity.sendChanges(ServerEntity.java:227)
	at net.minecraft.server.level.ChunkMap.tick(ChunkMap.java:982)
	at net.minecraft.server.level.ServerChunkCache.tick(ServerChunkCache.java:403)
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:705)
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1796)
	at ...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Mojang has marked that bug on their bug tracker as "invalid" - is this still something Paper doesn't want in their API? It seems Mojang has no interest in "fixing" this behavior and the current API is straight up broken.

If Paper doesn't want the HIDE_ATTRIBUTES flag to do what it's done for several years anymore, the docs need to be changed from just "Setting to show/hide Attributes like Damage" and deprecate the flag. I would be far more in favor of just maintaining the old functionality and not breaking plugins since Mojang seems to believe that adding the empty list is the correct way.

rustic folioBOT
#

There is no "maintaining the old functionality". Maintaining the old function is impossible to do. Adding meta.setAttributeModifiers(MultimapBuilder.hashKeys().hashSetValues().build()) is not always the correct solution. That will remove any implicit modifiers on non-armor items. That will then change functionality of the non-armor item. That is what upstream is currently doing to try and "fix" the issue, which then just breaks lots of items in the mean time removing the default/implicit modifiers for that item type.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

If you want to add actions to items or blocks when interacting with them (right or left click) you have to do a shtload of code

Example - Item action

Adding an interaction to a stick when held in any hand but not both at the same time
which only works when you don't look at an intractable block, would require following:

  1. listen to right-clicks on air and blocks
  2. check which block is clicked
    1. maintain a list of actual intractable blocks
    2. perform special checks based on the block whether it will perform any action based on conditions (will the block open an interface, can it be used without a correct item, will the item be consumed, is it on cooldown...)
    3. ignore the event for blocks with interactions
  3. check which hand the item is in
    1. check main hand for the item: ignore if hand in event was offhand
    2. check offhand for the item: ignore if hand in event was main hand
  4. perform you...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

The localized message for multiplayer.disconnect.server_shutdown should be displayed

Observed/Actual behavior

When the server stops, everyone gets kicked with the default message Server closed, regardless of the client's locale.

Steps/models to reproduce

  1. Start a server
  2. Connect
  3. Change your locale to something else then English
  4. Stop the server

Plugin and Datapack List

pl
[10:28:14 INFO]: Server Plugins (13):
[10:28:14 INFO]: Paper Plugins:
[10:28:14 INFO]: - Commander, CreativeUtilities, goPaintAdvanced, Tweaks, Worlds
[10:28:14 INFO]: Bukkit Plugins:
[10:28:14 INFO]: - EasyArmorStands, FastAsyncVoxelSniper, FastAsyncWorldEdit, goBrush, LuckPerms, NoisyPatterns, Skulls, WorldEditSUI

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

irrelevant

Paper version

This serve...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

If automatic saving was disabled using the command /save-off, manual saving via plugin should not print a warning.

Observed/Actual behavior

image

Steps/models to reproduce

  1. /save-off
  2. perform a manual world save using a plugin

Plugin and Datapack List

plugins
[09:46:38 INFO]: Server Plugins (13):
[09:46:38 INFO]: Paper Plugins:
[09:46:38 INFO]: - Commander, CreativeUtilities, goPaintAdvanced, Tweaks, Worlds
[09:46:38 INFO]: Bukkit Plugins:
[09:46:38 INFO]: - EasyArmorStands, FastAsyncVoxelSniper, FastAsyncWorldEdit, goBrush, LuckPerms, NoisyPatterns, Skulls, WorldEditSUI

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

Paper version

version
[09:46:56 INFO]: Checking version, please wait...
[0...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

[14:49:16] [Server thread/ERROR]: Could not pass event PlayerToggleSneakEvent to MagicPluginV1.10 v1.0-SNAPSHOT
java.lang.ArrayIndexOutOfBoundsException: Index 16 out of bounds for length 16
	at java.base/java.util.Arrays$ArrayList.set(Arrays.java:4271) ~[?:?]
	at net.minecraft.core.NonNullList.set(NonNullList.java:50) ~[paper-1.21.jar:1.21-79-a6ceda1]
	at net.minecraft.world.SimpleContainer.setItem(SimpleContainer.java:224) ~[paper-1.21.jar:1.21-79-a6ceda1]
	at org.bukkit.craftbukkit.inventory.CraftInventoryAbstractHorse.setItem(CraftInventoryAbstractHorse.java:65) ~[paper-1.21.jar:1.21-79-a6ceda1]
	at org.bukkit.craftbukkit.inventory.CraftInventory.clear(CraftInventory.java:445) ~[paper-1.21.jar:1.21-79-a6ceda1]
	at org.bukkit.craftbukkit.inventory.CraftInventory.clear(CraftInventory.java:451) ~[paper-1.21.jar:1.21-79-a6ceda1]
	at MagicPluginV1.10-1.0-SNAPSHOT.jar/org.lemonkingdommods.magicpluginv1.Spells.HealingMagic.ResurrectArea.executeEffect(Resur...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

I have a BasicCommand which I want to get suggestion for.

@Override
public @NotNull Collection<String> suggest(@NotNull CommandSourceStack stack, @NotNull String[] args) {
    if (args.length <= 1) {
        return SuggestionHelper.getSchematicSuggestions(this.schematicDirectory, args);
    }
    return Collections.emptyList();
}

If I've typed in my first argument and then add a space attempting to get the completions for the next argument, I should receive no suggestions since I'm returning an empty list.

Observed/Actual behavior

The player still sees their previous suggestions
<img width="418" alt="Screenshot 2024-08-04 at 21 48 09" src="https://github.com/user-attachments/assets/6e6ef1ed-6164-4d69-8ebc-3072d77263e7">

Only when a non-whitespace character is added, do the correct suggestions show
<img width="297" alt="Screenshot 2024-08-04 at 21 48 17" src="https://github.com/user-attachments/assets/462210c8-c0f3-4559-a...

rustic folioBOT
#

Expected behavior

Hello, when using the newest version of Paper applying DYE to armour with the flag HIDE_DYE doesn't seem to work anymore. Looking into other similar bugs I have seen there is an issue with HIDE_ATTRIBUTES which I don't think seems to affect this as using the code provided below does hide attributes but not the dye (see reference images). Any help would be much appreciated! Thanks ๐Ÿ˜

Currently looks like this
Image

Observed/Actual behavior

It should look like this
Image

Steps/models to reproduce

if (meta instanceof LeatherArmorMeta) {
  ((LeatherArmorMeta) meta).setColor(color);
}
// All other flags seem to work except HIDE_DYE
meta.setAttributeModifiers(material.getDefaultAttributeModifiers());
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_UNBREAKABLE, ItemFlag.HIDE_DYE, ItemFlag.HIDE_ENCHANTS);

Plugin and Datapack List

[08:50:0...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Im creating custom recipes (crafting table) but want set amounts in the ingredients.

Describe the solution you'd like.

Make a recipe like ShapedRecipe that can set custom amount in ingredients and let the server handle the valitation for craft.

Describe alternatives you've considered.

Make the normal recipe, but handle in CraftItemEvent and PrepareItemCraftEvent for check and reduce the amount in items of matrix craft. and handle manually cases like Shift+Click in craft. but with plugins the click in the book of recipes not handle correctly this.. not sure if plugins can...

Other

Based in the stale of https://github.com/PaperMC/Paper/issues/6567

rustic folioBOT
#

Expected behavior

Damaging ItemStacks via ItemStack.damage or LivingEntity.damageItemStack should either respect enchantments or have an option to do so.

Observed/Actual behavior

Since #11063, enchantments are now always ignored when damaging an ItemStack via the API.

As far as I can see there is now no existing API available for damaging items while respecting enchantments. In addition, the documentation for LivingEntity.damageItemStack states that enchantments will be respected:

This runs all logic associated with damaging an itemstack like gamemode and enchantment checks, events, stat changes, advancement triggers, and notifying clients to play break animations.

Steps/models to reproduce

  1. Add a plugin which damages an item via ItemStack.damage or LivingEntity.damageItemStack
  2. Use the plugin to damage an item with an unbreaking enchantment
  3. Trigger the plugin damage on the enchanted item

Plugin and Datapack List

pl
[18:30:16 INFO...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

At the moment the kernel uses OS threads, hence ThreadPools come from here

The current implementation (CachedThreadPool) allocates too many precious OS threads, to blocking I/O

This was the only solution to get good performance, but things changed with the move to jdk 21+

Describe the solution you'd like.

I tend to promote the concept of fibers in many places Paper, async chat, async scheduler (controversial) and many other places blocking I/O

This would not only simplify the code, but could seriously reduce overhead (on memory for example).

Describe alternatives you've considered.

I don't know what to write here, but I'm being asked to do it! The alternative (which is a bad solution in this case) is a coroutine boilerplate, but not as a suspend, but an Executor that doesn't park

Other

No response

#

virtual threads are still backed by platform threads, I really doubt that they offer a performance gain worthy of trying to patchwork these types of things, especially when most of the things using a thread pool for work which is pausable is code that is not written to utilise NIO or other mechanisms that actually support what vthreads intend to serve.

Chat itself is not really going to scale much, and so I really doubt that using vthreads here would change much given how few chat threads are often actually in play, all that would change is that we'd add yet another layer of headaches to be weary of when providing support.

#

Of course performance is unlikely to be higher, we are talking about the overhead of OS threads, which is better minimized to the number of hardwares on the JVM.

and the main thing is a more understandable and simple code

There shouldn't be any special problems, since they have the same semantics, and it can be implemented gradually.

The main problem is very many OS threads on blocking I/O, the OS does not know anything about the context of the task, for this reason it aggressively allocates the stack.

This can be very useful when we have many small servers (e.g. bedwars/skywars)
In order not to utilize hardwar resources too much

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

I keep getting this error in the console.

Observed/Actual behavior

Entity threw exception at world:-2338.5,19.0,245.5
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.ai.goal.WrappedGoal.isRunning()" because "wrappedGoal2" is null

Steps/models to reproduce

.

Plugin and Datapack List

.

Paper version

Paper version 1.21-126-master@7e44684 (2024-08-05T19:10:11Z) (Implementing API version 1.21-R0.1-SNAPSHOT)

Other

No response

rustic folioBOT
rustic folioBOT
#

Would it be feasible to split the checks and actions into separate methods
For example:
getInteractionResult(ServerPlayer,Item)
performAction(ServerPlayer,Item)

In the interaction logic:
get the interaction result for the player using that item
If success call perform action

I think the maintenance effort would be huge but on the other hand unclutter the code immensely and make the lives of many developers way easier
Custom item/block interactions would be easier to implement
Also when working with internals add more fine control to things
As well as mitigating potential side effects when getting a value that does not communicate it performs any action

No idea if this text even makes sense
Written on my phone during lunchtime

rustic folioBOT
#

Expected behavior

I expect no render inconsistencies, no kick and the world to stay clean

Observed/Actual behavior

Currently the sanitization made in this patch doesn't take in account custom items: https://github.com/PaperMC/Paper/blob/master/patches/server/0976-Prevent-sending-oversized-item-data-in-equipment-and.patch both issues are replicable using an item frame.

crossbow with charged_projectile component (with more than 3 items when the last item is a rocket):

Vanilla:
image

Paper:
image

bundle containing an item of a max stack size of 99:
the player is kicked and the world become corrupted until you remove the item frame manually in the files.
https://pastes.dev/tjhYodKkZx

Steps/models to reproduce

crossbow:

  • give @s minecraft:crossbow[minecraft:charged_projectiles=[{id:'min...
rustic folioBOT
rustic folioBOT
#

Most of the visual artifacts that result from having item merge radius above vanilla levels is from items merging vertically,
which realistically, only happens when a player is dropping items, or items are dropping from breaking a block.

Most of the scenarios where item merging makes sense involves the two item entities being on the same Y level. i.e on the ground next to each other.
This is even more apparent since paper fixed items being able to merge through blocks.

This patch allows us to configure items to only merge horizontally, which is what vanilla does.
This allows us to have both the reduced number of item entities a high item-merge radius provides,
without most of the visual artifacts caused by items merging vertically.

rustic folioBOT
#

Expected behavior

I've been having a strange error lately. I'm getting errors that seem to only affect me, and no other players.

The Primary issue is that I'm getting a "Failed to Save Player Data" error, which is making it so my last location is not saving on log out. Inventory changes ARE saving, it seems to only be my location that is getting reset.

Upon log out, I get the following error:

WARN Failed to save player data for _SlyGuy
08.08 06:09:03 [Server] INFO net.minecraft.ReportedException: Saving entity NBT
08.08 06:09:03 [Server] INFO at net.minecraft.world.entity.Entity.saveWithoutId(Entity.java:2565) ~[paper-1.21.jar:1.21-127-4e6a2a1]
08.08 06:09:03 [Server] INFO at net.minecraft.world.entity.Entity.saveWithoutId(Entity.java:2404) ~[paper-1.21.jar:1.21-127-4e6a2a1]
08.08 06:09:03 [Server] INFO at net.minecraft.world.level.storage.PlayerDataStorage.save(PlayerDataStorage.java:40) ~[paper-1.21.jar:1.21-127-4e6a2a1]
08.08 06:09:03 [Server] INFO at net....
rustic folioBOT
#

Expected behavior

when I cancel the EntityShootBowEvent, the arrow will not be consumed

Observed/Actual behavior

After canceling the EntityShootBowEvent, the arrow was not fired, but it was still consumed

Steps/models to reproduce

@EventHandler
public void onEntityShootBow(EntityShootBowEvent event) {
    event.setCancelled(true);
}

entering the game, take out the bow. The arrow was not shot, but it was consumed

Plugin and Datapack List

only test plugins available and no datapack

Paper version

https://api.papermc.io/v2/projects/paper/versions/1.21/builds/127/downloads/paper-1.21-127.jar

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Actually now that multiple effects of the same type is possible it might be better to do like the other methods and remove all the previous effects with the same type when overwrite is true and set the new effect at the first index found. I think the current behavior (pr) is confusing since overwrite will let other effects of the same type and will only override the first effect found.

rustic folioBOT
#

Is your feature request related to a problem?

I've been working on building some modular plugin systems and realized that there is no easy way to make custom items that other plugins do not interact with.

EG: a custom model wolf with custom behavior plugin fights with another plugin that changes base wolf behavior

Describe the solution you'd like.

I wanted to see what you guys thought about adding a global variable or registry system to the server framework. I believe it would allow for greater flexibility, modularity, and compatibility between various plugins, specifically with custom items.

It could be either open wild west where any plugin can register a global variable or some sort of registry system with lists that can be inserted into. If a registry is made for things like custom items, it could be made that unless specifically stated events do not override non-standard vanilla items.

I believe this would be extremely helpful in supporting a new wave of mod...

#

They're slowly heading in that direction and a lot of progress has been made overtime.

Items, wolves, banners, music discs, armor trims, and probably more that I'm forgetting can have custom models applied to them. More and more across the community, people are wanting add custom functionality to these things on servers so they don't have to deal with helping players download client mods.

I feel like this is something that will be extremely useful for server developers, but I do get the out-of-scope argument.

#

ultimately, if we did approve such a thing, it would have to come from 3rd parties who can come up with a design which fits the needs here, but, there is nothing in that which doesn't stop them from doing that in a plugin which can then support as many versions of MC as they want to do to deal with this collaboration issue.

if you really did this, you'd want that one thing to be able to identify items and deal with invoking functions on them to avoid the 200 plugins all trying to deal with who fires what and remembering to check if stuff can be used, etc; I just can't exactly see us designing such a framework to be bundled into the server, as we'll only have to figure out how to handle this mess when mojang finally gets to custom items.

I and many others on the team have probably frameworked some form of custom item-type stuff for our own needs, I wish I'd been able to hold off on working on it and been able to take advantage of some of the newer features of the server to ch...

rustic folioBOT
#
[PaperMC/Paper] New branch created: dev/1.21.1
rustic folioBOT
#

Expected behavior

Item with tag HIDE_ATTRIBUTES should not show attributes:

image

Observed/Actual behavior

Item with tag 'HIDE_ATTRIBUTES' shows attributes:

image

Steps/models to reproduce

final ItemStack item = new ItemStack(Material.IRON_PICKAXE);
final ItemMeta meta = item.getItemMeta();

meta.setDisplayName("Test Item");
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);

item.setItemMeta(meta);

player.getInventory().addItem(item);

Plugin and Datapack List

> plugins
[11:50:28 INFO]: Server Plugins (1):
[11:50:28 INFO]: Bukkit Plugins:
[11:50:28 INFO]:  - PaperProject
> datapack list
[11:51:11 INFO]: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
[11:51:11 INFO]: There are no more data packs available
...
rustic folioBOT
#

Expected behavior

anticheat:
  obfuscation:
    items:
      hide-durability: true
      hide-itemmeta: true
      hide-itemmeta-with-visual-effects: true

This configuration exists in 1.21 Paper and I have enabled it, so the item meta should be hidden.

Observed/Actual behavior

Item meta is not actually hidden. It's like I set a password on my phone but the phone isn't actually locked.

Steps/models to reproduce

anticheat:
  obfuscation:
    items:
      hide-durability: true
      hide-itemmeta: true
      hide-itemmeta-with-visual-effects: true

Plugin and Datapack List

Server Plugins (0):

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

This server is running Paper version 1.21-127-master@4e6a2a1 (2024-08-07T12:50:10Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
You are running the latest version

Other

_No resp...

rustic folioBOT
#

Stack trace

latest.log

Plugin and Datapack List

null

Actions to reproduce (if known)

Start the server by using the start.bat file which I downloaded from "how to make your own server" tutorial in internet and also using bukkit file to actually start and see the server logs.

Paper version

git-Paper-497 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: d8d54d9 on ver/1.20.4)

Other

server worked well for 3days but it sent two error logs
"Failed to read console input"
and
"The handle is invalid"
when I started today

The .bat file which is mentioned above includes
java -Xms1G -Xmx1G -jar bukkit.jar pause code
but it sends the message "Unable to access jarfile bukkit;.jar"

rustic folioBOT
#

I am having trouble replicating this with the simple snippet of

final ItemStack stack = ItemStack.of(Material.LEATHER_CHESTPLATE);
stack.editMeta(LeatherArmorMeta.class, l -> {
    l.setColor(Color.AQUA);
    l.setAttributeModifiers(stack.getType().getDefaultAttributeModifiers());
    l.addItemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_UNBREAKABLE, ItemFlag.HIDE_DYE, ItemFlag.HIDE_ENCHANTS);
});

The stack correctly hides the dye. Is there a chance any other plugin may be interfering?
Is some other logic messing with this?

rustic folioBOT
rustic folioBOT
#

The previous limit was 1024 bytes per page which doesn't make sense since the game allow up to 1024 chars per page and a character might take more bytes. So using some large unicode char the limit can be reach easily using a vanilla client.
It should be safe to not check this for now since the item meta conversion that happens in the later event should trim the page anyway.

This might be related to https://github.com/PaperMC/Paper/issues/10354

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New tag created: 1.21
rustic folioBOT
#
[PaperMC/Paper] New branch created: aaaa
#
[PaperMC/Paper] branch deleted: dev/1.21.1
#
[PaperMC/Paper] branch deleted: aaaa
rustic folioBOT
#

This patch makes creeper farms not work. Can you fix this? https://www.youtube.com/watch?v=qyUZ0iXkdBA

Do you have a world download/schematic and configuration you could share?

The patch slows down spawn attempts in chunks that have repeatedly failed to spawn mobs - it shouldn't be stopping spawn attempts altogether. Make sure you're not configuring failed-attempts-threshold too low (I recommend setting it to 1200) or the throttled-ticks-per-spawn settings too high (I recommend setting them to 10x the normal ticks-per-spawn settings)

#

This patch makes creeper farms not work. Can you fix this? https://www.youtube.com/watch?v=qyUZ0iXkdBA

Do you have a world download/schematic and configuration you could share?

The patch slows down spawn attempts in chunks that have repeatedly failed to spawn mobs - it shouldn't be stopping spawn attempts altogether. Make sure you're not configuring failed-attempts-threshold too low (I recommend setting it to 1200) or the throttled-ticks-per-spawn settings too high (I recommend setting them to 10x the normal ticks-per-spawn settings)

I have already set it as you said.
I think it happens because the Creeper Farm prevents zombies, spiders and skeletons from spawning and only allows Creepers to be spawned.

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

Currently an item with MAX_DAMAGE-component but without DAMAGE-component is not considered damageable.
Thus trying to use Player#damageItemstack will have no effect, when logically an item with max-damage should be considered damageable.
This issue doesnt apply to vanilla tools as they by default have damage-component
Whilst adding damage-component with 0 damage does fix this, this feels like a bug as I cant imagine a scenario where this behaviour would be wanted

This PR fixes it by ignoring the damage-component, which will be set later on down after damage-calculations
image

Before fix trying to call Player#damageItemstack (with only maxDamage component):

https://github.com/user-attachments/assets/a9cb7a59-6a5a-47a4-aca6-8d3e5053ecf8

After fix calling Player#damageItemstack on item with max-damage but wihtout damage:

https://github.com/user-attachments/assets/03eb7515-65df-4fd2-8a...

rustic folioBOT
rustic folioBOT
#

Example output: https://pastes.dev/nXEnpQ8K3Q

Since 1.21, vanilla item stack codecs now fully support such a json format for deserialization without any possible data loss, the support was added for data packs.

This pr adds a possibility to deserialize and serialize to such format which will not have any possible data loss due to loss of precise types (like ints becoming bytes) by allowing serialization of custom data as snbt. Also, those api methods will process the items trough data converters.

Unlike ItemStack#serializeAsBytes, this will result in a much more human readable format, which also may be transformed to many other formats like yaml or used with libraries like Jackson for human interaction with the final result.

An alternative to this pr would be adding an api to serialize the ItemStack to snbt, but if the snbt is put in a yaml or json file, it will not receive any kind of support from any IDE while editing the snbt, and because of that will become hard to w...

rustic folioBOT
#

Stack trace

https://spark.lucko.me/POMOGny03N
(profile)
https://pastes.dev/zyzwF6iRsY
(lastest log)

Plugin and Datapack List

spark only

Actions to reproduce (if known)

start the server and when I connect, the server lags so much

Paper version

git-Paper-497 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: d8d54d9 on ver/1.20.4)

Other

My server lags so badly whenever I connect and I also tried to inquire at the paper discord but couldn't get the solution. At first, we thought the problem was because the server some how only used 1 thread even it had authority to use all, but after adding some codes to the start bat file (-XX:ActiveProcessorCount=6), it is now up to 20 and the server lagging is still not solved

rustic folioBOT
#

Hi waffle, this doesn't seem to be an issue with Paper but an issue with your hardware (your spark still says there's only one CPU thread available). Also, 1.20.4 is outdated (unsupported) and vulnerable to abuse (exploit and crashes) - you can find the latest builds for 1.21.1 here.

I would recommend the likes of Syscraft, HelpChat and Admincraft when it comes to finding support for general issues of running a server.

rustic folioBOT
#

Expected behavior

1.21 introduced support for data driven custom paintings. I didn't expect them to throw an exception.

Observed/Actual behavior

You get the following stacktrace when trying to run the method.
stacktrace.txt

Steps/models to reproduce

  1. Install the TestPainting datapack on the server
    TestPainting.zip
  2. Give yourself the custom painting with /give @p painting[entity_data={id:"minecraft:painting",variant:"test:new_painting"}]
  3. Run Painting#getArt(), e.g., with this event listener:
public class TestListener implements Listener {
    @EventHandler
    public void onHangingPlace(HangingPlaceEvent event) {
        Entity entity = event.getEntity();
        if (!(entity instanceof Painting painting)) {
            return;
        }

        painting.getArt();
    }
}

Plugin an...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

This fix, as is, breaks the vanilla functionality of creating a custom item specifically removing the "damage" component and having that be an "undamageable" item.

Also, the correct fix is for API uses to also set a damage value when setting the max damage value. Calling Damageable#setDamage with a param value of 0 will add the damage component. This is assuming its an item type that doesn't implicitly have a damage component. Closing as a works as intended with the fix being to set both max damage and damage in the item's meta.

rustic folioBOT
rustic folioBOT
#

Sorry for the long delay on this implementation, we went through a lot of back and forth on what the best way forward here is.
We ended up bringing back the old API methods, now deprecated for removal.

As a bit of input as to why, these methods no longer represent the entire can_place and can_destroy components of an item.
As such, both getters and setters return/set incomplete values, which will mean that using these methods may remove data from items generated from other sources.
This is obviously less than idea, but these methods will stay around as a bandage fix until we manage to provide a correct alternative.

Sorry again for the long wait, use the methods with caution ^

#

Stack trace

[22:32:53 ERROR]: [CustomPackLib] an exception was thrown
java.lang.NullPointerException: Cannot invoke "net.minecraft.util.debugchart.DebugSampleSubscriptionTracker.shouldLogSamples(net.minecraft.util.debugchart.RemoteDebugSampleType)" because "this.debugSampleSubscriptionTracker" is null
at net.minecraft.server.dedicated.DedicatedServer.isTickTimeLoggingEnabled(DedicatedServer.java:901) ~[paper-1.21.1.jar:1.21.1-3-70dfa46]
at net.minecraft.server.MinecraftServer.waitForTasks(MinecraftServer.java:1480) ~[paper-1.21.1.jar:1.21.1-3-70dfa46]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[paper-1.21.1.jar:1.21.1-3-70dfa46]
at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1466) ~[paper-1.21.1.jar:1.21.1-3-70dfa46]
at net.minecraft.server.MinecraftServer.reloadResources(MinecraftServer.java:2359) ~[paper-1.21.1.jar:1.21.1-3-70dfa46]
at io.papermc.paper.datapack.PaperDatapack.setEnabled(Pap...

#

Expected behavior

Shreiker will try to spawn the warden but can't due to the water. Since there's already summoning attempts, none of the other shreikers can also summon the warden at their locations. The chunk loader is just to keep it rendered so you can go throughout the city without the machine stopping.

Observed/Actual behavior

Shreiker spawns warden regardless of switch being active or not.

Steps/models to reproduce

  1. Build the switch according to this video https://youtu.be/yUPj7xCobxg?si=4UixlQZCxQT2_8-i
  2. Go further away from the switch and activate a shrieker
  3. Warden spawns when it should not

Plugin and Datapack List

Server Plugins (12):
Bukkit Plugins: Chunky, dynmap, InteractiveChat, ItemRenamerReloaded, LuckPerms, PlaceholderAPI, PlugManX, ProtocolLib, Strings, TAB, TreeFeller, Vault
There are 8 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [file/PlayersDropHeads (world)], [file/armor statues v2.8.13 (MC 1.21.0).z...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

InventoryClickEvent should not report incorrect slots and/or items on the bottom inventory when another player's inventory is opened up in the top.

Observed/Actual behavior

When having another player's inventory opened up, attempting to click an item from the bottom inventory (our own inventory) will fire an InventoryClickEvent with an incorrect slot/item:

https://github.com/user-attachments/assets/e8c541ee-25a4-4a4b-ba79-af4f613645a3

I have only tested Paper 1.12.2, 1.18.2, 1.20.6 and 1.21.1. Paper 1.12.2 does not have the issue.

Steps/models to reproduce

Example repository: https://github.com/xwmi/paper-bug-poc

  1. Create an InventoryClickEvent listener that will cancel movement for a specific item (e.g. a netherite hoe):
    @EventHandler
    public void onInventoryClickEvent(InventoryClickEvent event) {
        ItemStack currentItem = event.getCurrentItem();
        int slot = event.getSlot();
        int rawSlot = event.g...
rustic folioBOT
#

Expected behavior

public final class RegionizedPlayerChunkLoader {
        public void setSendViewDistance(final int distance) {
            this.updateViewDistance((final ViewDistances param) -> {
                return param.setSendViewDistance(distance); // <--- look this
            });
        }
    }
}

Observed/Actual behavior

This was fine in 1.20.6, but since the rewrite of the RegionizedPlayerChunkLoader in 1.21, setSendViewDistance is incorrectly positioned as setTickViewDistance.

public class CraftPlayer extends CraftHumanEntity implements Player {
    @Override
    public void setSendViewDistance(final int viewDistance) {
        ((ca.spottedleaf.moonrise.patches.chunk_system.player.ChunkSystemServerPlayer)this.getHandle()).moonrise$getViewDistanceHolder().setSendViewDistance(viewDistance);
    }
}

public final class RegionizedPlayerChunkLoader {
    public static final class ViewDistanceHolder {
        public void set...
rustic folioBOT
rustic folioBOT
#

Expected behavior

It seems like it should detect any pose changes on entities from the Pose enum (public enum Pose {
STANDING,
FALL_FLYING,
SLEEPING,
SWIMMING,
SPIN_ATTACK,
SNEAKING,
LONG_JUMPING,
DYING,
CROAKING,
USING_TONGUE,
SITTING,
ROARING,
SNIFFING,
EMERGING,
DIGGING,
SLIDING,
SHOOTING,
INHALING;)

i think it should detect this changes on every mob that can produce them

Observed/Actual behavior

im trying to detect a sniffer when diggint through this event

@EventHandler
    public void detectSnifferDig(EntityPoseChangeEvent event) {
        Bukkit.getLogger().info("Pose change: " + event.getEntity() + " " + event.getPose());
       if(event.getEntity().getPose().equals(Pose.DIGGING)){
        Bukkit.getLogger().info("Digging detected");
        }
    }

I added a general pose debugger just to check on every Pose change
the only outputs are whene...

rustic folioBOT
#

Stack trace

[17:48:58 WARN] [QuickShop]:   >> Error Info:
[17:48:58 WARN] [QuickShop]: Shop must register into ShopManager before loading.
[17:48:58 WARN] [QuickShop]:   >> Error Trace
[17:48:58 ERROR] [STDERR]: java.lang.IllegalStateException: Shop must register into ShopManager before loading.
[17:48:58 ERROR] [STDERR]:      at org.maxgamer.quickshop.shop.ContainerShop.onLoad(ContainerShop.java:1043)
[17:48:58 ERROR] [STDERR]:      at org.maxgamer.quickshop.shop.ShopLoader.lambda$loadShops$0(ShopLoader.java:194)
[17:48:58 ERROR] [STDERR]:      at TRANSFORMER/arclight@1.19.2-1.0.5-696a298/org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:82)
[17:48:58 ERROR] [STDERR]:      at TRANSFORMER/arclight@1.19.2-1.0.5-696a298/org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftSchedulerMixin.java:415)
[17:48:58 ERROR] [STDERR]:      at TRANSFORMER/minecraf...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

The digging pose is not trigger by the sniffer only the warden. And even if it was your event would catch the previous pose (via Entity#getPose()) and not the new pose. You need to check Sniffer#getState however i don't think an event exists for this.

I see, thanks for the reply then, it could be greate if digging could also be recognized on the sniffer, as it is for some frog actions, idk if having this here would help to deliver the message or if i should create the suggestion

rustic folioBOT
#

Is your feature request related to a problem?

Why?

There 're some events for state changes, for example PufferFishStateChangeEvent or in case of poses EntityPoseChangeEvent but none of them work for detecting states / poses of the Sniffer, DIGGING is in fact in the enum of Poses detected by EntityPoseChangeEvent but its meant for the Warden

Describe the solution you'd like.

Add a new Event Class to detect the Sniffer state change, and make it so EntityPoseChangeEvent can detect the Sniffer poses

New Event

  @EventHandler
    public void snifferStateChange(SnifferChangeStateEvent event){
        plugin.getLogger().info("new state: " + event.getNewState());
        plugin.getLogger().info("old state: " + event.getPreviousState());
        plugin.getLogger().info("sniffer: " + event.getSniffer());
        event.setCancelled(true|false);
    }

Detecting poses

 @EventHandler
    public void detectSnifferDig(EntityPo...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Lightblocks can be "overwritten" and destroyed when placing a block on it.

Observed/Actual behavior

You cant place a block on it. There is no message. In creative it is working.

Steps/models to reproduce

Create a server with paper, place some lightblocks, go to survivalmode, try to place some blocks at the lights position.

Plugin and Datapack List

Paper version

This server is running Paper version 1.21-130-master@b1b5d4c (2024-08-10T10:02:42Z) (Implementing API versi|
on 1.21-R0.1-SNAPSHOT) |
You are running the latest version
Previous version: 1.21-127-4e6a2a1 (MC: 1.21)

Other

It is working in vanilla minecraft.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

I would expect these to be correctly done.

Observed/Actual behavior

The advanced/creative options are backwards in TooltipContext
<img width="910" alt="Screenshot 2024-08-12 at 8 43 49โ€ฏPM" src="https://github.com/user-attachments/assets/c9eaa1eb-a8c6-4031-9ec8-dc59ac50146f">

Steps/models to reproduce

n/a - see image above

Plugin and Datapack List

n/a

Paper version

n/a

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

All of the commands in these sections are to be run in the respective -server or -api directories.

At best we could add something to the


Modifying Patches

Modifying previous patches is a bit more complex:



block saying that the below commands, unless specified otherwise, are ran in the respective -api or -server folders.

That what I wanted to propose. But then I thought, it's only confusing until you understand patches. And that each patch is a commit to the -API, -Server module, and when you understand that, I think it's clear that you need to run these commands in those directories.

rustic folioBOT
rustic folioBOT
#

Expected behavior

Correct block actions in event

Observed/Actual behavior

If action is RIGHT_CLICK_AIR never catched in provided switch, nothing happens.
If action is RIGHT_CLICK_BLOCK, event fired twice

Steps/models to reproduce

Create a new project and create a listener like this

//main class
@Override
public void onEnable() {
    getPluginManager().registerEvents(new EventListener(), this);
}

//EventListener class
@EventHandler
public void onInteract(PlayerInteractEvent event) {
    var player = event.getPlayer();
    switch (event.getAction()) {
        case LEFT_CLICK_BLOCK -> player.sendMessage("left block");
        case RIGHT_CLICK_BLOCK -> player.sendMessage("right block");
        case LEFT_CLICK_AIR -> player.sendMessage("left air");
        case RIGHT_CLICK_AIR -> player.sendMessage("right air");
        case PHYSICAL -> player.sendMessage("physical");
    }
}

Click on air and blocks. That's it.

Plugin and Data...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

[https://paste.gg/p/anonymous/3b314528949a4f968c04c3b379c9f3f5](https://paste.gg/p/anonymous/3b314528949a4f968c04c3b379c9f3f5)

Plugin and Datapack List

[00:29:57 INFO]: Bukkit Plugins:
[00:29:57 INFO]:  - *AdvancedReplay, BattlePass, ButtonWarp, ChestShop, Citizens, CMILib, DecentHolograms, DeluxeMenus, Elevator, FastAsyncWorldEdit, floodgate, *GambleBarLite, Geyser-Spigot, GSit, HeadDrop, *iConomy, ImageFrame, InventoryRollbackPlus, ItemsAdder, Jobs, K0dy, LevelledMobs, LiteFish, LoneLibs, LuckPerms, MobMoney, Multiverse-Core, MyCommand, MysteryBoxes, NBTAPI, OpenAudioMc, Orebfuscator, Papotronics, PlaceholderAPI, ProtocolLib, Rankup, Residence, Shopkeepers, SimpleClans, SkinsRestorer, SmartLogin, TAB, UltimateTimber, Vault, Votifier, VotingPlugin, WorldGuard



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


### Actions to...
rustic folioBOT
rustic folioBOT
#

Stack trace

https://paste.ee/p/c25Cz

Plugin and Datapack List

All plugins have been removed, no datapacks have been installed.

Actions to reproduce (if known)

I am unsure of how to reproduce this, I have seen it happen on two servers.

Server 1) Running 1.21, started happening after some time and no changes, had 16 GB allocated.
Server 2) Started happening after updating from 1.21 to 1.21.1, had 10 GB allocated

Paper version

Cannot run /version, as the server is unable to start at all.
Should be build 13 of 1.21.1

Other

We have tried many steps, such as resetting the nether, removing all plugins, removing akiars flags,

The only correlation between the two servers I've seen this on is world size, both are over 15 GB.
We have limited info on this, as it does not seem to be a widespread issue.

Servers are ran with Multicraft.

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

I mean, mostly that the file changes without a migration notice in the _version field.

Now that I look at it, we'd also instead want to make it use default instead of the current versions magic values.
And current layout brings a couple of annoying side effects.
When you only define hard: default, the config makes sense. All ranges for hard despawning are defaulted.
If you insert

hard:
  horizontal: 10

then vertical is implicitly set to default, even without it being present in the config.
So now we are introducing
a) paper changing the config file without the need to do so, potentially breaking/messing with server state managers (at least mine lol)
b) it computes an implicit value.

Beyond the fact that we need to change this to using "default" values, need to drop the ConfigSerializable annotation and also need to register the deserializer in the first place, I think it may be worth to (at least) look into preserving the config structure ...

rustic folioBOT
#

I can definitely change it so it doesn't doesn't create a node with a default value if it hasn't been defined in the config and change it so it uses default instead of the normal numbers. _version is there to make sure configs aren't loaded on incompatible versions (which i just realized i also have to up considering old servers won't play nice with this) not to track config history. I will just wait on this pr for some time and allow people to give their thoughts on it.

rustic folioBOT
rustic folioBOT
#

Expected behavior

The end credits should only be shown when disable-end-credits is disabled

Observed/Actual behavior

The end credits are shown even with disable-end-credits enabled

Steps/models to reproduce

  1. Create a new server
  2. Enable disable-end-credits in config/paper-world-defaults.yml
  3. Start and connect to the server
  4. Go to the end
  5. Kill the dragon
  6. Go through the portal

Plugin and Datapack List

plugins
[20:10:17 INFO]: Server Plugins (0):

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

Paper version

ver
[20:11:09 INFO]: Checking version, please wait...
[20:11:09 INFO]: This server is running Paper version 1.21.1-14-master@9ab644e (2024-08-14T12:52:20Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-13-7c9240f (M...

rustic folioBOT
#

Expected behavior

Nether portals should be linked
when going through the same portals multiple times, there should be no new portals generated but the same initial two

Observed/Actual behavior

After every time I went through a portal, a new one appeared at a different position

image
image

Steps/models to reproduce

  1. Place a nether portal
  2. Step through it
  3. Repeat two or three times

Plugin and Datapack List

pl
[22:30:33 INFO]: Server Plugins (0):

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

Paper version

ver
[22:30:18 INFO]: Checking version, please wait...
[22:30:18 INFO]: This server is running Paper version 1.21.1-14-mas...

rustic folioBOT
#

Expected behavior

Endermites spawning when a player uses enderpearls although the chance is low statistically it's very impossible for one not to spawn in 200+ pearls.

Observed/Actual behavior

No Endermites spawned in 200+ pearls has also been tested by a Paper Triage Team
Capture11111
member.

Steps/models to reproduce

Try to get a Endermite to spawn

Plugin and Datapack List

Clean Paper Install no plugins no datapacks no settings touched.

Paper version

Latest (Current) Build #15 of 1.21

Other

No response

rustic folioBOT
rustic folioBOT
#

Is there a technical change that prevents supporting any size? I think that breaking something that has always worked is a bug with Paper. But also I just tested on Paper and it exists there so is this even relevant to Paper? It seems like an upstream issue.

Vanilla only supports sizes from 1 to 99. Changing that would make Paper worlds incompatible with vanilla, which of course isn't an option.
And yes, technically this could also be fixed by Spigot.

rustic folioBOT
#

How about deprecating oversized stacks for removal, like print an "author nag message" when oversized stacks are ever created and enforce the limits in CraftItemStack.asNMSCopy and CraftItemStack.unwrap and also prevent oversizing stacks that are created from CraftItemStack.asCraftMirror, so that definitely no unsafe itemstacks could be added to minecraft internal data, but most plugins will continue to work.

and after some time, maybe in 1.23 or so completely remove the ability to create oversized stacks.

rustic folioBOT
#

Expected behavior

The ender dragon fight should not be started in new end worlds when scan-for-legacy-ender-dragon is set to false in the world config

Observed/Actual behavior

The ender dragon fight is started with the messages in console Scanning for legacy world dragon fight... and Found that the dragon has not yet been killed in this world. upon entering the end, even with the option scan-for-legacy-ender-dragon set to false

Steps/models to reproduce

  1. Create a new server
  2. Set scan-for-legacy-ender-dragon to false in paper-world-defaults.yml
  3. Start and connect to the server
  4. Go to the end

Plugin and Datapack List

plugins
[18:22:07 INFO]: Server Plugins (0):

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

Paper version

version
[18:23:43 INFO]: Checking version, please wait...
[18:23...

rustic folioBOT
#

Stack trace

https://paste.gg/p/anonymous/16ee96c57dee472490af44ce85506ea6

Plugin and Datapack List

Server Plugins (0):

There are three data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]

Actions to reproduce (if known)

run command /give @s crossbow[enchantments={quick_charge:0}] to give self a crossbow and use it, and server crash

Paper version

This server is running Paper version 1.21.1-15-master@11b4ac7 (2024-08-14T19:34:08Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)\nYou are running the latest version\nPrevious version: 1.21.1-13-7c9240f (MC: 1.21.1)

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

/minecraft:tp @a @s
/minecraft:kill @e
not work, the command should accept target selector, 1.21 is working but 1.21.1 broken

Observed/Actual behavior

Incorrect argument for command
tp @a @s<--[HERE]

Selector not allowed
kill @e<--[HERE]

Steps/models to reproduce

use any target selector in vanilla commands

Plugin and Datapack List

paper only

Paper version

This server is running Paper version 1.21.1-15-master@11b4ac7 (2024-08-14T19:34:08Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21-130-b1b5d4c (MC: 1.21)

Other

eg /kill PLayerName is work but target selector cant

rustic folioBOT
rustic folioBOT
#

The information was sourced directly from the latest.log file rather than the console, although I understand the confusion given that I included the OOM error at the end. This error occurs because when the server runs out of memory, it can no longer append to the latest.log.

Please find the most recent latest.log attached, minus the memory error (which did appear in the server console). You can access it here: link.

The server is currently unable to start with 16 GB of memory but does manage to start with 32 GB. This seems excessive, particularly for a Paper server.

Here is the heap dump.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Draft PR; CraftMetaItemFrame is (probably) currently non-functional, but I wanted to share progress so far.

The second commit is a rewrite based on #11107, and I'm waiting on that PR to finalize changes here.

Concerns:

  • Do we have to care about entity ID being different for glow item frames? Does that warrant a separate GlowItemFrameMeta? Entity IDs only even seem to matter on spawn eggs.
  • Should CraftMetaItemFrame be wrapped in // Paper? It's in org.bukkit (because there were a nightmarish amount of access transformers until I moved it from io.papermc), but it's also a new file.

Please let me know your thoughts :D

#

Draft PR; CraftMetaItemFrame is (probably) currently non-functional, but I wanted to share progress so far.

The second commit is a rewrite based on https://github.com/PaperMC/Paper/pull/11107, and I'm waiting on that PR to finalize changes here.

Concerns:

Do we have to care about entity ID being different for glow item frames? Does that warrant a separate GlowItemFrameMeta? Entity IDs only even seem to matter on spawn eggs.
Should CraftMetaItemFrame be wrapped in // Paper? It's in org.bukkit (because there were a nightmarish amount of access transformers until I moved it from io.papermc), but it's also a new file.

Please let me know your thoughts :D

#

a8db527 Even more cleanup of mcutil patch - kennytv
d08e8d1 Add total time to done message (#11109) - jpenilla
2a39276 Add CrafterCraftEvent (#11082) - lynxplay
75af62b Split rewriting flag into paper.disableOldApiS... - kennytv [7ea4039](https://github.com/PaperMC/Paper/commit/7ea403902b81e15ec54a93972d337c4531a56b1e) Fixup startup time log message - kennytv [e71c1df](https://github.com/PaperMC/Paper/commit/e71c1df54c8829d77f62751860e8906db7748139) Call PlayerChunkUnloadEvent - kennytv [968bdeb](https://github.com/PaperMC/Paper/commit/968bdeb46f9b30aa9959b9bd9c0e89f9b657a191) Make CraftComplexRecipe extend CraftingRecipe (... - lynxplay [f1f01a1](https://github.com/PaperMC/Paper/commit/f1f01a1622625cd995420f3971e41422302b9cd9) Adjust done message again (#11118) - jpenilla [681c013](https://github.com/PaperMC/Paper/commit/681c01336bb20952f9cb278c27423cfc7360bba2) Bundle spark (#11093) - kashike [5fee9c6`](https://github.com/PaperMC/Paper/commit/5fee9c62da626fa52e6878f4d92ad28437cc56ba) Move configuration option to a system property - kashike

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

https://paste.gg/p/anonymous/7c6ff0a3408e4f46b6fa50bf86a98453

Plugin and Datapack List

[11:59:35 INFO]: Server Plugins (0):

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

Actions to reproduce (if known)

No response

Paper version

[11:59:19 INFO]: Checking version, please wait...
[11:59:21 INFO]: This server is running Paper version 1.21.1-16-master@bf5852a (2024-08-16T07:29:16Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I used option number one, so I really don't know what I did wrong.
Here is a breakdown of what I did:

  • Cloned my fork.
  • Ran ./gradlew applyPatches
  • Used git rebase -i c6e9579 and replaced at the right commit (2773dc4) pick with edit.
  • Edited Block.java
  • Commited inside of Paper-server with git commit --amend -m "Fix indestructable blocks" --author "Abel van Hulst <abelvanhulst@gmail.com>"
  • Went into the root folder and ran ./gradlew rebuildPatches
  • Then there was nothing to push (not sure if I also made a commit inside the root folder, but I don' t think so), so went into Paper-server, and after git told me 3 times I can't push, I think I made a new branch and pushed it with something along the lines of --set-upstream, after which it pushed
  • After that I could somehow push in the root directory, made a new branch on github, and made a PR (I did make a PR 2 times befor...
rustic folioBOT
#

Expected behavior

Since 1.20.6, player heads in advancement icons no longer display the profile skins correctly to the client, without the server running minecraft:reload twice. This happens regardless of whether the server is in online mode, or offline but behind a proxy.

Expected behaviour is that upon a server starting or restarting, advancements with player heads for an icon would display correctly for any clients joining, without needing commands being run to reload them.
image

Observed/Actual behavior

Advancements with player heads render with the default player skins, until minecraft:reload is run twice by a server operator.

image

Steps/models to reproduce

  • Create a 1.20.4 server
  • Install the slabservers3-main-1204 datapack
  • Start the server, and grant all advancements
    -...
rustic folioBOT
#

Stack trace

https://paste.gg/p/anonymous/e562b603a8dd47b0874e6aa6beb8e61a

Plugin and Datapack List

image

Actions to reproduce (if known)

(I used Skript to reproduce it (Skript has an offlineplayer function, which internally uses CraftServer#getOfflinePlayer(String), which is what we need.)

  1. Simply spam Bukkit.getOfflinePlayer("fsdfjksfkjsd"), and enjoy the lag.

Paper version

Current Purpur Version: 1.21.1-2286-366af80 (MC: 1.21.1)*

Other

Every single server is vulnerable to this issue.
If a server has a plugin which has a command that uses CraftServer#getOfflinePlayer(String), then a player can spam the command, and crash the server.
A solution I have in mind to this issue is if your server isn't in a shared hosting, and instead hosted in a VPS or dedicated server, y...

rustic folioBOT
rustic folioBOT
#

Please provide the entire log, we can't do anything with a single line of the stacktrace https://mclo.gs may be useful

[16:46:59] [Server thread/ERROR]: Entity threw exception at world:-172.5,-27.0,-65.5
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.ai.goal.WrappedGoal.isRunning()" because "wrappedGoal2" is null
at net.minecraft.world.entity.ai.goal.GoalSelector.tick(GoalSelector.java:105) ~[paper-1.21.jar:1.21-130-b1b5d4c]
at net.minecraft.world.entity.Mob.serverAiStep(Mob.java:938) ~[paper-1.21.jar:1.21-130-b1b5d4c]
at net.minecraft.world.entity.LivingEntity.aiStep(LivingEntity.java:3470) ~[paper-1.21.jar:1.21-130-b1b5d4c]
at net.minecraft.world.entity.Mob.aiStep(Mob.java:678) ~[paper-1.21.jar:1.21-130-b1b5d4c]
at net.minecraft.world.entity.monster.Monster.aiStep(Monster.java:44) ~[paper-1.21.jar:1.21-130-b1b5d4c]
at net.minecraft.world.entity.monster.Zombie.aiStep(Zombie.java:273) ~[paper-1.21.jar:1.21-130-b1b5d4c]
at net.minecraft.world.e...

#

Is your feature request related to a problem?

Is it possible to include the BlockDispenseLootEvent in one of the next Paper Updates?
At the moment it is impossible to catch the LootDrop and modifie him.

Describe the solution you'd like.

There is already an Patch inside Spigot but it is missing in paper https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/6b3c241bc04104665eb7b998211b7dbebbfee61a#src%2Fmain%2Fjava%2Forg%2Fbukkit%2Fevent%2Fblock%2FBlockDispenseLootEvent.java

Describe alternatives you've considered.

Hmm hard to descripe without events to catch there is no option to handle the drops and create own mechanics.

Other

No response

#

This changes some of the "add effect" methods that have a boolean return value to never return false. It feels like too much of an API break to make this change in methods where the expectation is something else. Perhaps new methods to take advantage of this functionality is better? smth like addCustomEffectWithMerge to clarify that it will "combine" effects utilizing the hidden effect functionality.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Using the method should replace the item being dispensed while still consuming the item that it was dispensing, this is the original behavior as it always has been.

Observed/Actual behavior

The block (a dispenser in my case) shoots out the set item, while also still keeping the item that should have been replaced in its inventory.

Steps/models to reproduce

Try attempting to set the item that a dispenser shoots out, it will both shoot out the new item and keep the old one.

Plugin and Datapack List

Plugins (Both of which were created by me):

  • Celebratory
  • NotQuiteModded

Datapacks:

  • vanilla (built-in)
  • file/bukkit (world)
  • paper (built-in)

Paper version

This server is running Paper version 1.21.1-26-master@52ae4ad (2024-08-16T22:44:55Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-5-7d7f123 (MC: 1.21.1)

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

It's already possible to control the player's enchantment seed from 7cd3244d, but the enchantment seed in the actual enchanting menu cannot be controlled. This change would allow more fine-grained control over what enchanting seed the menu is - it could be rerolled every time PreparedItemEnchantEvent is called to implement pre-1.8 enchanting, or the seed could be associated with a group of players instead of an individual player.

rustic folioBOT
#

Expected behavior

Limited sound distance when a wither is spawned and a value is set in spigot.yml forwither-spawn-sound-radius.

Observed/Actual behavior

Wither spawning can be heard server-wide.

Steps/models to reproduce

Set the value of wither-spawn-sound-radius to 32. Have another account 500+ blocks away. Spawn a wither. Run on a vanilla sever with 0 plugins.

Plugin and Datapack List

VentureChat, DeluxeCommands, CommandCooldown, ServerListPlus, MOTD, ProtocolLib, packetevents.

Paper version

This server is running Paper version 1.21.1-26-master@52ae4ad (2024-08-16T22:44:55Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT

Other

No response

rustic folioBOT
rustic folioBOT
#

Sorry for the long delay on the initial review, this PR seems to have fallen completely under my radar.

In general, when expanding a heavily overloaded API like this, we'd only want to add one more method.

In this case public boolean createExplosion(@Nullable Entity source, @NotNull Location loc, float power, boolean setFire, boolean breakBlocks, boolean damageSource);.
Callers of as niche of an API as the damageSource flag will be, can be expected to fully define all other parameters. The amount of methods added by this patch is way too many.

Beyond that, generally LGTM, but yea, please reduce this to a single added method on World, preferably just the method signature mentioned above. Your changes will also end up in the Expand-Explosions-API patch, so if you want to merge your changes into that patch directly, that would be great. Our contribution doc has a tutorial explaining how to edit patches.

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:
4068c6aa PR-1053: Change docs for max power in FireworkMeta
6b3c241b SPIGOT-7783, SPIGOT-7784, PR-1051: Add Trial Vault & Spawner event API
5fe300ec PR-1052: Fix broken links and minor improvement for checkstyle.xml

CraftBukkit Changes:
7548afcf2 SPIGOT-7872: Fix crash with event-modified teleports
93480d5d6 SPIGOT-7868, PR-1463: Fix default and max power in FireworkMeta
5060d1a84 SPIGOT-7783, SPIGOT-7784, PR-1460: Add Trial Vault & Spawner event API
11dfcae71 PR-1462: Fix broken links and minor improvement for checkstyle.xml

Spigot Changes:
ca581228 Rebuild patches

#

Expected behavior

grafik

Observed/Actual behavior

grafik

Steps/models to reproduce

/minecraft:tp @e @s

Plugin and Datapack List

[21:18:40 INFO]: Server Plugins (0):
[21:19:04 INFO]: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
[21:19:04 INFO]: There are no more data packs available

Paper version

[20:48:32 INFO]: [17.08 20:48:32.723] INFO : This server is running Paper version 1.21.1-26-master@52ae4ad (2024-08-16T22:44:55Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
[20:48:32 INFO]: You are running the latest version
[20:48:32 INFO]: Previous version: 1.21.1-3-70dfa46 (MC: 1.21.1)

Other

Broke in first paper 1.21.1 version, latest 1.21 still works.
Vanilla 1.21.1 also works, so this is in fact a pape...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

@PlayfulPotato what item type are you trying to dispense? Recently, we standardized this behavior because it was inconsistent across different items being dispensed. Some items didn't decrease the original stack if the item changed, some did.

Is this in reference to what the original item, or what I am changing it to?
Either way, the original item is a blaze rod, and the item I am trying to change it to is an ItemStack with air as the material to attempt to mimic the effect of the item actually being used, as it is a blaze rod with PDC being treated as a "custom item." Of course, if this is decided to be working as intended I definitely can just replicate the behavior more manually, but it becomes a bit more troublesome that way.

rustic folioBOT
#

Expected behavior

Worlds should not auto-save after doing world#setAutoSave(false);

Observed/Actual behavior

Worlds auto-save (very visible on timings)

Paper timings: https://timings.aikar.co/dev/?id=22031926125f4a879eeffb5636e58c76#timings
Spigot timings for the exact same server/setup: https://timings.spigotmc.org/?url=uqiqowular

I am not 100% sure about how the Spigot timings work, whether they would show individual world saving per world or would group them up, but if it is individual this would indicate that my problem is specific to Paper.

Steps/models to reproduce

I am using this class to initialize my temporary worlds

public class WorldLoader {
    /**
     * Generates a world which does not save, does not keep spawn loaded and is a void world
     *
     * @param worldName
     * @param environment
     * @return
     */
    public static World loadVoidTemporaryWorld(String worldName, World.Environment environment) {
        //Ca...
rustic folioBOT
#

Expected behavior

player's should be able to have a tick view distance of 1, i.e the chunk they are in and all neighbouring chunks or a tick view distnace of 0, just the chunk they are in,

Observed/Actual behavior

it seems clamped somewhere to be a minimum of 2 chunks. Setting lower than 2 doesn't throw error or anything it just silently fails.

Steps/models to reproduce

player.setSimulationDistance(1) (doesn't work) vs player.setSimulationDistance(2) (works)

Plugin and Datapack List

Just the plugin for testing player.setSimulationDistance()

Paper version

This server is running Paper version 1.21.1-DEV-master@52ae4ad (2024-08-17T16:25:23Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are 8 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 1.21.1-DEV-7c9240f (MC: 1.21.1)

Other

No response

rustic folioBOT
#

Is your feature request related to a problem?

Lack of function in the context of bootstrap and event. in the case of generating a resource pack linked with a datapack

Describe the solution you'd like.

An event or function that would be triggered after all the "bootstrap" functions of all plugins and before the server launch.
Access to the ClassLoader to have the resources from the bootstrap.
And access to the config simply

Describe alternatives you've considered.

I find that these are the minimum features to manage resources before launching the server and which will be useful in the future when we can add all types of data-driven content from the bootstrap.

Other

No response

rustic folioBOT
#

No doubt there is functionality missing.

Can you expand on why you want these specific things? Like what is the xy here?

An event or function that would be triggered after all the "bootstrap" functions of all plugins and before the server launch.

What happens during the bootstrap that you have to wait until after?

Access to the ClassLoader to have the resources from the bootstrap.

which classloader? You can easily get the classloader for any class with WhateverClass.class.getClassLoader()

And access to the config simply

The config found in the plugin jar? You can also read that yourself using available methods to get resources, just like one would with any custom configuration file in normal plugin operations. Or are you talking about some other config?

rustic folioBOT
#

What happens during the bootstrap that you have to wait until after?

In my case, gather all the resources requested by other plugins to generate (if necessary) a resource pack to distribute to players afterwards

which classloader? You can easily get the classloader for any class with WhateverClass.class.getClassLoader()

The ClassLoader that we find in JavaPlugin with getClassLoader(), I am so used to using this method that I had forgotten this way of doing it

The config found in the plugin jar? You can also read that yourself using available methods to get resources, just like one would with any custom configuration file in normal plugin operations. Or are you talking about some other config?

The plugin config in plugins/MyPlugin/config.yml and the server config found in Server.Spigot

rustic folioBOT
#

Expected behavior

No logs

Observed/Actual behavior

image

Steps/models to reproduce

Have a PaperMC on 1.19.3.
Upgrade to 1.21.1

Plugin and Datapack List

`> plugins
[06:20:24 INFO]: Server Plugins (2):
[06:20:24 INFO]: Bukkit Plugins:
[06:20:24 INFO]: - DiscordSRV, GravesX

`

Paper version

`[06:20:40 INFO]: This server is running Paper version 1.21.1-15-master@11b4ac7 (2024-08-14T19:34:08Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are 18 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: git-Paper-431 (MC: 1.19.3)

`

Other

I get the feeling that this is a repeat of https://github.com/PaperMC/Paper/issues/5995.

Just need to know if I need to worry or if I should roll back and upgrade slowly instead of a big jump.

I also know that I am 18 snapshots behind... but I imagine this isn't relevant(y...

rustic folioBOT
#

In my case, gather all the resources requested by other plugins to generate (if necessary) a resource pack to distribute to players afterwards

Why can't you do this in onEnable? The players still won't be on the server until then so you can generate the resource pack and use it when the players will be already on the server

The plugin config in plugins/MyPlugin/config.yml and the server config found in Server.Spigot

For your config just 'YamlConfiguration.loadConfiguration(context.getDataDirectory().resolve("config.yml").toFile())', server config may depend in future on registry values, which are available only post bootstrap, so I don't think it's a good idea to expose them.

rustic folioBOT
#

I have a question about this, this is sanitizing data from incoming clients?
If so, which packet even has itemstacks while also being serverbound?
If it is sanitizing outgoing itemstacks then what is the purpose of doing this?
Is this just to prevent creative mode players from causing issues?

rustic folioBOT
rustic folioBOT
#

Expected behavior

Player#GetLocation()#GetDirection() reporting the correct direction

Observed/Actual behavior

Player#GetLocation()#GetDirection() reports 0.0 yaw and 0.0 pitch, always.

Steps/models to reproduce

https://github.com/user-attachments/assets/0d7a1418-96a6-4834-b685-42aa085e1314

Plugin and Datapack List

Only my own plugin, PowerGems

Paper version

This server is running Paper version 1.21.1-33-master@64c9ee6 (2024-08-17T21:46:09Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-13-7c9240f (MC: 1.21.1)

Other

No response

rustic folioBOT
rustic folioBOT
#

Expected behavior

I think it's expected that after the PlayerQuitEvent for the player to not tick anymore, which could potentially create issues with plugins that rely on the data state of the player in the context of the player quit. Making it impossible for the player to naturally take "damage" from sources like fire tick etc.

Observed/Actual behavior

Currently, I believe this is a Spigot tick, not sure, the code runs the player quit alongside a disconnect with the reason, and ticks the player after this event. meaning if any plugin relies on .isDead(), or other sorts of data that changed exactly after the context of player quit, would be basically an outdated data.

Steps/models to reproduce

It's in the code base, call player quit, then tick the player. This causes an issue, for example if a plugin relies on .getINventory(), and on the .doTick() the player dies, takes damage, the plugin would be having outdated data, it's at least an understanding that the player ...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

"Sets the threshold at which the server will consider incoming packets spam and ignore them."

This is incorrect, its only for USE_ITEM and USE_ITEM_ON packets

Describe the solution you'd like.

clarify its only for right click interaction packets.

Describe alternatives you've considered.

N/A

Other

No response

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

can someone explain the CI failure to me I don't really get it and also I can't reproduce it locally

As @electronicboy said in the short form. You need to regenerate the classes with the updated version.
So just remove the comment in paper-api-generator project, so that it will be recognized as a project.
Then run the main method in that project to regenerate the classes. It'll automatically update the code and of course the annotation.

rustic folioBOT
#

An entity will only load 1024 scoreboard tags from it's NBT, and the addTag methods on nms.Entity automatically check this and return false if it's over 1024. These methods are directly called by the API addScoreboardTag method. The problem is, the API also has getScoreboardTags which directly exposes the underlying set, no copy, no unmodifiable wrapper, nothing. So a plugin can just add strings to that set to add over 1024 tags which are then saved, and lost on a reload of the entity.

Either we copy the set to make it a mutable copy or wrap it in an unmodifiable wrapper or we do an immutable copy.

rustic folioBOT
#
[PaperMC/Paper] New branch created: cleanup-books
#
[PaperMC/Paper] branch deleted: cleanup-books
rustic folioBOT
#

Stack trace

[12:30:32] [Server thread/ERROR]: Encountered an unexpected exception
org.spongepowered.configurate.serialize.SerializationException: [item-validation, book-size, page-max] of type io.papermc.paper.configuration.type.number.IntOr$Disabled: No TypeSerializer found for field pageMax of type class io.papermc.paper.configuration.type.number.IntOr$Disabled
	at org.spongepowered.configurate.objectmapping.FieldData.serializerFrom(FieldData.java:138) ~[configurate-core-4.2.0-SNAPSHOT.jar:?]
	at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load0(ObjectMapperImpl.java:71) ~[configurate-core-4.2.0-SNAPSHOT.jar:?]
	at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load(ObjectMapperImpl.java:56) ~[configurate-core-4.2.0-SNAPSHOT.jar:?]
	at org.spongepowered.configurate.objectmapping.ObjectMapperFactoryImpl.deserialize(ObjectMapperFactoryImpl.java:230) ~[configurate-core-4.2.0-SNAPSHOT.jar:?]
	at org.spongepowered.configurate.serialize.Typ...
rustic folioBOT
#

since generic types get erased at runtime, java doesn't actually know what is in the returned.
here i convert it to a String array,
which only accepts the one type, which throws the ArrayStoreException when failed.

additionally, since this occurs in BukkitCommandNode, the plugin/commands class is not in the stacktrace, so i add the command class to the error log.

made to help diagnose what plugin was causing [this](#paper-help message)

rustic folioBOT
rustic folioBOT
#

Should this be unmodifiable/a copy tho? The javadoc sentence *Entities can have no more than 1024 tags. seems to imply that you can add tags.
I feel like this should be rather return a set that delegates everything to the underlying set, but overrides add and addAll methods, like

@Override
public boolean add(String tag) {
    return entity.addScoreboardTag(tag);
}

@Override
public boolean addAll(@NotNull Collection<? extends String> tags) {
    boolean edited = false;
    for (String tag : tags) {
        edited = edited || entity.addScoreboardTag(tag);
    }
    return edited;
}
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

https://paste.gg/p/anonymous/d4add54b1dee4df58fab9c327a66010c

Plugin and Datapack List

Nice Mobs Remastered
https://modrinth.com/datapack/nice-mobs-remastered

Actions to reproduce (if known)

No response

Paper version

1.21 (sorry I only have the game version since I have been getting these issues only reported as well)

Other

Hey there,
I am the creator behind the datapack Nice Mobs Remastered. Recently I get frequently reports of crashing PaperMC server when someone enters the dimension (Astral Plane) which is added by the data pack.

I've attached a crash report from one of the users who reported it. Others are similiar.

I've also seen this Issue being reported by Weropeal on your discord (#paper-help message) but couldn't sadly find an open issue on github for it.

Let me know if you need further info.

Have a good one. :)

rustic folioBOT
#

What event are you listening to where you are then checking the direction? I cannot reproduce this with a simple listener to PlayerInteractEvent and then printing out the player.getLocation().getDirection() to the stdout.

    @EventHandler
    public void onEvent(PlayerInteractEvent event) {
        if (event.getHand() != EquipmentSlot.HAND) {
            return;
        }
        if (event.getItem() == null || event.getItem().getType() != Material.STICK) {
            return;
        }

        System.out.println(event.getPlayer().getLocation().getDirection());
    }

All of the logs show non-zero direction vectors.

#

When did this work to begin with? I'm not seeing any recent diff to the relevant code for your example that would cause any changes. In fact, in my test on 1.18.2, setting the item to an air stack actually throws an exception and crashes the server. Setting it to a non-air item dispenses that non-air item and doesn't decrease the stack of blaze rods inside the dispenser.

rustic folioBOT
#

When did this work to begin with? I'm not seeing any recent diff to the relevant code for your example that would cause any changes. In fact, in my test on 1.18.2, setting the item to an air stack actually throws an exception and crashes the server. Setting it to a non-air item dispenses that non-air item and doesn't decrease the stack of blaze rods inside the dispenser.

I misrembered how I was doing this that's my bad. I probably should have checked before responding with what I remember. What I actually would do is make an ItemStack with the same material as the one it was trying to dispense with a count of 0. Which is technically dangerous and not allowed, I know. But it allowed for easy replication of the dispenser firing something. Either way, I can just replicate the effect manually.