#paper

1 messages ยท Page 15 of 1

rustic folioBOT
#

Do you have a specific use-case for adding API getters/setters?
We'd rather hold off on adding more methods until we have a strong API specific usecase, given this seems rather admin specific with the config values.

The API should already be able to deal void damage via the damage cause API if needed and these methods add to the general clutter that is the World interface already.

rustic folioBOT
#

Stack trace

https://paste.gg/p/anonymous/50c82e07764046039b1e4a7a037a8dc8

Plugin and Datapack List

None installed.

Actions to reproduce (if known)

Download Paper JAR. can one 121.1 build 104 or build 105 - same result from either one. Java 23 is installed but tested it all the way back to Java 17 with identical results. macOS 15 Sequoia is installed. This is occurring on an Apple Silicon M1 Mac Mini with 8 GB of RAM. (Same issue tested and occurs also on an Apple Silicon M1 MacBook Air with 16 GB of RAM though as well). Run:

Paper version

121.1 build 104 or 121.1 build 105 - both have same result.

Other

Java 23 is installed but tested it all the way back to Java 17 with identical results. macOS 15 Sequoia is installed. This is occurring on an Apple Silicon M1 Mac Mini with 8 GB of RAM. (Same issue tested and occurs also on an Apple Silicon M1 MacBook Air with 16 GB of RAM though as w...

#

What is the output of running file $(which java) from terminal

which java)
/usr/bin/java: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/usr/bin/java (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/java (for architecture arm64e): Mach-O 64-bit executable arm64e

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Hey @PedroMPagani, I'm closing this due to you not providing actual logs (a screenshot isn't helpful), and the report being incomplete which makes it more difficult for the people that spend their free time working on Paper.

Please feel free to create another issue with actual logs, code examples to reach your issue, and a more complete report. Cheers!

@PedroMPagani This is why you should use an anonymous account not tied to your server for issue reports, certain individuals will treat you differently for being successful.

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

Yes, dynamically loading/building worlds with WorldCreator from region files on disk, mainly for minigames.

Currently you can generate a custom world at runtime with a custom generator, biomeProvider, etc... but obviously void kill height can not be set when creating the world, much less at runtime.

An alternative may be to modify WorldCreator.java to support passing in a custom world.yaml config settings (and potentially reloading those settings at runtime in World.java), but this is obviously much simpler and I would very much enjoy not having to take on such a task.

rustic folioBOT
#

Eh sounds fair, I guess.
I'll chat it over with the rest of the team.

You can deal void damage perfectly fine via https://jd.papermc.io/paper/1.21.1/org/bukkit/entity/Damageable.html#damage(double,org.bukkit.damage.DamageSource) and https://jd.papermc.io/paper/1.21.1/org/bukkit/damage/DamageType.html#OUT_OF_WORLD respectively tho.

Maybe it is worth consolidating the void damage configuration into a single interface type, e.g.

World#getVoidDamageConfiguration()
World#setVoidDamageConfiguration(WorldVoidDamageConfiguration)

interface WorldVoidDamageConfiguration {

boolean isVoidDamageEnabled();
double getVoidDamagePerTick();
float getMinWorldHeightOffset();

static WorldVoidDamageConfiguration vanilla() { }
static WorldVoidDamageConfiguration enabled(double damage, float minWorldHeightOffset) { }
static WorldVoidDamageConfiguration disabled() { }
}

but I'll get back to concrete next steps once we have more team input on this.
For now, could yo...

rustic folioBOT
#

PR Session log:

  1. Changed to setRecipeBrewingTicks as our best attempt at naming whatever this concept is.
  2. Experimental annotations for this naming. While it is our best attempt and will be merged, I am not comfortable in guaranteeing people won't have issues with it. If we receive large amounts of negative feedback and confusion, this allows us to revisit.
  3. No longer bump recipeBrewingTime to set brewingTime. Spigot users calling this method and trying to get this weird behaviour would see a behaviour change. Additionally, if you want to configure this value (like you'd do in the event) we want you to also call the setRecipeBrewingTicks method if you end up overshooting the 400 ticks.
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

After some more time and feedback from the team, I'll be closing this as a wont-merge.
Still thank you for your time and the objectively great work on the PR, even if the concept is something we do not feel comfortable merging.

The main reason for closing this is the potential reliance of this from third-party tools or plugins.
They may invoke these commands and simply rely on the fact that it happens instantly.

Given that third party plugins can 100% implement this PR in custom commands that would allow server owners to enjoy a lag-free whitelist/ban call without interfering with the vanilla behaviour here adds to the above reason.

I hope this makes sense to you, and again, thank you for the work, it is greatly appreciated even if we decided to not go forward with it. If you do end up developing this as a plugin or the likes, feel 100% free to link it here for others in need to find.

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

Expected behavior

no npe when completing a profile

Observed/Actual behavior

npe when completing a profile

Steps/models to reproduce

  1. create a profile with only a name
  2. complete the profile

Plugin and Datapack List

irrelevant

Paper version

[16:45:45 INFO]: Checking version, please wait...
[16:45:45 INFO]: This server is running Paper version 1.21.1-110-master@6d7a438 (2024-09-28T22:14:12Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-85-c5a1066 (MC: 1.21.1)

Other

CraftPlayerProfile#getId returns null when the profile id equals NIL_UUID which is correct
image
The complete method uses this.getId() instead of profile.getId()
image
MinecraftSessionService#fetchProfile requires a not-null profileId
...

rustic folioBOT
rustic folioBOT
#

If I can still contribute to this issue, I'd love to solve the problem! I was thinking of adding โ€˜ServerChunkCache#isPositionEntityTickingโ€™ and using it in โ€˜Entity#isTickingโ€™. Can I try this?

Sure! But it looks like the Paper EntityCommand also needs to be updated, and the changes here span multiple patches (MC-Utils, Moonrise, Paper command, Entity#isTicking). So this might not be the best change for a first-time contributor unless you're already very familiar with the patching process. Let me know if you still want to have a try, otherwise I can handle this.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: bugfix/npe-in-profile-resolution
rustic folioBOT
#
[PaperMC/Paper] branch deleted: bugfix/npe-in-profile-resolution
rustic folioBOT
rustic folioBOT
#

@jpenilla Thank you for your reply.
Due to my lack of understanding of the project, I didn't understand why we need an extension like โ€˜EntityCommandโ€™, could you please explain it in a simple way? I thought I just needed to write the code like this so I could use 'NewChunkHolder#isEntityTickingReady'.

public boolean isTicking() {
    // ServerChunk#isPositionEntityTicking uses NewChunkHolder#isEntityTickingReady
    return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionEntityTicking(this); 
}
rustic folioBOT
rustic folioBOT
#

Stack trace

There is unfortunately no stack trace, this is a memory leak server crash that appears to be related to paper.
I was informed in the PaperMC discord that moonrise seems to be a part of Paper. An acquaintance seems to be experiencing constant out of memory server crashes which upon further inspection seem to all be caused by a "ca.spottedleaf.moonrise" package.

To do this analysis, I made several heap dumps and compared them using /spark heapdump
and JProfiler, where the object analysis shows that the ca.spottedleaf.moonrise class seems to have an ever-increasing concurrent long array that keeps getting bigger and bigger until the server crashes.

Here is what these heap dumps look like in the profiler, which shows the size increasing relative to everything else.

image
image

Plugin ...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

not enough info in the javadocs

Describe the solution you'd like.

Adding more information in the javadocs like @ApiStatus.AvailableSince("1.20-R0.1-SNAPSHOT")

Describe alternatives you've considered.

none

Other

Yes it may be useless because you should only look on your current version of paper api but I think it will be much nicer to know since which version of the api the feature as been created at

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

[12:14:41] [Server thread/INFO]: Total: 841 Unloadable: 0 Null: 784 ReadOnly: 0 Proto: 0 Full: 57
[12:14:41] [Server thread/INFO]: Chunks in world_nether:
[12:14:41] [Server thread/INFO]: Total: 841 Unloadable: 0 Null: 792 ReadOnly: 0 Proto: 0 Full: 49
[12:14:41] [Server thread/INFO]: Chunks in world_the_end:
[12:14:41] [Server thread/INFO]: Total: 841 Unloadable: 0 Null: 792 ReadOnly: 0 Proto: 0 Full: 49
[12:14:41] [Server thread/INFO]: Chunks in Resource_Nov:
[12:14:41] [Server thread/INFO]: Total: 841 Unloadable: 0 Null: 792 ReadOnly: 0 Proto: 0 Full: 49
[12:14:41] [Server thread/INFO]: Chunks in shop:
[12:14:41] [Server thread/INFO]: Total: 1802 Unloadable: 0 Null: 1672 ReadOnly: 0 Proto: 0 Full: 130
[12:14:41] [Server thread/INFO]: Chunks in resource_nether:
[12:14:41] [Server thread/INFO]: Total: 841 Unloadable: 0 Null: 792 ReadOnly: 0 Proto: 0 Full: 49
[12:14:41] [Server thread/INFO]: Chunks in resource:
[12:14:41] [Server thread/INFO]: Total: 841 Unloadable: 0 Nu...

rustic folioBOT
#

12:14:41] [Server thread/INFO]: Chunks in em_the_pirate_ship:
[12:14:41] [Server thread/INFO]: Total: 191394 Unloadable: 191394 Null: 1277 ReadOnly: 76 Proto: 189674 Full: 367

You definitely have a plugin which stoped the chunk unloading in this world, follow this guide to find out which plugin does this https://docs.papermc.io/paper/basic-troubleshooting#finding-the-culprit

If you'll check the configs of that plugin, check for "chunk unloading", "world saving" etc

rustic folioBOT
rustic folioBOT
#

The new method allows overriding the title on the menu which is being opened without the necessity to listen to InventoryOpenEvent and setting InventoryOpenEvent#titleOverride(Component)

When creating this new api discovered an issue with the current method which has a very small fix, the issue being that currently when running

    @EventHandler
    public void onInventoryOpen(org.bukkit.event.inventory.InventoryOpenEvent event) {
        if (event.getInventory() instanceof HorseInventory) {
            event.getPlayer().getScheduler().runDelayed(this, task -> {
                event.getPlayer().openInventory(event.getPlayer().getOpenInventory());
            }, () -> {}, 40L);
        }
    }

You will get this error https://pastes.dev/yAFvj1yF6I

Should I instead of current behavior, pass the title override as the...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

This feature request is related to the problem that it is -- as plugin developer -- unnecessarily difficult to set the texture of a player head to a signed texture, often I solve this using some reflection (which became more difficult in the later versions due to ResolvableProfile), but I think it'd be beneficial to all plugin to implement an more straight forward way to achieve this.

Describe the solution you'd like.

I'd introduce this in either one of the following ways, I'd be happy to hear some feedback if there're other ideas to achieve this!

  1. Introduce a 'setUrl' method on SkullMeta, under the hood this method works as follows:
    • It creates a property value of proper format from this URL for example a taco skull
"textures": {
      "SKIN": {
        "url": "http://textures.minecraft.net/texture/98ced74a22021a535f6bce21c8c632b273dc2d9552b71a38d57269b3538cf"
      }
}
eyJ0ZXh0dXJlcyI6eyJTS0lOIjp...
rustic folioBOT
#

Use either one

SkullMeta meta;
URI uri; // In the example is http://textures.minecraft.net/texture/98ced74a22021a535f6bce21c8c632b273dc2d9552b71a38d57269b3538cf
// Set both to actual values here
var profile = Bukkit.createProfile(new UUID(0, 0), "");
var textures = profile.getTextures();
textures.setSkin(uri.toURL());
profile.setTextures(textures);
meta.setPlayerProfile(profile);

or

SkullMeta meta;
String base64; // In the example is eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOThjZWQ3NGEyMjAyMWE1MzVmNmJjZTIxYzhjNjMyYjI3M2RjMmQ5NTUyYjcxYTM4ZDU3MjY5YjM1MzhjZiJ9fX0=
// Set both to actual values here
var profile = Bukkit.createProfile(new UUID(0, 0), "");
var property = new ProfileProperty("textures", base64);
// var property = new ProfileProperty("textures", base64, signature);
profile.setProperty(property);
meta.setPlayerProfile(profile);
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: contrib-annotations
rustic folioBOT
rustic folioBOT
#

Ok so i finally got time to have a look at the PR again.

Looking at the code i realized that it's kind of impossible to call the Pre(pare)TeleportEvent for PortalEvent at a time where it makes sense since it requires a DimensionTransition object for both the destination coordinates and the teleport cause. Unfortunately, until we actually get that object it will not just call PreparePortalEvent and PortalEvent but it will also create a portal in the process. And since the PortalEvent is cancellable it would not make sense to create the portal.

Now i could add boolean parameters that handle whether to call the events or create the portal, but I don't know if we want this. Maybe i am overseeing something and there is another way to do this, but I don't see any other way.

Maybe it is actually better to create a TeleportFailEvent. But I would like to have different opinions on this if that is possible.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Players in spectator mode should NOT drop a loot table on death, just like in vanilla or Paper.

Observed/Actual behavior

Players in spectator mode drop the minecraft:entities/player loot table on death.

Steps/models to reproduce

  1. Install this minimal reproduction data pack by copying it into the server's world > datapacks folder. This adds a player head to the player's loot table unconditionally.
  2. Op yourself in the server console.
  3. Join the server, and enter /gamemode spectator.
  4. Enter /kill @s.
  5. Observe that a player head dropped. In vanilla or Paper, nothing drops.

Plugin and Datapack List

Just the minimal reproduction data pack.

Paper version

> version
[16:38:13 INFO]: This server is running Paper version 1.21.1-118-master@fb76840 (2024-10-02T12:49:56Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
P...
rustic folioBOT
rustic folioBOT
#

Expected behavior

When printing out the result of event.getClick() during the InventoryClickEvent, I was expecting ClickType.MIDDLE to get printed upon clicking with the mousewheel on an item.

Observed/Actual behavior

Instead, what I've found out is that no matter what one tries doing, ClickType.MIDDLE can never be detected.
Upon middle clicking an item in an inventory (could be any inventory from what I saw), the only click being detected is ClickType.UNKNOWN.
On discord I was initially told that detecting middle clicks isn't supported, though I find it really strange that the only way to get an UNKNOWN click type is through middle-clicking an item in Survival Mode.

Steps/models to reproduce

  1. Create a barebones plugin, one which simply listens to the InventoryClickEvent
  2. Print out event.getClick()
  3. In survival mode, try all types of clicks that are meant to be available (Left, right, shift-left, shift-right, double left, switch hand, number key, drop,...
rustic folioBOT
#

There is no "maintaining the old functionality". Maintaining the old functionality 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.

There are 2 possible cases for each 5-year old plugin with this "issue":

  1. They don't care about the actual modifiers (if in like a GUI inventory or smth). In this case, setting an empty map when the HIDE_ATTRIBUTES flag is present is a valid solution.
  2. They do care about the actual modifiers, but only want to hide them in the tooltip. In this case, setting an empty map will remove the implicit modifiers on the itemstack. One might think a solu...
rustic folioBOT
#

Just wanted to add both use cases are extremely valuable, most players know the default values

most players are generally not the ones creating these items (and where they are, they'll be subjected to the new behavior directly through the command, not as a side-effect of something that for the better part of a decade just set a flag that hides something in the UI), it's plugins which have existed for a decade with a presumed set of behavior that they can hide attributes on their items to mitigate the space taken up by fluffing up item lore, etc.

In cases where plugins are creating GUI items, it's easy to mitigate as they can just add any attribute they want in order to cause the component to save, but implicitly removing all item attributes when you pick to hide attributes just did not feel like the correct solution here as a default practice.

rustic folioBOT
#

Expected behavior

command selector eg @s will right colored when player have minecraft.command.selector permisssion

Observed/Actual behavior

Image
Image
command executed, but in chat have wrong colored

Steps/models to reproduce

/minecraft:tp @a @s

Plugin and Datapack List

paper only

Paper version

[12:15:55 INFO]: Checking version, please wait...
[12:15:57 INFO]: This server is running Paper version 1.21.1-118-master@fb76840 (2024-10-02T12:49:56Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-116-e7e1ab5 (MC: 1.21.1)

Other

No response

rustic folioBOT
rustic folioBOT
#

Was able to reproduce this. Remapping MMB (to M on keyboard in my case) leads to invalid(?) actions being sent from the client:

  • Having air on cursor and pressing remapped MMB over an item in inventory sends CLONE action with 0 (LMB) button num.
  • And having any item on the cursor will lead to PICKUP action with 3 (MMB).

Both of these are unmapped/unknown actions, so it falls back to UNKNOWN.

rustic folioBOT
rustic folioBOT
#

Expected behavior

  1. the player have an attribute ( like this one for exemple : /attribute @p minecraft:generic.max_health modifier add 1 10 add_value
  2. the player died
  3. the attribute is reset because in this case, the attribute is not the Base attribute

here an exemple of vanilla 1.21.1

https://youtu.be/hHGpRTtGZJA

Observed/Actual behavior

  1. the player have an attribute ( like this one for exemple : /attribute @p minecraft:generic.max_health modifier add 1 10 add_value
  2. the player died
  3. the attribute still active ( and somes plugins are affected by that )

Steps/models to reproduce

how to make the bug:

  1. do that command: /attribute @p minecraft:generic.max_health modifier add 1 10 add_value
  2. play in gamemode survival and do some /kill @p
  3. the generic.max_health modifier is not reset and that is the bug

Plugin and Datapack List

no plugins

Paper version

This server is running Paper version 1.21.1-119-master@7cd4f2c (2024-10-03T15:19:34Z) (...

rustic folioBOT
rustic folioBOT
#

Expected behavior

I am creating an item to display in a GUI and this worked fine prior to my 1.21 update. But now, it displays with the armor trim in the GUI despite the item having the HIDE_ARMOR_TRIM flag and the item has a trim visible in the GUI

Observed/Actual behavior

The armor trim is still shown on the item

Steps/models to reproduce

Make an item with an armor trim. Set the flag to hide armor trims. It should still have it

Plugin and Datapack List

[22:19:32 INFO]: Server Plugins (76):
[22:19:32 INFO]: Bukkit Plugins:
[22:19:32 INFO]: - AdvancedAchievements, AdvancedArmorStands, AdvancedEnchantments, Brewery, BuycraftX, ChestShop, ChestShop-LegacyIds, Chunky, Citizens, *Commander
[22:19:32 INFO]: CoreProtect, CrazyAuctions, DecentHolograms, DeluxeMenus, DespawnSpy, DetrimUtils, EnchantGui, Essentials, EssentialsAntiBuild, EssentialsGeoIP
[22:19:32 INFO]: EssentialsProtect, EssentialsSpawn, ExploitFixer, FarmLimiter, FeatherBoard, floodgate, GriefPreve...

rustic folioBOT
rustic folioBOT
#

Hmm, the javadocs for ClickType.MIDDLE kinda specifically state that it's the middle mouse button being used, not "whatever action the middle mouse button does by default". I think, because of that, we have to add another enum value and then maybe a helper method to check if it's either MIDDLE or whatever the new one is, like isCloneAction() or something.

That's fair enough. Either way though, I think it's important to be able to pick up whether a user rebound the key or not as especially those on laptops may have, and plugins which rely on middle click functionality would break completely.

Also, while I'm at it, from what I can tell there might be a possibility to detect a player's middle-mouse click (or whatever the button was rebound to) while they are on survival, with no item on cursor yet an item in the slot beneath it. As it servers no functionality in survival it might be a handy way to provide plugin makers with a way to implement functionality in InventoryClickEvents.

rustic folioBOT
#

Expected behavior

Have recently switched from spigot to paper server. Everything works except chat formatting. Have tried both CMI's chat and EssentialsXChat.
In the console the message is partially formatted properly, based on formatting settings within the desired chat plugin, except the prefix is being shown twice. Within the client it only shows the non-formatted message in White text.

Everything works perfectly when I use the Spigot JAR.

Image

Observed/Actual behavior

Chat from players is not being displayed in the client properly.

Steps/models to reproduce

switched from Spigot to Paper server.

Plugin and Datapack List

PLUGINS:
[02:39:45 INFO]: Server Plugins (11):
[02:39:45 INFO]: Bukkit Plugins:
[02:39:45 INFO]: - CMI, CMILib, Essentials, EssentialsChat, EssentialsSpawn, FastLeafDecay, Jobs, LuckPerms, Vault, VeinMiner
[02:39:45 INFO]: voicechat

DATAPACKS:
[02:40:...

rustic folioBOT
#

Paper has expanded the chat API in a manner that allows plugins to do fancier chat things and it's 100% on plugins on how they interact with that. having two plugins installed which handle that is asking for issues, essentials for example has a config option which is enabled by default last I knew which will put the players pre/suffix into the display name of the player, and so if you're using another chat plugin, you'd want to disable that.

For support, please use the discord.

rustic folioBOT
#

Paper has expanded the chat API in a manner that allows plugins to do fancier chat things and it's 100% on plugins on how they interact with that. having two plugins installed which handle that is asking for issues, essentials for example has a config option which is enabled by default last I knew which will put the players pre/suffix into the display name of the player, and so if you're using another chat plugin, you'd want to disable that.

For support, please use the discord.

Originally posted by @electronicboy in #11470

rustic folioBOT
#

I don't know what this issue aims to accomplish.

Cat already explained to you that third party software (the plugins you run) are responsible for correctly inter-operating. Beyond that, I'd suggest opening issue with the respective plugins used to construct these prefixes. If this ends up actually being an issue in papers API implementation, the developers of the respective plugins know their code and potential caveats a lot better than we do and should be able to open a proper issue on our tracker with actual reproduction steps.

Our discord was suggested as long lasting discussions/support is generally something we do not want on our github issue tracker, as it is reserved for bugs, not the process of figuring out if the issue comes from us, incorrect configuration, faulty plugin interop or even third party bugs.

Again, I'd urge you to open these issues with the developers of the plugin that serve these prefixes.

For what it is worth, a super simple setup with EssentialsCh...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Currently if you try to use an anvil with a enchantment book using levels over the max defined then the anvil just ignore level in book and override with the max level defined in registry, this PR allow by config disable this for allow using that enchantment books.

PS: Talking about why this... in my case is just wanna give books with things like sharpness 7 and dont wanna listen the PrepareAnvilEvent and make a whole thing for check compatibility and manually set all in code... and also dont wanna override the max level in bootstrap because this make players can get this levels in vanilla ways.

rustic folioBOT
rustic folioBOT
#

I think a PreEnchantCombinationEvent or PreAnvilCombinationEvent where you can override different things like what the base item will be used (so for example you could do pumpkin + enchantment book = enchanted diamond), ignore some limits etc

but the thing with items is this already being handle in the PrepareAnvil (but called in multiple things and for that i dont wanna mess with this)

or just add a value in the AnvilView for that and make the AnvilMenu handle from this for make like in the OpenInventory event override the behaviour...

#

Description:

This pull request implements the EntityRemoveFromWorldEvent, which enhances tracking of entity removal in the game. This new event allows better monitoring of entity removal processes, providing more flexibility for plugin developers.

Key Changes:

  • Created EntityRemoveFromWorldEvent class to represent the removal of entities from the world.
  • Added various causes for entity removal such as DEATH, DESPAWN, DROP, etc.
  • Introduced an event listener system to trigger actions when an entity is removed.

JIRA Ticket:

rustic folioBOT
#

Description:
This pull request implements the EntityRemoveFromWorldEvent, which enhances tracking of entity removal in the game. This new event allows better monitoring of entity removal processes, providing more flexibility for plugin developers.

Key Changes:
Created EntityRemoveFromWorldEvent class to represent the removal of entities from the world.
Added various causes for entity removal such as DEATH, DESPAWN, DROP, etc.
Introduced an event listener system to trigger actions when an entity is removed.
JIRA Ticket:
Resolves SPIGOT-10280: Link to the JIRA Ticket (if applicable)

#

This PR allow change the behaviour in anvils where enchantments applied are limited to the max level registered.

Code to test a case where only books can override the max level limit.

    @EventHandler
    public void onAnvilPrepare(PrepareAnvilEvent event) {
        final AnvilView anvilView = event.getView();
        final ItemStack itemStackIngredient = anvilView.getItem(1);
        if (itemStackIngredient == null || itemStackIngredient.isEmpty()) {
            return;
        }
        if (itemStackIngredient.getType() == Material.ENCHANTED_BOOK) {
            event.getView().setCanApplyEnchantmentsOverMaxLevel(true);
        } else {
            event.getView().setCanApplyEnchantmentsOverMaxLevel(false);
        }
    }

PS: This PR is an alternative from https://github.com/PaperMC/Paper/pull/11472

rustic folioBOT
#

Expected behavior

intended behaviour:

When a player is red they can only recive damage from one source, however if a greater source of damage hits, the damage from both sources is combined.|

Observed/Actual behavior

expected behaviour:

When a player is red they are fully inveunerable instead of taking damage from the greater source

Steps/models to reproduce

https://cdn.discordapp.com/attachments/289587909051416579/1292576996920131594/Base_Profile_2024.10.06_-_20.58.11.17.mp4?ex=67043da2&is=6702ec22&hm=a83d3a7ef61d7cc62107b3c6f04c40092134b0d911fdf944a5ba67097fa597b4&

(Vanilla behaviour)

Plugin and Datapack List

no plugins / datapacks

Paper version

This server is running Paper version 1.21.1-119-master@7cd4f2c (2024-10-03T15:19:34Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-18-63ce67d (MC: 1.21.1)

Other

this bug has been detrimental to the vanilla PvP community and has caused a lo...

rustic folioBOT
rustic folioBOT
#

Okay yea, I got it.
The issue isn't as much an issue with the invl ticks, the problem is (as per usual lol) the damage modifier API which to allow plugins to change damage values but fails at doing so.

This is a terribly complex and buggy systems, with people relying on nearly every quick, so fixing this is not gonna be fun or fast.
I'll try to write up a more indepth walk through for this issue tomorrow, but yea, confirmed.

rustic folioBOT
rustic folioBOT
#

I think this is not fixable. The client has it's own logic for checking if selectors can be used, and in vanilla, you have to have an op level of 2. You can try to fake that op level with the sendOpLevel API. In vanilla you have to have at least the 2 level. These arguments are parsed and validated purely on the client. The server-side logic for executing them already has the correct fixes (as evidenced by you being able to run the command).

rustic folioBOT
#

Is your feature request related to a problem?

Chunkpopulateevent I need to access the height but world.gethighestblockyat isn't ready yet sometimes triggering sync load, would be nice to get the heightmap from chunk directly.

Describe the solution you'd like.

Height map apis for chunk

Describe alternatives you've considered.

not using chunkpopulateevent

Other

No response

rustic folioBOT
#

Expected behavior

Cancelling ProjectileHitEvent for entity collisions should not prevent block collisions.

Observed/Actual behavior

Cancelling a ProjectileHitEvent fired for hitting an entity can cause arrows to phase through blocks.

Steps/models to reproduce

Shoot an arrow at an entity on the edge of its bounding box, towards the ground. If positioned correctly, the arrow will phase into a block. If the ground is thin enough, it will continue travelling after phasing into the block. Otherwise, it will be lodged within the ground.
Example image of lining up a shot:
Image

Plugin and Datapack List

Only a test plugin, with the following listener to cancel ProjectileHitEvent:

public class TestListener implements Listener {

    @EventHandler
    public void onHit(ProjectileHitEvent event) {
        if (event.getHitEntity() != null) event.setCancelled(true);
    }

}
...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Reducing the damage in EntityDamageByEntityEvent has no side effects and just reduces the damage.

Observed/Actual behavior

If the damage is reduced in EntityDamageByEntityEvent, the invulnerability timer for an entity is bypassed for subsequent attacks, due to a mismatch in how Paper calculates the most recent attack damage (lastHurt)

Steps/models to reproduce

Add a listener to EntityDamageByEntityEvent to multiply the damage by 0.9.

Place a breakpoint at LivingEntity.java#1470 (at return false):

                if (amount <= this.lastHurt) {
                    return false;
                }

If you spam click an entity, verify that this the breakpoint at 1470 is never hit with the listener, but is hit without.

Plugin and Datapack List

N/A

Paper version

This server is running Paper version 1.21.1-119-master@7cd4f2c (2024-10-03T15:19:34Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

My sincere thanks for merging this.

Having item's serialized out as a standardized human readable and editable format is great, and I don't think it matters all that much about the versioning worries people had above.

The main reason why backwards compatibility is critical with Minecraft Plugins, is that they often go unmaintained, and having them be valid for as long as possible helps the ecosystem immensely.

By outputting the items in the 'raw' format, you pass on the responsibility for keeping it up to date to both the dataconverters if it's got versioning information and the user.

Informed users can readily find the latest format to update configs, but rarely is it convenient to fork and upgrade plugins.

Having this, means that a plugin can exist that just loads items into minecraft from text, players can use whatever means they like to edit them, then serialize them back out for configs.

It means that a shop plugin using this, won't need to create it's own...

rustic folioBOT
#

bypassEnchantmentLevelRestriction(boolean) ? I 100% agree with masjson tho, that name is not something I'd be interesting in merging as it is giving some strong spigot vibes xD

im not good for names :c

but bypassEnchantmentLevelRestriction sounds a good method name and the docs talks more about how this means to the max level then i think can work (and can allow users again use that custom books)

rustic folioBOT
#

Expected behavior

when max-level": 1,it shold return Enchancement-name

Observed/Actual behavior

So its nothing bad but "max-level": 1, when enchancement put on item returns Enchancement-name 1

Steps/models to reproduce

in vanilla it works

Plugin and Datapack List

only one datapack with only one feature - 1 Enchancement
plugins: Server Plugins (31): Bukkit Plugins: - ArmorStandTools, AuctionHouse, AutoCraft, ChestShop, DecentHolograms, DimensionPause, Essentials, EssentialsChat, EssentialsDiscord, EssentialsDiscordLink, EssentialsSpawn, ExcellentCrates, floodgate, FreedomChat, Geyser-Spigot, GriefPrevention, *HopperPipes, LockettePro, LuckPerms, nightcore, ProtocolLib, SuperVanish, TAB, TextDisplay, UltimateAutoRestart, Vault, ViaBackwards, ViaVersion, voicechat, WorldEdit, WorldGuard

Paper version

latest

Other

No response

#

Some more information I got provided when I tried to take a look at it:

  • The general expectation is that any form of mutation should mutate the real object in the world
  • The following can be used for "replication steps". It should modify the in-game block entity, but that is currently not the case:
final BlockState state = block.getState(false);
if (state instanceof final TrialSpawner trialSpawner) {
    trialSpawner.getNormalConfiguration().setBaseSpawnsBeforeCooldown(100);
}

Also the TrialSpawnerConfig mentioned by lynx refers to net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerConfig.
Hope this helps at least a tiny bit @NithinSravan

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Shouldn't water animals and ambient creatures stay loaded for longer just like animals and monsters?

Observed/Actual behavior

Is it normal that ambient , water_creature , water_ambient and underground_water_creature all instantly despawn when a players leaves far away? That doesnt happen with monsters and creatures, I tested it with default configs and no plugins with latest software 1.21.1-2324-e12a4de (MC: 1.21.1)

if it is normal then and not a bug then is there a way to stop it from happening?

Steps/models to reproduce

Spawn a squid then fly away until the squid is no longer visible and immediately return.

Plugin and Datapack List

No plugins or datapacks.

Paper version

1.21.1-2324-e12a4de (MC: 1.21.1)

Other

No response

rustic folioBOT
#

Stack trace

Server Log containing the errors:
https://paste.gg/p/anonymous/fb749d8c53cb422ea335f69a2ef75fac

Plugin and Datapack List

Image

Actions to reproduce (if known)

  1. Run the command /to-config as a player
  2. On the console, run either startConfig or unconfig command

Paper version

[21:49:30 INFO]: This server is running Paper version 1.21.1-120-master@57c75a4 (2024-10-09T21:11:07Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version

Other

Here's the full testplugin code:

package com.zedphi.testplugin;

import com.mojang.brigadier.Command;
import io.papermc.paper.command.brigadier.Commands;
import io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.network.ServerConfigurationPacketListenerImpl;
import net.minecraft.server.network.Se...
rustic folioBOT
#

Expected behavior

You should be able to use the org.bukkit.block.Banner class to freely change the patterns on a placed banner, including removing all patterns if you wish.

Observed/Actual behavior

You can freely edit patterns in this manner, as long as the end state is that the banner still has some sort of pattern. If you try removing all patterns so the banner is empty, the banner remains unchanged (it keeps its previous patterns). This seems to only occur if the rest of the banner's state (banner type and rotation) is also unchanged.

Steps/models to reproduce

Here's the code from my plugin that highlights the issue. "bannerBlock" is an instance of org.bukkit.Block that points to the banner in the world, and the banner starts out with a pattern on it.
Banner bannerState=(Banner)bannerBlock.getState(); while(bannerState.numberOfPatterns()>0) bannerState.removePattern(0); bannerState.update(true);
If you run this code, the banner remains unchanged. HOWEVER, ...

rustic folioBOT
rustic folioBOT
#

I thought this was a thing until Mojang broke it a few versions ago

On Fri, 11 Oct 2024 at 06:12, Achy @.***> wrote:

Is your feature request related to a problem?

not sure if its removed or bugged
but i thought middle mouse button used to be enable for survival players
Describe the solution you'd like.

middle mouse button on inventory click
Describe alternatives you've considered.

middle mouse button on inventory click
Other

No response

โ€”
Reply to this email directly, view it on GitHub
https://github.com/PaperMC/Paper/discussions/11488, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJMAZFQXRRV5UBGN77VNWTZ25M5LAVCNFSM6AAAAABPYFA372VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXGMYDGNBYHE
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

rustic folioBOT
#

In my opinion, this is a wont-fix, at least for now. We actively did not expose any API for this yet as it is known to be rather broken on spigot and hence paper given the fact the ServerPlayer instance is re-used and is initialized early on the server side for the respective events.

Messing with internals like this is unsupported for a reason and, until someone finds the time to correctly implement this (which would be a rather large effort from my first glance) I don't think it is worth considering this a bug on our issue tracker. At best a feature request in our discussion section for proper API support during the configuration stage.

So more input on my opinion would be great tho, maybe this is an easy fix I am simply not seeing.

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

No mobs naturally spawn within a 24-block radius around a player, so setting the mob-spawn-range to less than 3 is ineffective.

Describe the solution you'd like.

I believe we should have the option to lower the minimum mob spawn range (currently 3, or 24 blocks) to smaller values. This could also allow for reducing the simulation distance below 3. While some mobs, such as ghasts and phantoms, need a larger spawn range, making the spawn distance adjustable per entity would be an ideal solution. This change would help optimize performance and enhance player experience by allowing more entities to appear in confined spaces, while still giving server administrators the flexibility to maintain a vanilla-like experience if desired.

Describe alternatives you've considered.

Just this :shrug:

Other

No response

rustic folioBOT
#

The game is generally written with the expectation that there is a 24-block dead zone; that way, a creeper or a Zoomie mini zombie doesn't instantly target you when it spawns behind you with a surprise hug. We also do not know the type of mob that is going to spawn, and so getting that information earlier would require dipping into the very logic people reduce their mob count limits to avoid when it comes to the hyper-active spawning logic.

I'm not sure that the side effects for this make sense; the simulation distance cannot be set below 3, and at that point, you're already having side effects on the game due to the short range that can impede vanilla playability. The game was not designed to be played at such low settings, and Mojang rarely ever seemingly actually takes that into consideration.

rustic folioBOT
#

Ah, I hadn't realized that we don't actually know the type of mob that spawns. I should have caught that from Paper's EntityPreSpawnEvent. Not sure what the solution would be for that. Altough I believe people reduce entities because of stuff like AiStep, adding more complexity to the already finicky type-based spawn logic might only make things worse.

When it comes to hostile mobs like zombies and creepers, I agree it makes sense for them not to target players immediately upon spawning, though some players might enjoy the added challenge. For passive mobs like sheep and cows, that caution isnโ€™t really necessary.

What you mentioned also made me think of something else--though I havenโ€™t looked into it on the discussions yet--what about configuring entity target ranges? Reducing the target range could help optimize performance by cutting down on things like pathfinding and zombie reinforcement logic, which can be quite resource-heavy.

As for the simulation distance side effe...

rustic folioBOT
#

Stack trace

The output in the console:

Exception in thread "AWT-EventQueue-0" [09:24:38 INFO]: [STDERR]: java.lang.NullPointerException: Cannot invoke "org.bukkit.Server.getTPS()" because "org.bukkit.Bukkit.server" is null
[09:24:38 INFO]: [STDERR]: 	at org.bukkit.Bukkit.getTPS(Bukkit.java:2385)
[09:24:38 INFO]: [STDERR]: 	at com.destroystokyo.paper.gui.RAMDetails.update(RAMDetails.java:62)
[09:24:38 INFO]: [STDERR]: 	at com.destroystokyo.paper.gui.GuiStatsComponent.lambda$new$0(GuiStatsComponent.java:27)
[09:24:38 INFO]: [STDERR]: 	at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:311)
[09:24:38 INFO]: [STDERR]: 	at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:243)
[09:24:38 INFO]: [STDERR]: 	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
[09:24:38 INFO]: [STDERR]: 	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
[09:24:38 INFO]: [STDERR]: 	at java.desktop/java.awt.EventQueue$4.run(Ev...
rustic folioBOT
rustic folioBOT
#

I've looked into it a little more, the API of Bukkit.getServer, which getTPS uses, is annotated not-null, so presumably the GUI is getting started earlier then it should.

I tried to add a defensive check to the GUI, as it doesn't seem to interact with many other Bukkit API's, but since the API is labelled not-null, it forced me to rethink whether the API should ever return null, even early.

But if it's assumed that the main consumers of the API are Spigot plugins, then I can understand labelling it not-null.

But with the introduction of Paper Plugins, I'm forced to wonder if the early bootstrapping of paper plugins give other opportunities for the server to be null, and that it's the annotation that's incorrect.

This isn't the low hanging fruit PR bugfix I thought it was.

#

The async profiler does not support java 23, either use j21/22, or disable
the async profiler in sparks settings (or, disable spark)

On Sat, 12 Oct 2024 at 09:03, LinuxMilanGithub @.***>
wrote:

Stack trace

The output in the console:

Exception in thread "AWT-EventQueue-0" [09:24:38 INFO]: [STDERR]: java.lang.NullPointerException: Cannot invoke "org.bukkit.Server.getTPS()" because "org.bukkit.Bukkit.server" is null
[09:24:38 INFO]: [STDERR]: at org.bukkit.Bukkit.getTPS(Bukkit.java:2385)
[09:24:38 INFO]: [STDERR]: at com.destroystokyo.paper.gui.RAMDetails.update(RAMDetails.java:62)
[09:24:38 INFO]: [STDERR]: at com.destroystokyo.paper.gui.GuiStatsComponent.lambda$new$0(GuiStatsComponent.java:27)
[09:24:38 INFO]: [STDERR]: at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:311)
[09:24:38 INFO]: [STDERR]: at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:243)
[09:24:38 INFO]: [STDERR]: at java.desktop/java.awt.e...

#

Provide the full log from 22

On Sat, 12 Oct 2024 at 10:28, Milan Bauer @.***> wrote:

I tried using OpenJDK 22.0.3 but got the same issue again, so it didn't
fix the error.

โ€”
Reply to this email directly, view it on GitHub
https://github.com/PaperMC/Paper/issues/11490#issuecomment-2408474502,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJMAZAJ43PZ6X4Q22BQCB3Z3DTULAVCNFSM6AAAAABP2FZNZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBYGQ3TINJQGI
.
You are receiving this because you commented.Message ID:
@.***>

#

Expected behavior

No error

Observed/Actual behavior

Image

This is a snippet of the code of the Axiom plugin by Moulberry.

It seems to currently lead to errors in the console that read like this: [19:49:46 ERROR]: Tried to load invalid item: 'Item must not be minecraft:air'

In the developer's own words:

This code here uses parse and falls back to ItemStack.EMPTY, but it does not prevent the ItemStack.LOGGER.error call in parse
So if parseOptional is given a (valid) empty ItemStack, an error message will be erronously printed

I hope that's enough of an explanation of the bug, otherwise feel free to ask.

Steps/models to reproduce

I hope I explained it above?

Plugin and Datapack List

I hope this isn't really required as we already narrowed it down to Axiom

Paper version

  [Sat 09:42:06 INFO ] Checking version, please wait...
  [Sat 09:42:06 INFO ] This ser...
rustic folioBOT
#

The validity of empty itemstacks in the context of a CompoundTag representation is kind of up in the air.

Additionally, using internals isn't really on us? The exposed byte[] serialization methods in paper do not accept empty item stacks as input so, axiom is already doing something scuffed to get that compound tag in the first place.
The log message there is useful for other potentially malformed items, we cannot just remove it.

Given axiom already makes heavy use of NMS for this, and the CODEC on ItemStack is public, I'd suggest a simplistic fix of

-        net.minecraft.world.item.ItemStack nmsStack = net.minecraft.world.item.ItemStack.parseOptional(MinecraftServer.getServer().registryAccess(), tag);
+        net.minecraft.world.item.ItemStack nmsStack = net.minecraft.world.item.ItemStack.CODEC.pars...
#

The validity of empty itemstacks in the context of a CompoundTag representation is kind of up in the air.

Additionally, using internals isn't really on us? The exposed byte[] serialization methods in paper do not accept empty item stacks as input so, axiom is already doing something scuffed to get that compound tag in the first place. The log message there is useful for other potentially malformed items, we cannot just remove it.

Given axiom already makes heavy use of NMS for this, and the CODEC on ItemStack is public, I'd suggest a simplistic fix of

  •    net.minecraft.world.item.ItemStack nmsStack = net.minecraft.world.item.ItemStack.parseOptional(MinecraftServer.getServer().registryAccess(), tag);
    
  •    net.minecraft.world.item.ItemStack nmsStack = net.minecraft.world.item.ItemStack.COD...
    
rustic folioBOT
#

Provide the full log from 22
โ€ฆ
On Sat, 12 Oct 2024 at 10:28, Milan Bauer @.> wrote: I tried using OpenJDK 22.0.3 but got the same issue again, so it didn't fix the error. โ€” Reply to this email directly, view it on GitHub <#11490 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJMAZAJ43PZ6X4Q22BQCB3Z3DTULAVCNFSM6AAAAABP2FZNZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBYGQ3TINJQGI . You are receiving this because you commented.Message ID: @.>
https://paste.gg/p/anonymous/9507b1bf7eb24fbaaab35ee5730313cb

rustic folioBOT
#

That crash report from 22 didn't even get to the part of loading paper, the process was seemingly intentionally killed by itself, potentially from libc. this would generally be an environmental issue, the GUI crash is weird, but, without full logs, all I can maybe do is assume that something in your environment caused it to blow up in an unexpected manner .

rustic folioBOT
#

Generally, LGTM.
Moved the impl of getOrDefault back to the impl, as that is where it lives in upstreams impl.

Only thing left to discuss pre-merge imo is a potential javadocs warning about how the impl works, given the pdc getter itself does not do IO but every query to it does, which might throw people off compared to the usual behaviour of OfflinePlayer, which does all its IO on the method itself and then returns a snapshot (e.g. location or metadata lists)

rustic folioBOT
#

Expected behavior

Wither Explosion in a Wither Rose Farm should damage and kill an Enderman dropping a Wither Rose.

Observed/Actual behavior

Wither Explosion does not damage Enderman at all, Enderman entity cram to death and drop pearls, despite Wither shooting Explosions next to them.

Steps/models to reproduce

  1. Be on a Paper/Purpur Server
  2. Build Shulkercrafts Wither Rose Farm
  3. Watch as Wither doesnt damage Enderman with explosions.

Plugin and Datapack List

Paper Plugins: (2):
FancyNpcs, HuskHomes
Bukkit Plugins: (63):**
ajLeaderboards, ArcadeGames, AutoMessage, BattlePass, BentoBox, BentoBox-AOneBlock, BentoBox-BSkyBlock, BentoBox-Challenges, BentoBox-Level, BentoBox-MagicCobblestoneGenerator, BentoBox-TopBlock, BlueBridgeCore, BlueBridgeGP, BlueBridgeWB, BlueBridgeWG, BlueMap, BlueMapDeathMarkers, BonesToBoneBlocks, BoundlessForging, ChatGames, CoreProtect, CoreProtectTNT, DecentHolograms, DiscordSRV...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

It's kind of related to a problem. I know you can set the command properties in plugin.yml, but since you can also set description within the code, I think it would be a great Idea to make the "Usage" property, which can beprinted via "/help command", also adjustable within the code.
For example I want to make a plugin with a simple /spawn command, that doesn't take any arguments. But in the "/help spawn" text it reads: "Usage: spawn [<args>]" and as far as I can see it there is no way except the plugin.yml to override this. (but maybe I'm just beeing dumb)

I also think there should be a "/" before the "spawn", because all the other commands have that.
image

Describe the solution you'd like.

The "Commands" interface has a function with several overloads to match the appropiate command registration, so add another overload to configure th...

#

While technically useless nitpick, this would fail if the annotation was present on the inner class but not on the outer one?

E.g. this may instead have to be something like

private static boolean isClassNullMarked(@NotNull ClassNode clazz, @NotNull Map<String, ClassNode> allClasses) {
    if (isClassNullMarked0(clazz)) return true;

    String parentClass = clazz.nestHostClass;
    while (parentClass != null) {
        final ClassNode parentClassNode = allClasses.get(parentClass);
        if (parentClassNode == null) return false;

        if (isClassNullMarked0(parentClassNode)) return true;

        parentClass = parentClassNode.nestHostClass;
    }
    return false;
}

if we truely care about supporting inner types correctly in this. Not that that is really important lol

rustic folioBOT
#

Ther eis programatically no use case for modifying the Usage of a command outside of to other plugins accessing this stuff, at the point at which this occurs, this is far too late. if you want to setup stuff programmatically, define your commands programmatically and set the usage message there, that should apply to the help map, otherwise, you'd need to see if you can mess with the HelpMap, which wasn't really well designed for mutating stuff in there, and there is little interest from me in toying with the help map, it really should just go.

#

Well I guess assuming you were running the server on the same Purpur Version without Plugins, it very well could be a plugin issue.. which means "Yayyyy hours of testing!" lol.. but if thats the case then yeah i guess you can close this. Strange though. Havent added any new plugins, or updated in a while, seems to just have stopped working suddenly.
Would you have any insight on where I can begin if its plugin related. Id first assume World Guard, or Coreprotect.. but like i said havent touched/updated those in a bit so idk why it would break suddenly.

rustic folioBOT
rustic folioBOT
#

i had the same issue recently, it only works for me with disabled spark.
i'm running the server on android with termux though so my guess is that this is similar to the issues i've had with getting docker to run, where programs don't have access to PIDs and some other low level functions in the kernel which might be required for spark.

rustic folioBOT
#

Stack trace

https://paste.gg/p/anonymous/5bff65bd350645aeb45bcafc11a07598

Plugin and Datapack List

No plugin

Actions to reproduce (if known)

cause: lg 32gn600-b monitor. it turns off ittself at iddle and make mouse dissapear. this cause the server sometimes crash, but now i got the message

Paper version

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

Other

No response

rustic folioBOT
rustic folioBOT
#

I do not have any chat spam/filtering system

I have multiple services that I have dockerized, including the vanilla Minecraft server that I've built off a very basic OpenJDK image from dockerhub, I'd post a link to the base image, but I don't know your rules on external links. I use a dockerized nginx as a reverse proxy to access them all, and handle SSL, though TCP streams don't use SSL certs. my reverse proxy also handles connections to the minecraft container. It's very basic:

# /etc/nginx/stream.d/default.conf
server {
    listen 25565;
    proxy_pass minecraft:25565;
}

Further up the chain, if you want to see where streams are declared on the same level as http, I have this:

# #/etc/nginx/nginx.conf
stream {
    include /etc/nginx/stream.d/*.conf;
}

You can actually see in the logs that everyone has the same IP, I was guessing that might be due to the reverse proxy, and it hadn't caused problems before, and it's...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

This is just adding certain Gradle tasks as runs to the IDE, which can be done manually for the tasks someone cares about by running them once from the IJ Gradle menu (after which they will stay in the run menu). I don't see any utility here. Actual IntelliJ run configs that don't invoke Gradle could be interesting but we would likely need to generate the XML directly as the intellij-ext plugin is quite limiting.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

To not get some wierd entities. To be precise I want nothing to happen with my "minecraft:interaction" so it will stay as it spawned, like this: Image

Observed/Actual behavior

It does this:
Image
In normal game its impossible to spawn this kind of interaction, and in my case it really matters as the eye line(or whatever this blue line is) is where passengers sit, and after this wierd rotation they go up.

Steps/models to reproduce

  1. setup server and any plugin that cancels the PlayerInteractAtEntityEvent , for example this plugin:
    package com.example.bug;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerInteractAtEntityEvent;
    import org.bukkit.plugin.java.JavaPlugin;
    public final class Bug extends JavaPlugin implements Lis...
rustic folioBOT
#

This is kind of just a very funny minecraft bug that is exposed by us resending all entity data to correctly sync entities.

TDLR is that the "correct" state you are describing is completely incorrect.
The eye height being 0 on the client is only the case because the pose data is never sent by the server as the default is never changed.
The interaction entities dimension is never recomputed on the client from its default of 0/0, even if the width and height are changed.

I think this is still a worthwhile fix/compliance with mojang logic (mostly because it should be easy) but be aware that the existing code does not actively define the eyeheight of interaction entities to be 0, hence you are relying on a bug.

rustic folioBOT
#

The client computes the eyeheight as 85% of the height when it refreshes its dimension.
So no, you'd have to resend the entity data with a height/width of 0 and re-resend the correct width/height afterwards.

Alternatively, a quick hack fix might be

diff --git a/patches/server/1013-Properly-resend-entities.patch b/patches/server/1013-Properly-resend-entities.patch
index 148750ed5..671b436cb 100644
--- a/patches/server/1013-Properly-resend-entities.patch
+++ b/patches/server/1013-Properly-resend-entities.patch
@@ -102,7 +102,7 @@ index 0034483685ba626e5883b857de96ffd36e57e150..4c04eb531b6989f7e618d201ecaa8429
                              }
  
 diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 3a90dd1289d393426151d4457edaf99731cc34db..ec058eb6a10500831f173dcb47576c32c7516318 100644
+index 65f2cad4b5df6a89373fb69edfc7d488d0fdcbed..613e66e1abb2cddb9f39f8ac255b1eb493915beb 100644
 --- a/s...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Timings or Profile link

N/A

Description of issue

Discussed internally- no timings link or plugin list. This is an issue created so I can reference it in a near-future PR.

Commit 0ed4b91 reverts ThreadPoolExecutor to Executors#newCachedThreadPool which was changed to solve an issue of hanging logins. The problem with both, as discussed, is that both have the unfortunate side-effect of using one thread in the pool when combined with an unbounded queue. In the case of ServerLoginPacketListenerImpl this means that ALL logins are sent to the same thread regardless of how many threads the pool has available.

Discussions lead to a few different solutions, but after looking at the benefits and drawbacks of each solution the easiest fix is to use a fixed thread pool (a new ThreadExecutor where the core pool size is equal to the maximum pool size).

Other resolutions di...

rustic folioBOT
#

The exception comes from the FutureChain, the new future that is appended is already running in the chat thread, and the thenAcceptAsync tries to schedule a new task on the same executor that is currently busy.
The chat executor is a ThreadPoolExecutor using a SynchronousQueue, that means it can only schedule tasks if there is a thread waiting for one, and given the max pool size is 1 and that thread is currently busy, it rejects the task.
Not entirely sure how this busts the chain

Again, I try to promote this to the masses as much as possible. For blocking I/O, it is easier and best to use virtual threads! An OS thread is an expensive resource, there is a big fight for it in the scheduler. This solution will solve A LOT of problems. First, we will not need to manually configure the pool size, since it will often be the size of real hardware threads, on the JVM. At the moment, virtual threads work on ForkJoinPool, which is also very good. a) FJP itself is tuned for virtual th...

#

This isn't blocking IO, utilising vthreads will fix nothing here, this is not the place for your soap box

as far as i know, the problem is related to the fact that 1 threads in the pool can't be woken up by anyone. This is exactly what i'm talking about. creating such threads for every sneeze. for insurance - is a bad solution. This is illiterate planning, which is broken by such configurations

rustic folioBOT
#

For blocking I/O

This has nothing to do with blocking operations, VTs will not help here, if
anything they would hinder the FJP that schedules VTs and with something
like chat it's very easily DDoSable for CPU bound tasks as opposed to a
task queue on its own platform thread.

Third, simpler and more understandable code, without react
CompletableFuture

You still need a form of continuations given the linked/queued demand of
the chat chain, CF offer such mechanism, even with VTs you need to ensure
that one message gets processed after the other, not in some arbitrary.

On Thu, 17 Oct 2024, 19:10 Sunmisc Unsafe, @.***> wrote:

The exception comes from the FutureChain, the new future that is appended
is already running in the chat thread, and the thenAcceptAsync tries to
schedule a new task on the same executor that is currently busy.
The chat executor is a ThreadPoolExecutor using a SynchronousQueue, that
means it can only schedule tasks if th...

#

The issue is that the only thread that takes care of things in that pool
cannot take any more tasks because of the kind of queue it uses under the
hood. The thread is awake and is currently busy, so it can't enqueue to
itself a new task for later.

On Thu, 17 Oct 2024, 19:21 Sunmisc Unsafe, @.***> wrote:

This isn't blocking IO, utilising vthreads will fix nothing here, this is
not the place for your soap box

as far as i know, the problem is related to the fact that 1 threads in the
pool can't be woken up by anyone. This is exactly what i'm talking about.
creating such threads for every sneeze. for insurance - is a bad solution.
This is illiterate planning, which is broken by such configurations

โ€”
Reply to this email directly, view it on GitHub
https://github.com/PaperMC/Paper/issues/10813#issuecomment-2420719952,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIPXWBCHOPU7B7JCWTQFOLLZ4AZ43AVCNFSM6AAAAABIOAUTS6VH...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

For blocking I/O
This has nothing to do with blocking operations, VTs will not help here, if anything they would hinder the FJP that schedules VTs and with something like chat it's very easily DDoSable for CPU bound tasks as opposed to a task queue on its own platform thread. And you are taking up threads that blocking operations can actually take advantage on by sharing the thread amongst them.
Third, simpler and more understandable code, without react CompletableFuture
You still need a form of continuations given the linked/queued demand of the chat chain, CF offer such mechanism, even with VTs you need to ensure that one message gets processed after the other, not in some arbitrary.
โ€ฆ
On Thu, 17 Oct 2024, 19:10 Sunmisc Unsafe, @.***> wrote: The exception comes from the FutureChain, the new future that is appended is already running in the chat thread, and the thenAcceptAsync tries to schedule a new task on the same executor that is currently busy. The chat ...

#

We are not rewriting mojangs chat system

On Fri, 18 Oct 2024 at 09:47, Sunmisc Unsafe @.***>
wrote:

For blocking I/O
This has nothing to do with blocking operations, VTs will not help here,
if anything they would hinder the FJP that schedules VTs and with something
like chat it's very easily DDoSable for CPU bound tasks as opposed to a
task queue on its own platform thread. And you are taking up threads that
blocking operations can actually take advantage on by sharing the thread
amongst them.
Third, simpler and more understandable code, without react
CompletableFuture
You still need a form of continuations given the linked/queued demand of
the chat chain, CF offer such mechanism, even with VTs you need to ensure
that one message gets processed after the other, not in some arbitrary.
โ€ฆ <#m_-5447267336639540058_>
On Thu, 17 Oct 2024, 19:10 Sunmisc Unsafe, @.*> wrote: The exception
comes from the FutureChain, the new future th...

#

We are not rewriting mojangs chat system On Fri, 18 Oct 2024 at 09:47, Sunmisc Unsafe @.**> wrote:
โ€ฆ
For blocking I/O This has nothing to do with blocking operations, VTs will not help here, if anything they would hinder the FJP that schedules VTs and with something like chat it's very easily DDoSable for CPU bound tasks as opposed to a task queue on its own platform thread. And you are taking up threads that blocking operations can actually take advantage on by sharing the thread amongst them. Third, simpler and more understandable code, without react CompletableFuture You still need a form of continuations given the linked/queued demand of the chat chain, CF offer such mechanism, even with VTs you need to ensure that one message gets processed after the other, not in some arbitrary. โ€ฆ <#m_-5447267336639540058_> On Thu, 17 Oct 2024, 19:10 Sunmisc Unsafe, @.
> wrote: The exception comes from the FutureChain, the new future that is appended is already running in t...

#

Vthreads are not a magical solution; bounding everything to a shared thread
pool makes no sense for work that does not take advantage of the ability to
pause efficiently; outside of those use cases, vthreads offer practically
no real advantage to what is computational work, which does not utilise the
triggers that Vthreads exist to take advantage of.

People will continue to use their own pools for the lifecycle advantage
that they offer. They aren't going to blindly rush out to utilise a feature
that doesn't offer any distinct advantage to them, especially when it comes
with a whole host of untested caveats, especially in an ecosystem they do
not have full control over.

On Fri, 18 Oct 2024 at 09:56, Sunmisc Unsafe @.***>
wrote:

We are not rewriting mojangs chat system On Fri, 18 Oct 2024 at 09:47,
Sunmisc Unsafe @.

*> wrote: โ€ฆ <#m_2704420606008294549_> For blocking I/O This has nothing to
do with blocking operations, VTs will not help here, if...

#

Expected behavior

When teleporting a player with RETAIN_VEHICLE it should teleport the player with the vehicle

Observed/Actual behavior

When teleporting the player, it desyncs and does not teleport player or Minecart
As clip shows when then you dismount the vehicle, it moves the player to the given location, but vehicle is left behind
On dismount it also calls the PlayerTeleportEvent again as shown by console log
Removing the RETAIN_VEHICLE flag correctly teleports player, but leaves vehicle behind

https://github.com/user-attachments/assets/6785722a-e849-479a-b78e-a4e9f9dbed58

Steps/models to reproduce

  1. Listen to VehicleMoveEvent
  2. Filter passengers to players and teleport to XYZ with RETAIN_VEHICLE flag

Plugin and Datapack List

[11:10:28 INFO]: Server Plugins (1):
[11:10:28 INFO]: Bukkit Plugins:
[11:10:28 INFO]:  - TeleportAsyncTest

Paper version

[11:10:17 INFO]: Checking version, please wait...
[11:10:17 INFO]: This server is running ...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Vthreads are not a magical solution; bounding everything to a shared thread
pool makes no sense for work that does not take advantage of the ability to
pause efficiently; outside of those use cases, vthreads offer practically
no real advantage to what is computational work, which does not utilise the
triggers that Vthreads exist to take advantage of.

People will continue to use their own pools for the lifecycle advantage
that they offer. They aren't going to blindly rush out to utilise a feature
that doesn't offer any distinct advantage to them, especially when it comes
with a whole host of untested caveats, especially in an ecosystem they do
not have full control over.

On Fri, 18 Oct 2024 at 09:56, Sunmisc Unsafe @.***>
wrote:

We are not rewriting mojangs chat system On Fri, 18 Oct 2024 at 09:47,
Sunmisc Unsafe @.

*> wrote: โ€ฆ <#m_2704420606008294549_> For blocking I/O This has nothing to
do with blocking operations, VTs w...

#

Because if this.tickingBlocks is null, a call to this.tickingBlocks.remove() would crash immediately.

In theory there shouldn't really be any calls to remove when there are no tickingBlocks... But I decided to create the structure, just to not modify the original behavior.

It could be changed to if (this.tickingBlocks != null) this.tickingBlocks.add(x, y, z, state);, but I decided just creating it is simpler (1 loc vs 3 loc).

#

Because I wanted to leave the functionality intact.

The function expects to return an IBlockDataList, so I made it return IBlockDataList.
"Sometimes" returning null here would be bad practice and could introduce unknown bugs if someone ever uses it from some unexpected place.

In practice the only call to getTickingBlockList() never executes because if(anyTickingBlocks() == false) continue; is executed before it.

rustic folioBOT
rustic folioBOT
#

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

Bukkit Changes:
bb4e97c6 Add support for Java 23
bc6874dd Bump asm to 9.7.1
50e8a00b PR-1064: Add specific getTopInventory methods for InventoryView derivatives
758b0a0f SPIGOT-7911: Fix Location#isWorldLoaded() for re-loaded worlds
133a64a7 Improve Registry#getOrThrow messages
be0f5957 PR-1058: Add tests for Minecraft registry <-> Bukkit fields
d1b31df2 PR-1062: Clarify BeaconView documentation
3fab4384 PR-1060: Cache Material to BlockType and ItemType conversion
967a7301 SPIGOT-7906: Increase YAML nesting limit to 100
6ecf033d SPIGOT-7899: Smithing recipes don't require inputs

CraftBukkit Changes:
0a7bd6c81 PR-1493: Improve reroute performance and add some tests
54941524c Add support for Java 23
f4d957fff SPIGOT-7915: Fix World#getKeepSpawnInMemory() using Spawn Radius rather than Spawn Chunk Radius
ded183674 Fix ...

rustic folioBOT
#

Expected behavior

it should loaded correctly (by skip remapping task or we can add a value in plugin.yml to disable plugin remapping)

Observed/Actual behavior

plugin doesn't load by the server unless I add -Dpaper.disablePluginRemapping=true to JVM flags

[12:18:58 INFO]: [PluginRemapper] Remapping plugin 'plugins\Wind-1.30.3.jar'...
[12:18:58 ERROR]: [PluginRemapper] Encountered exception remapping plugins
java.util.concurrent.CompletionException: java.lang.RuntimeException: Failed to remap plugin jar 'plugins\Wind-1.30.3.jar'
        at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Fixes #11494 - As noted on the issue, the method here can blow up in certain cases, the GUI logic already handles "the mouse is missing", and so, we'll just catch this and move on.

Misc fix - There is probably an issue report for this somewhere, but, the details section utilised the bukkit singleton to try to get the TPS from the server. We already have the MinecraftServer instance passed into us, and so we'll just get the information directly from there instead.

#

I have created a PR which solves the GUI error, but we don't support running the server in such environments as Android. The userspace images and packages provided by these redistributions are often broken in various and interesting ways; given that we're not an Android team, we do not have the capability or desire to dedicate time and resources to diagnosing issues in these environments, especially when in the case of 22, you didn't even get to the point where the JVM has loaded the paper jar.

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: fix/banner-be-patterns
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: fix/banner-be-patterns
#

After some chatter with the team, I are not going to pull a PR that modifies moonrise-only logic.
Patching over moonrise in this matter means additional upkeep during moonrise updates, which are already a pain to begin with.

We'll expand the contribution documentation to make this clear, but this diff belongs into moonrise.
If you do not feel comfortable with contributing it to moonrise yourself due to the mixins usage over patches, I can offer to pick up that work and open the respective PR on the project some time next week, with you as the author :+1:

Obviously does not mean this change is something 100% accepted into moonrise, but yea.
Hope you understand my reasons for closing this and thank you for the generally smart contribution, even if it was the wrong project :sweat_smile:

#
[PaperMC/Paper] branch deleted: fix/gui-booms
rustic folioBOT
#

If you do not feel comfortable with contributing it to moonrise yourself due to the mixins usage over patches, I can offer to pick up that work and open the respective PR on the project some time next week, with you as the author ๐Ÿ‘

It makes perfect sense to go Moonrise -> Paper in this case.

Unfortunately learning Forge and Mixins and yet another software is something I don't really have time for. Perfectly happy for someone else to implement it - it's a very simple patch anyway. โค๏ธ

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: dev/moonrise-update
rustic folioBOT
#

Is your feature request related to a problem?

when a player(or Console) execute command, Record the output and provide a method to get the message, I think sometimes this will be useful especially when this command is related to DataPacks, /execute, /trigger or /function etc.

Describe the solution you'd like.

In Class ExecuteCommandEvent, add a mathod like getResult()(or one more setting method setResult())

Describe alternatives you've considered.

Using NMS, but i think this usually not recommended.

Other

No response

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Update Paper to 1.21.2.Keep up with the Spigot and add the pouch at the same time.

Describe the solution you'd like.

Update Paper to 1.21.2.

Describe alternatives you've considered.

Use Spigot.

Other

No response

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

Expected behavior

[03:26:51 INFO]: [TestPlugin] Key: 0.1 Val: 5
[03:26:51 INFO]: [TestPlugin] Key: 0.2 Val: 10
[03:26:51 INFO]: [TestPlugin] Key: 1 Val: 20

Observed/Actual behavior

[03:26:51 INFO]: [TestPlugin] Key: 0Val: MemorySection[path='0', root='YamlConfiguration']
[03:26:51 INFO]: [TestPlugin] Key: 1Val: 20

Steps/models to reproduce

1. Load up a test plugin with the following code

public final class TestPlugin extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(this, this);
        saveDefaultConfig();
        reloadConfig();
        getConfig().getValues(false).forEach((key, val) -> getLogger().info("Key: " + key + " Val: " + val));
    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }
}

2. Use the following config.yml:

"0.1": 5
"0.2": 10
"1": 20

**3. Start the server and observe the...

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

Vanilla bug or not, it would be dangerously fragile API to tie the 'middle click' action to only the middle click press, despite how its currently named.

In fact, the current naming scheme is kinda bad, given the ability to rebind other controls, but I don't think it's necessarily appropriate to change that now, 10 years in, what I don't want to see though, is a mix of "the name reflects the default controls so people understand the action easier" and "the name reflects the actual button being used" side by side.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I'm experiencing the same error too.

[05:22:53 ERROR]: [ca.spottedleaf.moonrise.patches.chunk_system.scheduling.NewChunkHolder] Failed to save entity data (10,-995) in world 'survival'
net.minecraft.ReportedException: Saving entity NBT
at net.minecraft.world.entity.Entity.saveWithoutId(Entity.java:2594) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at net.minecraft.world.entity.Entity.saveAsPassenger(Entity.java:2407) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at net.minecraft.world.entity.Entity.saveAsPassenger(Entity.java:2393) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at net.minecraft.world.entity.Entity.save(Entity.java:2423) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at ca.spottedleaf.moonrise.patches.chunk_system.level.entity.ChunkEntitySlices.saveEntityChunk0(ChunkEntitySlices.java:116) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at ca.spottedleaf.moonrise.patches.chunk_system.level.entity.ChunkEntitySlices.saveEntityChunk(ChunkEntitySlices.java:94) ~[purpur-...

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

Is your feature request related to a problem?

N/A

Describe the solution you'd like.

Add support for the && operator in commands, allowing players to chain multiple arguments in a single command. This would simplify commands such as /title and enable users to combine multiple commands, like:

Example
/title @a title {"text":"hello"} && title @a subtitle {"text":"hello"}

Describe alternatives you've considered.

N/A

Other

N/A

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

6df21e6 Start Moonrise update - Spottedleaf
47258a7 Move common diffs to MCUtils - Spottedleaf
ecf4d97 Begin fixing issues - Spottedleaf
8e569ba Merge patches - Spottedleaf
3b31621 Implement config hooks in PaperHooks - Spottedleaf
e9c58f5 Implement chunk tick iteration optimisations - Spottedleaf
2a95ad1 Implement explosion optimisations - Spottedleaf
16d2c9d Implement Starlight - Spottedleaf
3d7b570 Implement chunk system - Spottedleaf
1d341df Fix some compile errors from patches - Spottedleaf
6daedd7 Prepare rebase - Spottedleaf

rustic folioBOT
#
[PaperMC/Paper] branch deleted: mainCapabilityAttribute
rustic folioBOT
#

Expected behavior

experiencing the same error too. (https://github.com/PaperMC/Paper/issues/11136)

No errors in console.

[05:27:15 INFO]: Checking version, please wait...
[05:27:15 INFO]: Current Purpur Version: 1.21-2284-4e55e26 (MC: 1.21)*

You are running the latest version

Observed/Actual behavior

n/A

Steps/models to reproduce

[05:22:53 ERROR]: [ca.spottedleaf.moonrise.patches.chunk_system.scheduling.NewChunkHolder] Failed to save entity data (10,-995) in world 'survival'
net.minecraft.ReportedException: Saving entity NBT
at net.minecraft.world.entity.Entity.saveWithoutId(Entity.java:2594) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at net.minecraft.world.entity.Entity.saveAsPassenger(Entity.java:2407) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at net.minecraft.world.entity.Entity.saveAsPassenger(Entity.java:2393) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at net.minecraft.world.entity.Entity.save(Entity.java:2423) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at ca.spottedleaf.moonris...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Also affects teleporting Vehicle with RETAIN_PASSENGERS fairly consistently

https://github.com/user-attachments/assets/f79c8d6f-5e29-44c5-84bb-8c6eaee2f9bf

Shows it consistently breaking one way until i move a second player into the target-location
Assuming to keep chunk loaded, thus teleport goes from breaking consitently to not breaking

https://github.com/user-attachments/assets/fa7680d5-218b-4d66-b670-f7cdf3a18af1

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Paper 1.8.8 will be identified as a paper version

Observed/Actual behavior

Image

Steps/models to reproduce

create a paper 1.8.8 server and add plugin portal to the /plugin directory

Plugin and Datapack List

CratesPlus, ChatPings, SkinsRestorer, LastLoginAPI, PluginPortal, Parties, ArmorStand-Limiter, Discord-Linker, TabTPS, Votifier, Essentials, EssentialsGeoIP, EssentialsAntiBuild, BetterRTP, EssentialsSpawn, EssentialsProtect,

Paper version

[16:53:27 INFO]: This server is running CraftBukkit version git-PaperSpigot-445 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)

[16:53:27 INFO]: Checking version, please wait...

[16:53:32 INFO]: Error obtaining version information

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

PlayerDeathEvent custom drops are not mutated in any way by the server after the event is handled.

Observed/Actual behavior

PlayerDeathEvent custom drops are mutated into AIR by the server after the event is handled.

Steps/models to reproduce

Given the following (somewhat contrived) example code:

package org.example.plugin;

import org.bukkit.Material;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;

public class ExamplePlugin extends JavaPlugin implements Listener {

	@Override
	public void onEnable() {
		getServer().getPluginManager().registerEvents(this, this);
	}

	@EventHandler
	public void onPlayerDeath(PlayerDeathEvent e) {
		final ItemStack itemStack = new ItemStack(Material.DIAMOND);
		// Any custom drops added are affected by this issue
		e.getDrops().add(itemStack);

...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: dev/timings
#
[PaperMC/Paper] branch deleted: dev/timings
rustic folioBOT
rustic folioBOT
#

Expected behavior

Projectiles should pass through the portal (in vanilla since 1.21.2)

Observed/Actual behavior

Projectiles disappear when touching the portal

Steps/models to reproduce

Example video when shooting an arrow through a nether portal
https://github.com/user-attachments/assets/d2a64cd1-216e-4f79-b12b-75413cba3f0f

Plugin and Datapack List

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

Paper version

[19:52:32 INFO]: This server is running Paper version 1.21.3-DEV-dev/1.21.2@f8f230a (2024-10-27T18:45:43Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.3-DEV-4d87302 (MC: 1.21.3)

Other

Upstream (Spigot) is not affected

rustic folioBOT
#
[PaperMC/Paper] New branch created: 1.21.3-legacy-ender-pearls
rustic folioBOT
#
[PaperMC/Paper] New branch created: 1.21.3-spark-tasks
rustic folioBOT
#
[PaperMC/Paper] branch deleted: 1.21.3-spark-tasks
#
[PaperMC/Paper] New branch created: 1.21.3-sleep-tasks
rustic folioBOT
rustic folioBOT
#

legacyEnderPearlBehavior is fine IMO. It indicates there has been a change, and people can find more info about it on the docs.

As long as enderpearls are never changed again, otherwise you might need a legacyLegacyEnderPearlBehavior.

Personally, anything named 'legacy' or 'old' is a code smell in any coding project, unless it clarifies which legacy behaviour it is almost immediately.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

before paper remap:
Image

Observed/Actual behavior

after paper remap:
Image
Image

Steps/models to reproduce

((CraftWorld) world).getHandle().getChunkSource().chunkMap

.chunkMap will be destroyed by paper

Plugin and Datapack List

plugins
[23:17:07 INFO]: Server Plugins (1):
[23:17:07 INFO]: Bukkit Plugins:
[23:17:07 INFO]: - NeigeItems

Paper version

1.21.1-128

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

github doesn't support more than 1000 patches in same folder, paper has over 1000

Describe the solution you'd like.

move patches into folders like /patches/server/0-500 /patches/server/500-1000 ?

Describe alternatives you've considered.

Not sure

Other

No response

#

Is that repository public?
If those paperweight usages are in a submodule you need to also respect their manifest files when shading them in.
I'll close this issue as this is just a configuration issue given the remapper would not even remap your jar if you correctly marked it.
The deeper issue of our mapping logic getting tripped up when spigot and mojang mappings collide is known, but only applies to reflective access.

If you need more help with configuring your project to correctly define the mojang namespace in the manifest file, check by our discord.

#

Is that repository public? If those paperweight usages are in a submodule you need to also respect their manifest files when shading them in. I'll close this issue as this is just a configuration issue given the remapper would not even remap your jar if you correctly marked it. The deeper issue of our mapping logic getting tripped up when spigot and mojang mappings collide is known, but only applies to reflective access.

If you need more help with configuring your project to correctly define the mojang namespace in the manifest file, check by our discord.

Yes, this repository is public: https://github.com/ankhorg/NeigeItems-Kotlin
The submodule ":hooker:nms:v1_21+" uses paperweight.
I resolved this issue in a somewhat unconventional way.

rustic folioBOT
#

Yeah sounds fair, that's why I was not sure if this should be considered a Paper bug or API user error.

there are 0 promises in the long term of how these items are handled

So in the general case, whenever you pass an ItemStack to the API that does something with the ItemStack "later", such as adding ItemStacks to PlayerDeathEvent#getDrops(), you should expect that the server will "clobber" it, i.e. you, the caller, needs to save (clone) it if you don't want it to change? Even if the thing you're passing it to seems "harmless"? Like, in the PlayerDeathEvent drops case, my naive expectation would be that the server just has to read the ItemStack in order to drop it, not write to it (i.e. set the count to 0).

I'm not that familiar with the server internals but I understand if "0 promises" has to be the case for one reason or another. Still, I can't help but feel that it's a bit unintuitive, and a potential pitfall for newcomers to the API. Do you have any long-term plans to a...

rustic folioBOT
#

the server just has to read the ItemStack in order to drop it

There are 0 promises that the server will blindly clone an ItemStack you put into the world for you, a lot of the old behavior here was somewhat a mixture of happenchance or the fact that ItemStacks often API driven which is no longer the case; The behavioral change should probably be fixed, but, long run, you should be cloning any stack you don't want to be modified outside of your control when you're putting it into the world

The only thing we could ever do here is start blindly cloning ItemStack instances all around the API, but there is no real great consistency in the internals or the API here in terms of how this sort of thing is handled, and there is a lot of reliance on the fact that ItemStacks are not blindly cloned all over the place to prevent these issues

rustic folioBOT
rustic folioBOT
#

Yeah this is starting to click in my head now, thanks for the input. I think part of my confusion comes from these API inconsistencies and "hidden" happenchance behaviors around ItemStack. Even though it seems obvious in hindsight, I hadn't really considered that a consequence of adding the ItemStack to the drops is that it becomes "live" in the world. And I feel like it's very common for the API to hide this fact because it in fact does copy the ItemStack in many cases.

I also think it's interesting to compare ItemStack to Block and Entity. For the latter two, I think it is quite intuitive to understand that they are "live" and mutable objects in the world, so you should expect them to change. And both also have immutable snapshot variants (BlockState and EntitySnapshot) that you can use if you want just that, an immutable snapshot (which is also an intuitive concept).

But ItemStack is this weird middle ground where it can be "live" in the world, but it can also be "disconnected"...

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: 1.21.3-sleep-tasks
rustic folioBOT
#

Expected behavior

Chunk generation below Y=0 to be disabled in existing chunks when a 1.12.2 world is migrated to 1.21.1 when setting below-zero-generation-in-existing-chunks: false in spigot.yml.

Observed/Actual behavior

World migrates successfully, but generates chunks below Y=0 when players move around

Steps/models to reproduce

  1. Start new paper-1.21.1-128 server in empty directory
  2. Accept EULA
  3. Restart server to generate default configs
  4. Stop server
  5. Change below-zero-generation-in-existing-chunks to false in spigot.yml
  6. Delete world/
  7. Copy 1.12.2 world into directory to replace world/
  8. Start server
  9. Join server and fly below Y=0 in spectator mode

Plugin and Datapack List

/plugins: None
/datapack list: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]

Paper version

This server is running Paper version 1.21.1-128-master@d348cb8 (2024-10-21T16:23:24Z) (Implementing API version 1.21.1-R0.1...

rustic folioBOT
#
[PaperMC/Paper] New branch created: is-tick-sleeping-api
rustic folioBOT
#

Since 1.21.2, vanilla split relative teleportation flags into position and delta/velocity flags into separate enum entries. This highlighted a design flaw in the paper api addition for teleport flags, which just simply mirrored internals while also only being able to apply the delta/velocity part of a flag, given the teleport target is always absolute in the API.

This patch proposes to simply no longer expose the non-velocity related flags to the API, instead marking the entire Relative enum as being purely velocity related, as non-velocity related flags are not useful to callers. This was done over simply exposing all internal flags, as another vanilla change to the internal enum would result in the same breakage.

The newly proposed API only promises that the passed flags prevent the loss of velocity in the specific axis/context, which should be independent enough of vanillas specific implementation of this feature.

rustic folioBOT
rustic folioBOT
#

Before:
Dying with item in merchant inventory while in inventory protected area (item drops):
https://github.com/user-attachments/assets/bf14d5a0-6e20-4a7d-b240-578d98d2074e

Dying with item on cursor while in inventory protected area (item drops):
https://github.com/user-attachments/assets/f9da24f3-6128-4d32-b580-e6fd22a4f13e

Dying with item in anvil inventory while in inventory protected area (item drops):
https://github.com/user-attachments/assets/05013e61-ab6e-4831-a3a4-a4698aa18af5

#

After (with config option enabled)

Dying with item in merchant inventory while in inventory protected area (item returned to inventory):
https://github.com/user-attachments/assets/9d32951f-1a79-4c95-8d41-05864c89c27c

Dying with item on cursor while in inventory protected area (item returned to inventory):
https://github.com/user-attachments/assets/a692f718-9817-4c69-9c44-8b1dc9d1169e

Dying with item in anvil inventory while in inventory protected area (item returned to inventory):
https://github.com/user-attachments/assets/d453f48e-b47a-48cd-879b-c23896ef470e

Dying with item in crafting grid while in inventory protected area (item returned to inventory):
https://github.com/user-attachments/assets/25a9485a-e574-484f-9a69-bad76c7434d1

rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: 1.21.3-legacy-ender-pearls
#
[PaperMC/Paper] New branch created: ver/1.21.1
rustic folioBOT
rustic folioBOT
languid raptor
#

You can't stop me

#

Okay well ci publishing stopped me on the 1.20.4 one...

languid raptor
#

Hah succeeded now (but also, you really shouldn't be on any version below 1.21.1)

rustic folioBOT
rustic folioBOT
#

The RNG used in selecting random blocks for updates, is fundamentally flawed, plotting some values sampled from this RNG clearly indicates the problem:
weak

Modifying the algorithm to include a couple more terms yields a much nicer and random looking result:
strong

Additionally this PR removes the deprecated threadSafeRandom object used for providing the client with seeds for sound variant selection in favor of using the improved randValue :D

#

I've fixed it to not be hard-coded, except for EntityType.SPAWNER_MINECART, as that doesn't have a corresponding item, and the function just returns a normal minecart. I've used a string based system, as I couldn't find any other way to do it. The current approach gets the short string of the entitytype (like chest_minecart), and gets the item with the corresponding ResourceLocation

rustic folioBOT
#

I remember some fork a while ago attempted to optimize block update RNG at some point.

@ScriptLineStudios If you can prove that this RNG pattern causes problems, you would need to raise issues with Mojang directly? Otherwise it must have been a deliberate choice, the same magic number is used here as an increment:

rustic folioBOT
#

For anybody who had this issue like I did and OP did it is caused when you install LuckPerms without Essentials Protect (at least in my case) I fixed it by installing the "optional" Essentials Protect addition to EssenetialsX you can get that here as of time of comment: https://essentialsx.net/downloads.html

in the EssentialsX config under there are settings for specifically Essentials Protect and the default should be good but you want them set to false like this: https://imgur.com/a/cdyd3eL

But why the HELL does LuckPerms just make players randomly invulnerable?

#

But why the HELL does LuckPerms just make players randomly invulnerable?

It doesn't.

Well, then how did the same thing just happen on my server? Me and a friend both suddenly stopped taking damage (or mob aggro, or anything) and lo and behold, we do indeed have invulnerable set to true all of a sudden. There also aren't that many plugins on our server, but LuckPerms is one of them.

Instead of commenting on a year old closed issue. Join our discord and ask for support in the #paper-help channel. I can assure you it's not LuckPerms causing it.

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: dev/1.21.2
rustic folioBOT
#

Expected behavior

The same behaviour prior to the 1.21.3/2 update.

Observed/Actual behavior

The explosionDensityCache is not cleared anymore after the 1.21.3/2 update which causes issues with explosions interacting with entities

Steps/models to reproduce

/fill -17 -55 -72 -17 -55 -70 minecraft:bedrock
# Observe how explosions interact with this entity
/summon minecraft:tnt -16.5 -54.00 -69.5 {fuse:10000}
/setblock -17 -54 -71 glass
/summon minecraft:tnt -16.5 -54.00 -71.5 {fuse:10}
# The entity will not move even though the obstruction has been cleared.
/summon minecraft:tnt -16.5 -54.00 -71.5 {fuse:10}

Plugin and Datapack List

n/a

Paper version

Checking version, please wait...
This server is running Paper version 1.21.3-1-master@f273e6e (2024-10-31T17:32:23Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
You are running the latest version

Other

The optimize-explosions patch was not applied correctly during the 1.21.3/2 update. The li...

#
[PaperMC/Paper] New branch created: enhancement/moonrise-todo
rustic folioBOT
#

Description

(Sry for my Eng)
I am aware of the cause of this problem. I don't believe that the problem could be with these two plugins. Or maybe?

Track

[20:56:14 WARN]: io.netty.channel.unix.Errors$NativeIoException: recvAddress(..) failed: Connection reset by peer
[20:56:14 WARN]: io.netty.channel.StacklessClosedChannelException
[20:56:14 WARN]:        at io.netty.channel.AbstractChannel.close(ChannelPromise)(Unknown Source)
[20:56:14 WARN]: io.netty.channel.StacklessClosedChannelException
[20:56:14 WARN]:        at io.netty.channel.AbstractChannel.close(ChannelPromise)(Unknown Source)
[20:56:14 WARN]: io.netty.channel.StacklessClosedChannelException
[20:56:14 WARN]:        at io.netty.channel.AbstractChannel.close(ChannelPromise)(Unknown Source)
[20:56:14 WARN]: io.netty.channel.StacklessClosedChannelException
[20:56:14 WARN]:        at io.netty.channel.AbstractChannel.close(ChannelPromise)(Unknown Source)
[20:56:14 WARN]: io.netty.channel.StacklessClosedChannelExc...
rustic folioBOT
#
[PaperMC/Paper] branch deleted: enhancement/moonrise-todo
#
[PaperMC/Paper] New branch created: enhancement/moonrise-todo
#
[PaperMC/Paper] New branch created: up
#

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:
97c59261 PR-1073: Make Biome an interface
a38581aa Fix further javadoc errors
8271c490 Fix javadoc error
8a9ecf29 PR-1072: Fix bad naming for Vault State methods 6dd58108 PR-1071: Make Fluid an interface and add missing entry ed2cdfc3 PR-1070: Make Attribute an interface and align names with the new minecraft ones 63472efb PR-1069: Add missing winter drop experimental annotation to pale boats

CraftBukkit Changes:
7235ad7b0 PR-1501: Make Biome an interface
602904003 PR-1500: Rename implementation for Vault State methods 75f26f79f PR-1499: Make Fluid an interface and add missing entry 4cfd87adc PR-1498: Make Attribute an interface and align names with the new minecraft ones 6bb0db5cb SPIGOT-7928: ExactChoice acts as MaterialChoice 3eaf3a13c SPIGOT-7929: Error when setting EquippableComponent ...

rustic folioBOT
#

Expected behavior

If a player is hidden using the https://jd.papermc.io/paper/1.21.3/org/bukkit/entity/Player.html#hidePlayer(org.bukkit.plugin.Plugin,org.bukkit.entity.Player) method does hide players in all commands

Observed/Actual behavior

If a player is hidden using the https://jd.papermc.io/paper/1.21.3/org/bukkit/entity/Player.html#hidePlayer(org.bukkit.plugin.Plugin,org.bukkit.entity.Player) method does not hide players in all commands like in the /team join or /team leave command

Steps/models to reproduce

https://github.com/user-attachments/assets/0a158cc5-84a3-499c-8653-34246f598e14
w

Plugin and Datapack List

Only this plugin coded by myself https://github.com/NikeyV1/NikeySystem.git

Paper version

This server is running Paper version 1.21.1-99-master@1bc02e6 (2024-09-25T02:41:02Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are 32 version(s) behind
Download the new version at: https://papermc.io/downloads/paper

Other

Im trying to m...

rustic folioBOT
#

Tested with exact choice shapeless recipes. As always, there are a few caveats with how these work in relation to the client. If your exact choice recipe doesn't include ingredients with damaged items, enchanted items, or "custom_name" items (NOT item_name), then they should work 100%. If you have ingredients that are damaged, enchanted, or have "custom_name" (displayName) NOT "item_name" (itemName), then the recipe book will show them as uncraftable and multiple clicks on the item won't keep adding 1 "recipe" to the grid, you get one click (or shift click).

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

SmithingTransformRecipe should allow empty ingredients, as it is also described in javadoc.

Observed/Actual behavior

[07:50:51 ERROR]: Error occurred while enabling Cithare v0.20.6 (Is it up to date?)
java.lang.UnsupportedOperationException: Ingredients can't be empty
        at net.minecraft.world.item.crafting.Ingredient.lambda$new$5(Ingredient.java:67) ~[paper-1.21.3.jar:1.21.3-2-7ee4835]
        at com.mojang.datafixers.util.Either$Right.ifRight(Either.java:109) ~[paper-1.21.3.jar:?]
        at net.minecraft.world.item.crafting.Ingredient.<init>(Ingredient.java:65) ~[paper-1.21.3.jar:1.21.3-2-7ee4835]
        at net.minecraft.world.item.crafting.Ingredient.of(Ingredient.java:130) ~[paper-1.21.3.jar:1.21.3-2-7ee4835]
        at net.minecraft.world.item.crafting.Ingredient.of(Ingredient.java:126) ~[paper-1.21.3.jar:1.21.3-2-7ee4835]
        at org.bukkit.craftbukkit.inventory.CraftRecipe.toIngredient(CraftRecipe.java:43) ~[paper-1.21.3.jar:1.21.3-2...
rustic folioBOT
#

Expected behavior

Biome.name() should return the name of the biome.

Observed/Actual behavior

java.lang.IncompatibleClassChangeError: Found interface org.bukkit.block.Biome, but class was expected

Steps/models to reproduce

System.out.println(player.getLocation().getBlock().getBiome().name());

Plugin and Datapack List

none

Paper version

This server is running Paper version 1.21.3-6-master@16d7d73 (2024-11-01T03:40:19Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)

Other

No response

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: enhancement/moonrise-todo
rustic folioBOT
#

Expected behavior

Cancelling InventoryClickEvent shouldn't kick the player and should cancel the event correctly

Observed/Actual behavior

Cancelling InventoryClickEvent shouldn't kicks the player

Steps/models to reproduce

  1. have plugin with following event
    @EventHandler
    public void on(InventoryClickEvent e) {
        e.setCancelled(true);
    }
  1. open inventory
    3.a) try to click any item in the inventory
    3.b) try to take item off a filled bundle

Plugin and Datapack List

only the Test plugin

Paper version

This server is running Paper version 1.21.3-6-master@16d7d73 (2024-11-01T03:40:19Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
You are running the latest version

Other

disconnect-2024-11-01_10.52.10-client.txt

rustic folioBOT
#

Expected behavior

Code

Using EntityDamageByEntityEvent:

            if (attackingPlayer.getAttackCooldown() == 1.0) {
                  damagedPlayer.setFoodLevel(Math.max(damagedPlayer.getFoodLevel() - foodLevelReduction, 0));
            }

Player draws attack cooldown attributed item from a non-attack cooldown attributed item and instantly attacks another player -> player.getAttackCooldown() != 1.0

If player.getAttackCooldown() returns 1.0 at this stage, players can use macros, or manually swap quickly from an item with no attack cooldown attribute to an item with an attack cooldown attribute. This would effectively bypass any usage of player.getAttackCooldown() checks making the method obsolete in most situations.

Expected behaviour is that client attributes and server attributes are synchronous upon swapping and do not result in a desynchronisation between expected attack cooldown values and actual attack cooldown values.

Using this specific example ...

rustic folioBOT
#

Apart from updating to 1.21.3 I also took the liberty to remove some code that has not been necessary since 1.13. Specifically, I mean the implementation of calculateCurrentChanges in RedStoneWireBlock. The method signature alone tells me it's code from 1.12 or older that's been kept and updated, but the only optimization it brings is one that Vanilla itself introduced in 1.13: allowing wires to decrease in power level by more than 1 at a time.

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

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

Bukkit Changes:
fc496179 Fix InstrumentTest
7c0ec598 PR-1075: Make Art an interface
c389f5a4 PR-1074: Make Sound an interface

CraftBukkit Changes:
52b99158a PR-1504: Make Art an interface
e18ae35f1 PR-1502: Make Sound an interface

rustic folioBOT
#

Expected behavior

I expected my command to be executed, but instead, there is no output in the console, and it seems that the command has not been executed. I used this snippet of code inside my plugin class to test the command execution when a player joins.

    Bukkit.getPluginManager().registerEvents(new Listener() {
      @EventHandler
      public void onPlayerJoin(final PlayerJoinEvent event) {
        final Player player = event.getPlayer();
        player.performCommand("say Hello World!");
      }
    }, this);

(As for a different but similar issue, I used Adventure components with text that runs a command when the player presses on it, and there is nothing that happens. I'm not sure if this is the same issue or not)

Observed/Actual behavior

There is nothing sent out into console, with no output sent out to the player. No error is displayed into the console either, and the implementation fails silently.

Steps/models to reproduce

  1. Register a q...
rustic folioBOT
#

We found the problem -_- I was being lied to. One of the players had an optimization pack on the client side. It's Fabulously-Optimized. It breaks secure chat state. Hilariously, it breaks it for everyone, but only when he tries to type. Until he says something, everyone's game functions just fine, but the moment he opens his mouth, everyone gets silenced hahaha. Though, the proxy_protocol on; tip is nice to learn about, thanks! It took such a long time because the culprit got a night job and has been on so sparsely. Thanks everyone!

rustic folioBOT
#

Is your feature request related to a problem?

EntityPlaceEvent is only called for armor stands, boats, minecarts and end crystals
item frames and paintings have its own event (HangingPlaceEvent)
but spawn eggs are not covered by any event

Describe the solution you'd like.

Fire the EntityPlaceEvent for spawn eggs as well

Describe alternatives you've considered.

Intercepting the PlayerInteractEvent

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Trampling should not call the BlockFadeEvent

Observed/Actual behavior

It does call the BlockFadeEvent

Steps/models to reproduce

  1. listen for and cancel the block fade event
  2. trample a farmland block by jumping on it
  3. doesnt work

Plugin and Datapack List

irrelevant

Paper version

[15:42:27 INFO]: Checking version, please wait...
[15:42:27 INFO]: This server is running Paper version 1.21.1-130-ver/1.21.1@4d2672e (2024-10-30T18:33:50Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are 1 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 1.21.1-128-d348cb8 (MC: 1.21.1)

Other

The problem with this is that if you want to prevent natural block fading for farmland but allow trampling, you would have to implement a hacky solution which involves listening for the PlayerInteractEvent to track when a player tramples it
temporarily store that information for that specific block a...

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

Is your feature request related to a problem?

It would be better if you add this feature so we can manage our resources efficiently.

Describe the solution you'd like.

Add an option to automatically pause the server when no players are connected for over 60 seconds. This functionality would save resources, reduce CPU usage, and potentially decrease hosting costs for smaller servers or development environments.

Describe alternatives you've considered.

Using External Scripts or Tools
Iโ€™ve tried using external scripts to monitor player activity and issue a command to pause or shut down the server when itโ€™s empty. However, this approach adds complexity and can lead to resource overhead. Since it operates outside PaperMC, thereโ€™s also a slight delay in detecting when a player joins again, which impacts the experience.

Scheduled Restarts and Downtime
I considered setting up scheduled server restarts or downtimes, especially during late hours when player traffic is lo...

#

There is no real concept of pausing a running process from inside the process, best you could do is maybe reduce how much you spin wait, but, stuff still generally expects to run even when the server is empty. This is generally not worth the sunken cost of trying to implement this properly, IMHO, you're still running an entire JVM with all of the other bits of software like plugins in there which expect to be able to do things.

rustic folioBOT
#

Expected behavior

org.bukkit.entity.Player#loadData() loads the current location, including world info, like it does on the upstream.

Observed/Actual behavior

org.bukkit.entity.Player#loadData() loads the current location without world info, unlike it does on the upstream.

Steps/models to reproduce

Player#loadData() results in Entity#load(CompoundTag) call on that player's ServerPlayer instance, which loads the world info on Paper until 1.20.2 build 272 and on Spigot.

Paper moves the world info loading from Entity#load(CompoundTag) to PlayerList#placeNewPlayer(Connection, ServerPlayer, CommonListenerCookie) since 1.20.2 build 272: https://github.com/PaperMC/Paper/blob/d348cb88a9fe8d19e46102c8b9febe18f746d46b/patches/server/0343-Move-player-to-spawn-point-if-spa...

rustic folioBOT
#

the documentation fell behind mojangs tweaks
@electronicboy, worlds don't have UUIDs on vanilla and are identified by dimension keys, worlds UUIDs are introduced by Spigot (or Bukkit? doesn't matter). So, since Player#loadData() loads world info on Spigot, it should behave the same way on Paper.

I mean, Spigot has indeed brought a lot of weird internal changes to the game, but I don't think this is one of them, and at least in the context of Player#loadData(), the API behavior shouldn't be changed in this way. Because, well, that's an API, and Spigot plugins using it don't expect forks to change it.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Currently LifecycleEvents.TAGS can only be registered inside a plugin bootstrap, even though Minecraft lets you reload tags at any time.
That means the API can't be used by any plugins using the plugin.yml system, and makes it harder to use for any plugins that only have the relevant data post bootstrap.

Describe the solution you'd like.

For LifecycleEvents.TAGS to be available during onEnable, similarly to LifecycleEvents.COMMANDS.
This will technically require an extra Minecraft data reload after plugins enable, but assuming it's possible to make that reload only happen if any plugins actually registered a handler, I don't think that should be too much of a problem? can even make that a configurable thing on the event for plugins that don't change anything immediately & only need a handler for later reloads.

Describe alternatives you've considered.

With Paper plugins it's possible to register a handler in b...

#

These are just events, nothing more, nothing less; forcing an entire data reload as part of the server startup lifecycle just sounds like an entire headache to push forward something Mojang only seemingly provides a loose level of support for data pack devs, it's not a mechanism intended to be used every data on actual running servers, and so, I really can't get behind this.

Part of the reality is that if you want modern features, we're going to need to adapt to how Mojang actually handles this stuff, rather than trying to fight the current to bodge around how their stuff works

#

Maybe just allow plugins to register tags later, but leave the reloading to them? They can just call Bukkit#reloadData. Not really a fan of automatically doing this on startup.

That wouldn't really require much hacking or go against vanilla handling - its similar to adding tag files to a datapack and doing /minecraft:reload, the only change here would be entirely on the Paper side of things.

#

except it's not as simple as that, because there are certain expectations from the game over how this works; reloading data is a bodged mojang mechanism which is not intended for daily use. The game is not designed to deal with people registering stuff later as part of it's normal lifecycle, while you might be able to get away with it in many cases, it's not something that we can make any promises over the fact that it's not going to break when you actually start to utilise it in datapacks, etc

rustic folioBOT
#

Expected behavior

Normal /tp to any player

Observed/Actual behavior

The player is not going anywhere and his entire interior in the house will disappear, all the whole blocks will disappear.
In the chat it said: Chat is disabled in the client settings

Steps/models to reproduce

  1. Start the server with paper
  2. Just write /tp to any players and you will encounter this error.
    (This error is not always, it appears sometimes)

Plugin and Datapack List

AntiRaidFarm, arMarks, ArmorStandEditor, BalancedVillagerTrades, BanAnnouncer, BreweryX, ChatBubbles, Chatty, Chunky, CoreProtect CoreProtectTNT, DecentHolograms, DiscordSRV, ElytraFly, emotecraft, Essentials, GSit, InventoryRollbackPlus, InvSeePlusPlus, ItemEdit LibertyBans, LuckPerms, NormalSpit, packetevents, PL-Hide, Pl3xMap, PlaceholderAPI, PlasmoVoice, PLAZMER-ENGINE, Profiler ProtocolLib, PurpurExtras, pv-addon-broadcast, pv-addon-discs, pv-addon-groups, pv-addon-lavaplayer-lib, pv-addon-priority, pv-addon-scul...

rustic folioBOT
#
[PaperMC/Paper] branch deleted: fix/update-data-convertor
#
[PaperMC/Paper] branch deleted: feature/getEntityTargetPredicate
#

Well, isn't this something that already exists? handlers you register in bootstrap are re-run on reload afaik, so if you have one that registers data in any dynamic way (e.g. from a file or from something that can be updated with commands or whatever) it'll still be tags getting changed via a reload - only difference is that registring via onEnable will require a reload if you want the updates right away, or if the plugin changes nothing initially and only needs to edit them later it'd be the same behavior as bootstrap essentially.

#

Yes, they're re-run on a reload but, the important part is that they're also run as part of the normal bootstrapping process of the server where all of this data is properly defined, nothing you added in here would be reliably utilised by datapacks, and I'm not exactly sure that we should be trying to promise any support for what will essentially be modifying the servers bootstrap lifecycle process

rustic folioBOT
rustic folioBOT
#

Expected behavior

Creating a new typed key and registering it via the registerEventHandler should allow using those keys inside all further postFlatteners of the same type.

Observed/Actual behavior

Using such typed key after registering still throws startup errors on usage, that the key does not exist.

Error: https://pastes.dev/WNd63g7agt

Steps/models to reproduce

Using the following code flow triggers the error for KEY1 on enchantment example.

final var KEY1 = TypedKey.create(RegistryKey.ENCHANTMENT, Key.key("namespace:key1"))

LifecycleEventManager<BootstrapContext> manager = context.getLifecycleManager();
manager.registerEventHandler(RegistryEvents.ENCHANTMENT.freeze().newHandler(event -> 
    event.registry().register(KEY1, builder -> { ... })
)));

manager.registerEventHandler(LifecycleEvents.TAGS.postFlatten(RegistryKey.ENCHANTMENT), event -> {
    final PostFlattenTagRegistrar<Enchantment> registrar = event.registrar();
    registrar.addToTag(En...
rustic folioBOT
#

In my opinion, since the existing API can already completely modify tags compared to the initial datapack load (I.e. the new API, as far as I can understand at least, wouldn't be changing anything on that front) & datapacks themselves can be loaded/unloaded to change tags at runtime, it wouldn't make sense to avoid adding that just because it promotes the already existing behavior (and for datapack integration it would be the same as the commands event, no? register in bootstrap for datapack support, or can use onEnable if you don't need that).
I get where you're coming from though, as I suppose it does promote that usage even if it already exists - if it won't be added as official API, would exposing a "use at your own risk" be possible, if it's basically the same handling internally? something in Unsafe maybe?

#

Is your feature request related to a problem?

no it only for performance maybe

Describe the solution you'd like.

to day i found mod name ("Async Mod") In Fabric
This Mod it say benchmark with 3500 Villager in Intel Core i7-10700

Purpur(Maybe it PaperFork) TPS Is 4.61 & MSPT 150++
but This Mod is TPS 20 & MSPT 40

i want to know it can patch to paper or not It might be more efficient if there is no conflict with the paper.

Thanky You

Describe alternatives you've considered.

It might be useful for large SMP servers.

Other

No response

#

Expected behavior

I expected to launch my server on my ubuntu VM.

Observed/Actual behavior

When I launched my paper.jar file, everything load, without plugins. when the server show "Done". It crash and show this Java error.
It append only with the 1.21.3 version of paper.
I tried on my 1.20.4 server and everything was perfect.
hs_err_pid2218781.log

Steps/models to reproduce

Launch paper on an ubuntu 22.04.4 distrib

Plugin and Datapack List

no datapack, no plugin

Paper version

paper 1.21.3-12
#11561

Other

Good luck and you do an really amazing work thank you

#

We found the problem -_- I was being lied to. One of the players had an optimization pack on the client side. It's Fabulously-Optimized. It breaks secure chat state. Hilariously, it breaks it for everyone, but only when he tries to type. Until he says something, everyone's game functions just fine, but the moment he opens his mouth, everyone gets silenced hahaha. Though, the proxy_protocol on; tip is nice to learn about, thanks! It took such a long time because the culprit got a night job and has been on so sparsely. Thanks everyone!

Hey there, not to necro the thread, but we found this to be the case as well - Thank you!

Now I just wonder what FO is doing to break chat, lol

#

completely modify tags compared to the initial datapack load

except it does so in a manner that is compatible with the semantics of mojangs data loading system, which will allow you to utilise these things inside of datapacks, within the bounds of the proper lifecycle of mojangs initialisation process.

it wouldn't make sense to avoid adding that just because it promotes the already existing behavior

Except it's not existing behaviour, Mojang does not double load on startup, and reload is there as util for messing with packs; it's not intended as something that should be part of every single server startup, there is little interest to have to force data to reload multiple times just so that we can fire the event multiple times so that people can interact with stuff.

and for datapack integration it would be the same as the commands event, no?

Just because the existing lifecycle modifications we've adopted from upstream cause some incompatibilities with mojangs lif...

#

If you're at the level to make an api at your own risk then you may just use MappedRegistry#getOrCreateTag in nms with reflection, basically this

var reg = (MappedRegistry<Block>) BuiltInRegistries.BLOCK;
var tag = reg.getOrCreateTag(TagKey.create(Registries.BLOCK, ResourceLocation.parse("test:test")));
VarHandle entriesVarHandle = MethodHandles.privateLookupIn(
       HolderSet.Named.class,
       MethodHandles.lookup()
).findVarHandle(HolderSet.Named.class, "contents", List.class);
// Content is not final as it's meant to be constantly replaced on each reload, when ServerResourcesReloadedEvent is called
entriesVarHandle.set(tag, List.of(reg.getHolder(ResourceLocation.parse("minecraft:stone")).orElseThrow()));

Same as with just reloading tags, you won't be able to use it in special places like enchantments etc.

It's a bad behavior, with better alternative, not properly supported by minecraft itself and with the potential to not be even supported even b...

#
[PaperMC/Paper] New branch created: fix/attributes-restorefrom