#paper

1 messages ยท Page 16 of 1

rustic folioBOT
#

Expected behavior

Upon clicking on a chat component that allows the player to run a command, the command isn't executed at all. I am using Adventure components to send to the player directly.

Observed/Actual behavior

There is no output to the command because the command does not even run at all. The implementation fails silently.

Steps/models to reproduce

  1. Copy and paste this simple Listener code for a plugin
    Bukkit.getServer().getPluginManager().registerEvents(new Listener() {
      @EventHandler
      public void onPlayerJoin(final PlayerJoinEvent event) {
        event.getPlayer().sendMessage(Component.text("Click to say hi!")
                .clickEvent(ClickEvent.runCommand("say Hello World!")));
      }
    }, this);
  1. Drop the plugin on the server
  2. Join and click on the message
  3. No "Hello World!" sent to the player

(Note: I've also tried ClickEvent.runCommand("/say Hello World!") with the slash at the beginning as well, and that do...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

@Malfrador I just tried with using the list command and gamemode command while being opped with and without slash, and they didn't work for me still for some reason.

Since 1.19.1 Report & Ban Update, Vanilla minecraft has removed the support of any "signed chat" by "clickEvent".
Thus, "gamemode xxx" is considered a chat but not a command like "/gamemode xxx".
If you check your client log file, you may find a message like [Render thread/ERROR]: Not allowed to run command with signed argument from click event: '/say xxx'

from net.minecraft.client.gui.screens.Screen (Mojang map)


else if (clickEvent.getAction() == ClickEvent.Action.RUN_COMMAND) {
	String string = StringUtil.filterText(clickEvent.getValue());
	if (string.startsWith("/")) {
		if (!this.minecraft.player.connection.sendUnsignedCommand(string.substring(1))) {
			LOGGER.error("Not allowed to run command with signed argument from click event: '{}'", string);
		}
	} else {
		...
rustic folioBOT
#

I might be crazy, but when using /gamemode creative for the command while opped, it still doesn't work. There is no error in the server or the client logs. The following is my client log when I connected to my localhost testing server. I am using Fabulously Optimized from Prism Launcher, maybe that's why it doesn't work? I have no idea

[22:51:12] [Render thread/INFO]: Connecting to localhost, 25565
[22:51:15] [Render thread/INFO]: Reloading pipeline on dimension change: minecraft:overworld => minecraft:overworld
[22:51:15] [Render thread/INFO]: Destroying pipeline minecraft:overworld
[22:51:15] [Render thread/INFO]: Creating pipeline for dimension minecraft:overworld
[22:51:16] [Render thread/INFO]: Started 8 worker threads
[22:51:16] [Render thread/INFO]: [CHAT] Click to say hi!
[22:51:16] [Render thread/INFO]: [CHAT] PulseBeat_02 joined the game
[22:51:16] [Render thread/INFO]: Loaded 2 advancements
[22:51:16] [Render thread/INFO]: Stopping worker threads
[22:51:16] [Render ...
rustic folioBOT
#

Expected behavior

It should load properly, just as it does when the server starts up

Observed/Actual behavior

it occurs when the server is reloaded.

Image
https://pastebin.com/cn0DzfES

Steps/models to reproduce

Create an instance of JavaPlugin with PluginBootstrap, but the main class in Plugin meta should not implement Java Plugin.

My case:

1.	Provide the applicationโ€™s main class in paper-plugin.yml.
2.	Instantiate the application and create a dummy JavaPlugin with the application context as a parameter to handle the pluginโ€™s lifecycle.
3.	Everything is OK when the serverโ€™s bootstrap has finished.
4.	Reloading the server causes it to break down.

Plugin and Datapack List

I tested it in a vanilla environment.

Paper version

[16:32:27 INFO]: Checking version, please wait...
[16:32:27 INFO]: This server is running Paper version 1.21.3-12-master@c6aa61e (2024-11-04T17:51...

rustic folioBOT
#

Is your feature request related to a problem?

In many server environments, plugins frequently dispatch commands, either directly or as part of automated tasks. However, without a clear log of these actions, it can be challenging to identify which commands are run, by whom, and when. This lack of transparency complicates debugging and can make it difficult to pinpoint the origin of specific commands, especially when issues arise from unexpected behavior or interactions between plugins.

Additionally, the current dispatchCommand(String) method does not specify which plugin triggered the command, limiting traceability. By logging command executions along with a Plugin parameter, administrators and developers can:

  • Better track command sources โ€“ essential for troubleshooting plugin conflicts or unexpected server behaviors,
  • Enhance security oversight by identifying any unintended command executions, and
  • Improve overall transparency by establishing a clear r...
rustic folioBOT
#

Is your feature request related to a problem?

When "generate-random-seeds-for-all" is set to true, Bedrock will generate using obfuscated random seeds instead of map seeds. Currently, Bedrock positioning can be exploited to crack world seeds, and this is primarily intended to prevent such occurrences, with virtually no impact on gameplay.

Describe the solution you'd like.

Make Bedrock generate using obfuscated random seeds

Describe alternatives you've considered.

null

Other

No response

rustic folioBOT
#

This server is running Paper version 1.21.3-13-master@42a1901 (2024-11-05T09:59:36Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.3-2331-e86a1b6 (MC: 1.21.3)

        at net.minecraft.world.entity.ai.attributes.AttributeInstance.addModifier(AttributeInstance.java:80) ~[paper-1.21.3.jar:1.21.3-13-42a1901]
        at net.minecraft.world.entity.ai.attributes.AttributeInstance.addPermanentModifier(AttributeInstance.java:106) ~[paper-1.21.3.jar:1.21.3-13-42a1901]
        at net.minecraft.world.entity.ai.attributes.AttributeInstance.addPermanentModifiers(AttributeInstance.java:112) ~[paper-1.21.3.jar:1.21.3-13-42a1901]
        at net.minecraft.world.entity.ai.attributes.AttributeMap.lambda$assignPermanentModifiers$7(AttributeMap.java:120) ~[paper-1.21.3.jar:1.21.3-13-42a1901]
        at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap$1.forEach(Object2ObjectOpenHashMap.java:1188) ~[fastutil-8.5.12.jar:?]
        at net...
rustic folioBOT
#

While this is somewhat a breaking change introduced by Mojang. Riding a player has the side-effect of the entity riding no longer being persisted (and thus, being lost).

I'd prefer to have a force parameter (the startRiding already has one iirc) that then can be documented to tell devs that there may be side-effects when setting this to true. However, I'm not sure atm what the current force parameter does and if it could be used. And a second force parameter would be confusing I guess.

Nevertheless, simply allowing the player to be ridden reintroduces a "bug" they fixed. So another way could be a config flag? Probably the most backwards-compatible and server-admin friendly way to allow this.

rustic folioBOT
#

Related to https://github.com/PaperMC/Paper/issues/9928#issuecomment-1806635601
Tl;dr: Paper removed some Craftbukkit mimicry of vanilla spawn logic that was a source of inconsistencies for years.

Personally, Player#loadData is wildly unreliable anyway as it doesn't load a bunch of player data. I haven't looked at what InvSee++ does (and I won't, either, sorry - don't want to be in a situation where I might copy an idea by mistake), but I would suspect that they have to have some NMS internals. Adding a Paper check and parsing the world myself was my solution.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

It should be something like this

abstract class MockitoAgentProvider : CommandLineArgumentProvider {
  @get:InputFiles
  abstract val fileCollection: ConfigurableFileCollection

  override fun asArguments(): Iterable<String> {
    return listOf("..." + fileCollection.files.single().absolutePath)
  }
}
tasks.test {
  val provider = objects.newInstance<MockitoAgentProvider>()
  provider.fileCollection.from(configuration)
  jvmArgumentProviders.add(provider)
}

also should use register instead of create for the Configuration

rustic folioBOT
#

While this is somewhat a breaking change introduced by Mojang. Riding a player (or any other entity that won't be serialized) has the side-effect of the entity riding no longer being persisted (and thus, being lost).

I'd prefer to have a force parameter (the startRiding already has one iirc) that then can be documented to tell devs that there may be side-effects when setting this to true. However, I'm not sure atm what the current force parameter does and if it could be used. And a second force parameter would be confusing I guess.

Nevertheless, simply allowing the player to be ridden reintroduces a "bug" they fixed. So another way could be a config flag? Probably the most backwards-compatible and server-admin friendly way to allow this.

The current force parameter allows overriding the decision if

  1. the entity cannot ride the other one
  2. e.g. there are limitation how many passenger the "vehicle" can have. e.g. Camel => 2
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Can confirm on build 1.21.3-14-master@fcb6c72 (2024-11-06T10:06:32Z), which is the latest at time of writing. Same error (java.lang.IllegalArgumentException: Modifier is already applied on this attribute!)

For me, it only happens for cross-dimension teleports (tested and reproduced for both overworld -> nether and nether -> overworld) and when teleporting from an area with a beacon with at least one active effect.

The player doesn't disconnect immediately. It feels very similar to an internet disconnect, in the sense that you can still walk, but you won't receive any updates from the world or chat. However, if you try to send a chat message, you do get back a response from the server that chat is disabled, and you suddenly start falling through the world. After a while, you'll disconnect with "No response" as the error message.

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

Expected behavior

Using anvil will cause existing items to disappear.

Observed/Actual behavior

When using anvil, existing items will not disappear and will remain as ghost items. (Enchanted Book)

Steps/models to reproduce

Try using the enchanted book with anvil.

Plugin and Datapack List

Server Plugins (0):

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

Paper version

This server is running Paper version 1.21.3-14-master@fcb6c72 (2024-11-06T10:06:32Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
You are running the latest version

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

The fireworks will end

Observed/Actual behavior

When you reach 1-2 fireworks - they become infinite.
Video: https://imgur.com/a/uOawtS9

Steps/models to reproduce

  1. Start a server on Paper
  2. Log in and issue GM 0
  3. Try spending fireworks

Plugin and Datapack List

AntiRaidFarm, arMarks, ArmorStandEditor, AuxProtect, BalancedVillagerTrades, BanAnnouncer, BreweryX, ChatBubbles, Chatty, CoreProtect CoreProtectTNT, DecentHolograms, ElytraFly, Essentials, GSit, InventoryRollbackPlus, InvSeePlusPlus, ItemEdit, LibertyBans, LuckPerms NoEmotecraft, NormalSpit, 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-sculk, pv-addon-spectator, pv-addon-whisper, RPSign, RPTool Sex, SkinsRestorer, Spicord, SuperVanish, TAB, TablePlays, TemporaryWhiteList, Vault, ViaBackwards, ViaVersion WanderingTrades, zv_...

rustic folioBOT
#

Just to add some more context as I'm also experiencing this issue with every teleportation related plugin.
After trying to teleport the player gets stuck in a loading chunk without the ability to send commands/chat messages. I have the same error in my console.

The only way to teleport between worlds is by using the vanilla command /minecraft:execute as @p in minecraft:[world] run minecraft:tp @p ~ ~ ~

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Custom recipe to be selected correctly.

Observed/Actual behavior

If you click on the recipe button you clearly see vanilla items added instead of the renamed Diamond.
This causes the recipe to not be selected correctly, instead the vanilla overlapping recipe gets used.

This happens both on Spigot (even on pre-1.21.3) and on Paper 1.21.3.
Paper 1.21.1 implemented a fix for that which wasn't introduced in 1.21.3.

Steps/models to reproduce

1.21.1

https://github.com/user-attachments/assets/b0cb5ba1-6503-4948-9f03-e8398100ece8

1.21.3

https://github.com/user-attachments/assets/5b3c61d5-236c-447c-8846-6abd77e8a299

Example code to reproduce the issue:

Player player = Bukkit.getPlayer("LoneDev");
org.bukkit.inventory.ShapedRecipe recipe = new org.bukkit.inventory.ShapedRecipe(new NamespacedKey("test", "test_exact_choice"), ne...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

No bow shoot sound heard.

Observed/Actual behavior

Bow shoot sound heard for players shooting both bows and crossbows, piglins shooting crossbows, and pillagers shooting crossbows. No bow shoot sound heard for skeletons and strays shooting bows.

Steps/models to reproduce

Create a handler to cancel the event:

@EventHandler
public void onShoot(EntityShootBowEvent e) {
    e.setCancelled(true);
}

Shoot bow or crossbow, or get mob to shoot.

Plugin and Datapack List

None (tested in isolation)

Paper version

1.21.3-14

Other

No response

rustic folioBOT
#

Expected behavior

The use of Player::resetCooldown resets the cooldown of the attack speed and this shows the attack speed bar

Observed/Actual behavior

The use of Player::resetCooldown resets the cooldown of the the attack speed but the attack speed bar is not shown

Steps/models to reproduce

This is my test (where the log method just print a log in console):

@EventHandler(priority = EventPriority.HIGH)
public void onPlayerItemHeld(PlayerItemHeldEvent event) {
	log("getAttackCooldown: " + event.getPlayer().getAttackCooldown());
	event.getPlayer().resetCooldown();
	log("getAttackCooldown2: " + event.getPlayer().getAttackCooldown());

From the first log I can see the attackCooldown seems to be right and from the second log I can see it just restarted from 0 but on the user interface I cannot see this behaviour

Plugin and Datapack List

[23:12:13 INFO]: Server Plugins (52):
[23:12:13 INFO]: Paper Plugins:
[23:12:13 INFO]: - HuskSync
[23:12:13 INFO]: Bukkit P...

rustic folioBOT
#

canSee performance can be a limitation if you have a lot of otherwise cheap entities (e.g. displays), so generally making improvements here seems sensible to me.

However some benchmarks would be interesting. Did you do any?
The OpenHashMap won't be automatically faster in all cases and just blindly replacing it without proper benchmarking isn't great.

rustic folioBOT
rustic folioBOT
#

However some benchmarks would be interesting. Did you do any?

I did see some non-optimal spark reports with canSee using quite some time of tick and tried to improve it. There may be more room for improvement, but just this small change seems to be a good addition to reduce the time it needs for the containsKey.
I do not feel comfortable sharing the spark reports publicly, but I'll attach some images. Those spark reports may not be 100% comparable, but they are taken on the same server and ig only the player count / player activity should make a difference.

<details>
<summary>HashMap</summary>
<img src="https://github.com/user-attachments/assets/c4acead6-fbac-437c-9af5-3d8af5b490c1"/>
</details>

<details>
<summary>Fastutil OpenHashMap</summary>
<img src="https://github.com/user-attachments/assets/3946edfe-0ed6-4071-95ba-4defd88d8de0"/>
</details>

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

I observe similar behavior, however the problematic frame is different!

https://pastebin.com/9va2pdST

PaperMC 1.21.3-17-6483ecb

java 23.0.1 2024-10-15
Java(TM) SE Runtime Environment (build 23.0.1+11-39)
Java HotSpot(TM) 64-Bit Server VM (build 23.0.1+11-39, mixed mode, sharing)

The server runs on LXC-Turnkey-Gameserver based on Debian 12.7. virtualized by Proxmoxx
Interestingly, on a fresh installation the server starts and does not crash. As soon as either plugins are installed or a client tries to connect to it, the server crashes and and keeps crashing after restarts. Removing plugins does not help. It requires a complete reinstallation of the serverfiles to prevent the fatal error...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Use Java 21, the profiler library version spark uses does not support 23

On Sat, 9 Nov 2024 at 21:29, Bernie @.***> wrote:

I observe similar behavior, however the problematic frame is different!

https://pastebin.com/9va2pdST

PaperMC 1.21.3-17-6483ecb

java 23.0.1 2024-10-15
Java(TM) SE Runtime Environment (build 23.0.1+11-39)
Java HotSpot(TM) 64-Bit Server VM (build 23.0.1+11-39, mixed mode, sharing)

The server runs on LXC-Turnkey-Gameserver based on Debian 12.7.
virtualized by Proxmoxx
Interestingly, on a fresh installation the server starts and does not
crash. As soon as either plugins are installed or a client tries to connect
to it, the server crashes and and keeps crashing after restarts. Removing
plugins does not help. It requires a complete reinstallation of the
serverfiles to prevent the fatal error...

โ€”
Reply to this email directly, view it on GitHub
<https://github.com/PaperMC/Paper/issues/11579#i...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I'm sure this breaks the moment an entity changes its entity id. UUID is persistent, entity id can change, for example when a player respawns

The entity id of a player does not change (in one server session). It is only transmitted to the client in the ClientboundLoginPacket, not in the ClientboundRespawnPacket. The entity id of entities in the world will only change if they are unloaded and then loaded again, but this calls CraftPlayer#onEntityRemove which resets the visibility and is thus irrelevant.

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

Expected behavior

New minecart snapshot/datapack should have minecarts behaving smoothly down slopes at any given speed. Minecart hitboxes should not collide with certain blocks such as the block below a sloped rail

Observed/Actual behavior

Minecart hitbox collides with blocks below sloped rails.
Image
This causes minecart to slow down tremendously, even at default 8/bps speed whenever going down hills.

Steps/models to reproduce

Turn on the experimental minecart features and ride down a hill. Works while in the cart, with cart variants and with an empty cart.

Plugin and Datapack List

Aternos server using bukkit/paper setting. A small achievement datapack is put on the server, but likely affects nothing.

Paper version

This server is running Paper version 1.21.3-25-master@1ef4c0e (2024-11-10T00:30:27Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)

You are running the l...

rustic folioBOT
#

I am the developer of this plugin. I am sorry that this is a private code repository and I cannot provide the code for research, but I can describe the operations performed by this part of the code. After the button is clicked, it just calls the NBT-API to add an nbt tag and then calls the addLore method. The error in addLore appears on the third line of the method, which checks whether the return value of item#hasItemMeta is true, while the first two lines check whether the newly added nbt tag exists and whether the item is empty.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Could you try to create a minimal replicable public code base? E.g. a simple plugin that just, in its onEnable, does what you just described and triggers the error?

I couldn't reproduce this issue in other plugins so I did a breakpoint test.
It shows that when an item calls the addNBT method (calling the NBT-API to add a tag to an item) and then calls item.hasItemMeta, an error will be reported immediately.
Image
Image
Image

#

The error suggests that there is a null key inside of the unhandled tags map of CraftMetaItem, the game doesn't have a raw NBT tag anymore, but, also, this suggests that the library you're using is handling this improperly with mojangs rewriting of items in 1.20.something

The only library used in the plugin to operate NBT is Item-NBT-API. However, by copying the same code into a blank plugin and running it, no errors will occur at all

rustic folioBOT
rustic folioBOT
#

Just so it doesn't get lost:
I've tested this PR and it seems to fix the issue. Damage is behaving correctly again, as it does in Vanila. In my tests, changing damage in the EntityDamageEvent now also works correctly, which also fixes https://github.com/PaperMC/Paper/issues/11480.

Further testing with the build attached to the PR would be welcome though, especially if you have a plugin that changes damage in the EntityDamageEvent/EntityDamageByEntityEvent, to make sure this change doesn't cause unexpected behaviour there.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: fix/getchunkcount
#
[PaperMC/Paper] branch deleted: fix/getchunkcount
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: feat/timings-removal
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

The PlayerArmorChangeEvent should return the old item and the new item.

Observed/Actual behavior

The PlayerArmorChangeEvent returns the old item for both the old item variable and new item variable.

Steps/models to reproduce

  1. Write code that uses the PlayerArmorChangeEvent
  2. Call the event by swapping armor.
  3. Ouput the data for each item

Plugin and Datapack List

A baseline testing plugin with just that function.

Paper version

[09:59:05 INFO]: Checking version, please wait...
[09:59:06 INFO]: This server is running Paper version 1.21.3-DEV-master@661839e (2024-11-13T06:32:18Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-131-84281ce (MC: 1.21.1)

Other

No response

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

Stack trace

https://paste.denizenscript.com/View/128151

Plugin and Datapack List

Citizens: 2.0.35-SNAPSHOT (build 3598), Denizen: 1.3.1-SNAPSHOT (build 7081-DEV), LuckPerms: 5.4.145, Sentinel: 2.9.1-SNAPSHOT (build 525), VoidWorld: 1.0, Depenizen: 2.1.1 (build 865), dDiscordBot: 0.7 (build 303)

Actions to reproduce (if known)

Attempted to generate a trade window with a single trade,
Price: 2x Emerald (single item stack)
Output: Sponge

Initially posted to the Denizen development team, which referred the issue to the Paper team.

To my recollection, last known good was on 1.20.4.

Paper version

[20:02:16] [Render thread/INFO]: [System] [CHAT] Checking version, please wait...
[20:02:17] [Render thread/INFO]: [System] [CHAT] This server is running Paper version 1.21.1-131-ver/1.21.1@84281ce (2024-10-31T17:43:44Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)\nYou are running the latest version\nPrevious version: 1.21.1-89-1ed64f8 (MC: 1.21.1)

Othe...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I'm generally in support of being able to vanilla-ize Paper using configuration, but understand that additional configuration options adds complexity of understanding to server admins, so picking and choosing what patches have config options is worthwhile.

As far as I know, the only thing this would change @PizzaGod873 , is breaking vanilla compatibility with stuff like villager trades for set-seed speedruns, in which case I have to wonder at the wisdom of using Paper in the first place.

But maybe there's some edge-case somewhere where someone would want this...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Following the closing comments on https://github.com/PaperMC/Paper/issues/11615, I guess I'd like to request a builder? to enable trades to be generated.

Describe the solution you'd like.

A means to allow trades to be generated, and set to a trading GUI; see earlier #11615 for additional context.

Describe alternatives you've considered.

Unsure what to put here.

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

The server crashes on start

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000018fdde898, pid=15506, tid=38403
#
# JRE version: OpenJDK Runtime Environment Homebrew (23.0.1) (build 23.0.1)
# Java VM: OpenJDK 64-Bit Server VM Homebrew (23.0.1, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Problematic frame:
# C  [libsystem_platform.dylib+0x6898]  _platform_strcmp$VARIANT$Base+0x8
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/ilyaroslyakov/mine-empty/hs_err_pid15506.log
[28.142s][warning][os] Loading hsdis library failed
#
# If you would like to submit a bug report, please visit:
#   https://github.com/Homebrew/homebrew-core/issues
#


Plugin and Datapack List

no plugins

initial-enabled-packs=vani...

rustic folioBOT
#

Expected behavior

Setting the view range of a text display entity prevents it from being rendered to the client out of range

Observed/Actual behavior

I create a text display entity and then set the view range to 2. However it can be viewed from ANYWHERE

Steps/models to reproduce

  • Create text display
  • Set view range

Plugin and Datapack List

N/A - Same with 0 plugins except my TextDisplay creator

Paper version

This server is running Paper version 1.21.1-131-ver/1.21.1@84281ce (2024-10-31T17:43:44Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-DEV-393582c (MC: 1.21.1)

Other

No response

rustic folioBOT
rustic folioBOT
#

Expected behavior

When trying to load a YamlConfiguration from a file that does not exist, it should somehow tell the user (or dev when deveoping) that the YamlConfiguration did not load correctly.

Observed/Actual behavior

While IOException and InvalidConfigurationException are handled (logged to the console) when trying to load a YamlConfiguration from a nonexistent file, the probably most important FileNotFoundException is not catched in any way visible to the user. Like that, you are not able to know whether your config loaded correctly sometimes. This is just because the catch-block for the FileNotFoundException is empty in the YamlConfiguration class.

Image

Steps/models to reproduce

Just call YamlConfiguration.loadConfiguration() in a plugin of choice and pass a nonexistent file as parameter.

Plugin and Datapack List

Plugin in development process, definit...

#

Your statement makes 0 sense. This code is for developers to call, and this method does not consider a configuration file's lack of existence as a critical failure. It is a pretty typical expected state that a config file might not exist in various states, and it's on you as a developer to deal with this check if it does not conform to your expectations here.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

EntityKnockbackByEntityEvent would be called a single time every time an entity was hit.

Observed/Actual behavior

EntityKnockbackByEntityEvent is called twice if it is triggered by a player who does a sprinting attack.

Steps/models to reproduce

Create a Paper plugin, register an EntityKnockbackByEntity listener and broadcast a debug message every time it runs.

Punch an entity like a mob or an animal without sprinting. It should broadcast the debug message once.

Now punch the entity again while sprinting. It'll now broadcast the debug message twice.

Plugin and Datapack List

knockbackEventTest

Paper version

This server is running Paper version 1.21.3-29-master@be886cf (2024-11-15T09:07:14Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.3-25-1ef4c0e (MC: 1.21.3)

Other

No response

#

Stack trace

[03:06:39 ERROR]: Encountered an unexpected exception
java.lang.ExceptionInInitializerError: null
        at net.minecraft.world.inventory.EnchantmentMenu.lambda$slotsChanged$0(EnchantmentMenu.java:168) ~[paper-1.21.3.jar:1.21.3-29-be886cf]
        at net.minecraft.world.inventory.ContainerLevelAccess.lambda$execute$0(ContainerLevelAccess.java:85) ~[paper-1.21.3.jar:1.21.3-29-be886cf]
        at net.minecraft.world.inventory.ContainerLevelAccess$2.evaluate(ContainerLevelAccess.java:72) ~[paper-1.21.3.jar:1.21.3-29-be886cf]
        at net.minecraft.world.inventory.ContainerLevelAccess.execute(ContainerLevelAccess.java:84) ~[paper-1.21.3.jar:1.21.3-29-be886cf]
        at net.minecraft.world.inventory.EnchantmentMenu.slotsChanged(EnchantmentMenu.java:125) ~[paper-1.21.3.jar:1.21.3-29-be886cf]
        at net.minecraft.world.inventory.EnchantmentMenu$1.setChanged(EnchantmentMenu.java:70) ~[paper-1.21.3.jar:1.21.3-29-be886cf]
        at net.minecraft.world.SimpleConta...
rustic folioBOT
rustic folioBOT
#

Fixs #11623 like Tags enchantments (and pretty sure many other Registry things) can be removed by datapacks and how CrafBukkit (for legacy) expects vanilla ever exists can cause issues...
This PR just make the Vanillla Enchantments can be null in the Bukkit Enchantment class also mention in docs about this (more "easy" than add Nullable to all the static instances of Enchantment with the same issue (or maybe this can be better)

#
[PaperMC/Paper] New branch created: cooldown-event
rustic folioBOT
#
[PaperMC/Paper] New branch created: upstream-update
#

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:
36b11391 Fix copy pasting in UseCooldownComponent

CraftBukkit Changes:
a71a7e1f5 SPIGOT-7957: Fix setTarget method for Breeze
5bc0a094b SPIGOT-7955: Failure teleporting players between worlds using Player#teleport() when player has attribute modifiers
2e09c7a36 SPIGOT-7953: Item cooldown must be greater than 0
8ef9079fa Increase outdated build delay

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

Expected behavior

Saturation effect applied to player for 72000 ticks

Observed/Actual behavior

Saturation effect applied to player for 0 ticks

Steps/models to reproduce

//This one produces an instantaneous effect
player.addPotionEffect(new PotionEffect(PotionEffectType.SATURATION, 72000, 1, false, false, true));
//this produces an hour long duration effect
player.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 72000, 1, false, false, true));

Plugin and Datapack List

CommandAPI, SkinsRestorer
vanilla, file/bukkit, paper

Paper version

Current Purpur Version: 1.21.1-2329-803bf62 (MC: 1.21.1)*

  • You are running the latest version

Other

No response

rustic folioBOT
rustic folioBOT
#

putting my findings here. tested on windows 11 with windows terminal running cmd with corretto 22 and 23.

  • jline-terminal-jansi:3.21.0 (master) is missing keystrokes.
  • exclude("org.fusesource.jansi", "jansi") disables advanced features (but fixed keystrokes)
  • jline-terminal-jansi:3.27.1 is missing keystrokes
  • jline-terminal-jni:3.27.1 is missing keystrokes
  • jline-terminal-ffm:3.27.1 doesn't have advanced features (unless you add --enable-native-access=ALL-UNNAMED, which fixes keystrokes, that flag can also be added to the manifest!)
  • jansi and jni with -Djdk.console=java.base fixes keystrokes
  • jline-terminal-ffm:3.27.1 on 21 disables advanced features

I think ffm is the way forward. its available starting java 22 and the manifest entry allows us to get around java cracking down on undocumented native access. jline readme mentions that the providers are checked in ffm > jni order, so we should be able to just ship both and it will fallback to jni on j...

rustic folioBOT
#

Expected behavior

Creating worlds is very expensive in part because setInitialSpawn() is called which calls findSpawnPosition(), even if we provide the worlds generator with a fixed spawn location, the findspawnposition code is called before the fixed spawn position check

  private static void setInitialSpawn(ServerLevel world, ServerLevelData worldProperties, boolean bonusChest, boolean debugWorld) {
        if (debugWorld) {
            worldProperties.setSpawn(BlockPos.ZERO.above(80), 0.0F);
        } else {
            ServerChunkCache chunkproviderserver = world.getChunkSource();
            ChunkPos chunkcoordintpair = new ChunkPos(chunkproviderserver.randomState().sampler().findSpawnPosition()); // LAG
            // CraftBukkit start
            if (world.generator != null) {
                Random rand = new Random(world.getSeed());
                org.bukkit.Location spawn = world.generator.getFixedSpawnLocation(world.getWorld(), rand); // fixed spawn check
`...
rustic folioBOT
#
[PaperMC/Paper] New branch created: fix/java22-terminal-10405
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Entity move event should be called even with passengers

Observed/Actual behavior

Vehicles can't enter unless steered into the region

Player movement is cancelled, but the mount can freely move

Mobs without passengers can't enter (intended)

Steps/models to reproduce

  1. Cancel player, vehicle and entity movement into a certain region
  2. Try to walk into the region (should and does not work)
  3. Try to push a mob or vehicle into the region (should and does not work)
  4. Steer a vehicle (horse, boat, pig, strider) into the region (glitches out like crazy because player movement is still called for some reason, but the player stays mounted, and the vehicle keeps moving)
  5. Steer a minecart into the re...
rustic folioBOT
rustic folioBOT
#

Expected behavior

Right-Clicking on an Ender Chest to access their inventory should play cause the BlockEntity to play an opening animation and sound.
Closing an Ender Chest inventory should cause the associated BlockEntity to play a closing animation and sound.

Observed/Actual behavior

No Ender Chest animations or sounds play.

Steps/models to reproduce

Interact with an Ender Chest

Plugin and Datapack List

No plugins or datapacks loaded.

Paper version

Paper 1.21.3 Build #36 (and before)

Other

No response

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

There is one concern that removing enchantments will break even in vanilla somewhere down the line, as is the case with many other client synchronized registries making the client crash once it does try to reference individual ones somewhere in game logic

hmm exists a form to check this? i mean the datapack allow make this in vanilla if a issue happen is more a report for the MOJIRA? if they allow make this

rustic folioBOT
#

Expected behavior

Console colors to properly work.

Observed/Actual behavior

No console colors.
Using LuckPerms as an example as I'm sure we're all aware of how it looks with colors on startup:
https://i.imgur.com/4zOacF1.png

Steps/models to reproduce

Use any build that includes the following commit: https://github.com/PaperMC/Paper/commit/d8b66dd93d760fcbbc295bfd9b1abfdf8239f2f5

Use environment:
Paper 1.21.3-44-master@85bfdc0
Windows Server 2022 21H2 (OS Build 20348.2849)
Java 23.0.1 (64-Bit Server VM 23.0.1+11-39)

Startup line currently using:
`-Xms12288M -Xmx12288M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=htt...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

With the deprecation of the bukkit Shearable API, we lost the ability to force regrow wool or mushrooms for sheep and bogged or "un-derp" snow golems

Describe the solution you'd like.

Methods for those entities to regrow their "features"

Describe alternatives you've considered.

Using the deprecated and marked for removal API from Bukkit

Other

No response

rustic folioBOT
#

Is your feature request related to a problem?

When working with the UnknownCommandEvent there is no safe way to detect whether a command failed because of syntax errors or because it doesn't exist, or the sender has no access to it

Describe the solution you'd like.

Adding a method to check whether the command failed to parse or cannot be performed and maybe even the command instance

Describe alternatives you've considered.

Checking if the command exists and whether the sender can perform that command (doesn't work reliably on brigadier commands)

Other

No response

rustic folioBOT
#

Expected behavior

When a ship falls into lava it bugs like this, it is not destroyed by a cactus either

https://youtu.be/pkAEUhC9Gn8

Observed/Actual behavior

When a ship falls into lava it bugs like this, it is not destroyed by a cactus either

Steps/models to reproduce

When a ship falls into lava it bugs like this, it is not destroyed by a cactus either

https://youtu.be/pkAEUhC9Gn8

Plugin and Datapack List

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

Paper version

This server is running Paper version 1.21.1-131-ver/1.21.1@84281ce (2024-10-31T17:43:44Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-130-4d2672e (MC: 1.21.1)

Other

No response

rustic folioBOT
rustic folioBOT
#

Hello @servicomcr, I was unable to reproduce this issue on Paper 1.21.1 Build 131 or the latest version (1.21.3 Build 45). In all cases, whether I was in a boat or a minecart, entering lava instantly broke the vehicle. I tried a similar setup as shown in your video too (falling into lava, driving into lava, etc).

Given the contents of your video I'm going to assume it's most likely being caused by a plugin (which you failed to list), and the best advice I can give is to follow some basic troubleshooting steps on our docs, such as a binary search.

rustic folioBOT
#
[PaperMC/Paper] New branch created: typedkey-is-a-key
rustic folioBOT
rustic folioBOT
#

ok, so I spend a bit of time looking at this. cat is right that we no longer include jansi (as we don't need it).
however jansi changes the detection in adventure. it first tries to look at system properties, then env vars, then jansi. if no jansi is present, it assumes no color. however, jansis detection works similarly, has overrides as system properties and checks env vars, but if that doesn't find stuff, it falls back to 16 colors. so basically, just adding ansi changes the default adventure uses.
just shipping jansi for that seems like unnecessary bloat to me and I will be talked with the other adventure peeps to change the default.

rustic folioBOT
rustic folioBOT
#

Stack trace

`[16:07:37] [ServerMain/INFO]: [bootstrap] Running Java 21 (OpenJDK 64-Bit Server VM 21.0.3+9-LTS; Azul Systems, Inc. Zulu21.34+19-CA) on Linux 6.6.31+rpt-rpi-2712 (aarch64)

[16:07:37] [ServerMain/INFO]: [bootstrap] Loading Paper 1.21.3-46-master@f8e2a67 (2024-11-21T17:43:15Z) for Minecraft 1.21.3

[16:07:37] [ServerMain/INFO]: [PluginInitializerManager] Initializing plugins...

[16:07:38] [ServerMain/INFO]: [PluginInitializerManager] Initialized 2 plugins

[16:07:38] [ServerMain/INFO]: [PluginInitializerManager] Bukkit plugins (2):

  • FeatherMorph (1.4.0.alpha2), ModObserverPlugin (2.0.0)

[16:07:45] [ServerMain/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]

[16:07:51] [ServerMain/INFO]: Loaded 1337 recipes

[16:07:51] [ServerMain/INFO]: Loaded 1448 advancements

[16:07:52] [Server thread/INFO]: Starting minecraft server version 1.21.3

[16:07:52] [Server thread/INFO]: Load...

rustic folioBOT
#

Expected behavior

The ProjectileHitEvent should be called for both block and entity hit results.

Observed/Actual behavior

The event is not called when an arrow (from a bow, crossbow, dispenser, or skeleton) hits an entity.
It is correctly called only when an arrow hits a block.

Steps/models to reproduce

  1. Create a test plugin listening to the ProjectileHitEvent that outputs to console when it is called.
  2. Shoot yourself or another entity (e.g. a cow) with a bow / crossbow.
  3. Observe that the listener did not activate.
  4. (optional) Shoot a block and observe that the listener does activate.

Plugin and Datapack List

Server Plugins (1):
Bukkit Plugins:
- TestPlugin

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

Paper version

This server is running Paper version 1.21.3-46-master@f8e2a67 (2024-11-21T17:43:15Z) (Implementing API version 1.21.3-R0.1-SNAPSHO...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

I have a Brigadier command that has similar functionality to /execute, that is to conditionally run commands based on plugin data. Since moving from using lucko's commodore to using the Lifecycle API to register Brigadier commands, my /execute clone is not able to register anymore when it contains a redirection to the root command node:

[LifecycleEventRunner] Could not run 'commands' lifecycle event handler from PandacubePaper vdev
java.lang.IllegalArgumentException: Unknown command node passed. Don't know how to unwrap this.
at io.papermc.paper.command.brigadier.ApiMirrorRootNode.convertFromPureBrigNode(ApiMirrorRootNode.java:144)~
at io.papermc.paper.command.brigadier.ApiMirrorRootNode.unwrapNode(ApiMirrorRootNode.java:93)~
at io.papermc.paper.command.brigadier.ApiMirrorRootNode.simpleUnwrap(ApiMirrorRootNode.java:249)~
at io.papermc.paper.command.brigadier.ApiMirrorRootNode.convertFromPu...
rustic folioBOT
rustic folioBOT
#

Expected behavior

With the following snippet:

this.getLifecycleManager().registerEventHandler(LifecycleEvents.COMMANDS, event -> {
            event.registrar().register(
                    literal("hide")
                            .executes(this::hide)
                            .then(literal("something-else")
                                    .executes(this::hideSomethingElse)).build());

            event.registrar().register(
                    literal("chat")
                            .then(literal("hide")
                                    .executes(this::chatHide)).build());
        });

One would expect the client to suggest the following commands, and it does:
hide
hide something-else
chat hide

Image
Image
![Image](https://github.com/user-attachments/assets/1742a0a9-c9e6-463f...

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: typedkey-is-a-key
rustic folioBOT
rustic folioBOT
#

Expected behavior

When player riptides using Riptide enchanted trident, PlayerItemDamageEvent should be called (and its cancellation should prevent damaging the item)

Observed/Actual behavior

The PlayerItemDamageEvent is not called when riptiding.

Steps/models to reproduce

  • get yourself Riptide enchanted Trident
  • try to cancel PlayerItemDamageEvent using a plugin
  • the event won't be called and trident will get damage

Plugin and Datapack List

only the test plugin

Paper version

[00:09:43 INFO]: This server is running Paper version 1.21.3-56-master@bb32b05 (2024-11-23T22:23:12Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.3-46-f8e2a67 (MC: 1.21.3)

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Currently, there is only a Player#dropItem(boolean) method to drop the held item of the player, so when dropping an item from the inventory from a player you have to implement the entire drop logic yourself or use nms

Describe the solution you'd like.

A Player#dropItem(ItemStack) method
and maybe even a Player#dropItem(EquipmentSlot) method

Describe alternatives you've considered.

Using NMS or implementing dropping yourself

Other

My best attempt at implementing it myself (basically what vanilla does)

player.getInventory().remove(item);
var location = player.getEyeLocation().clone();
location.setY(location.getY() - 0.30000001192092896D);
player.getWorld().dropItemNaturally(location, item, drop -> {

    var random = ThreadLocalRandom.current();

    var f1 = Mth.sin(player.getPitch() * 0.017453292F);
    var f2 = Mth.cos(player.getPitch() * 0.017453292F);
    var f3 = Mth.sin(player.getYaw() * 0.0174...
rustic folioBOT
#

Is your feature request related to a problem?

Paper I was thinking if u can add a toggle for an internal server auth if online mode is false .Could Please add that amzing Feature

Describe the solution you'd like.

I want a simple auth system like the one that simpleauth plugin provides .

Describe alternatives you've considered.

I never found the feature on any alternative

Other

No response

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

Something else that was brought up internally is the whole "display name" naming being outdated/confusing in general now. effectiveName is good for the new method on ItemStack, but we'd like this to go alongside improving ItemStack#displayName docs and replacing ItemMeta displayName methods with customName (since that's what it returns, but other data components can change or be the effective display name). Replace in this case means marking the old as obsolete and linking to the new

rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: feature/missing-tag-key-constants
#
[PaperMC/Paper] branch deleted: feature/missing-tag-key-constants
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: fix/attributes-restorefrom
rustic folioBOT
rustic folioBOT
#

At least my two cents on this.
Given we cannot expand this to all data driven types (see damage type), I am unsure if pulling such a move is smart for our API as the Enchantment value would be the only one that could be null.

Additionally, removing vanilla enchants is also a rather edge-case imo.
You still have to manually remove from them from everything else so I think the workaround of "remove them from everywhere but the registry" is a fine one to make to preserve the API here.

More opinions obviously needed tho.

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

Stack trace

Hey

[14:07:58 INFO]: esin0 joined the game
[14:07:58 ERROR]: Couldn't place player in world
java.lang.ArrayIndexOutOfBoundsException: Index 35 out of bounds for length 35
        at ca.spottedleaf.moonrise.patches.chunk_system.util.ParallelSearchRadiusIteration.getSearchIteration(ParallelSearchRadiusIteration.java:26) ~[paper-1.21.3.jar:1.21.3-
60-cf956ac]
        at ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader$PlayerChunkLoaderData.update(RegionizedPlayerChunkLoader.java:982) ~[paper-1.21.3.ja
r:1.21.3-60-cf956ac]
        at ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader$PlayerChunkLoaderData.add(RegionizedPlayerChunkLoader.java:891) ~[paper-1.21.3.jar:1
.21.3-60-cf956ac]
        at ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.addPlayer(RegionizedPlayerChunkLoader.java:196) ~[paper-1.21.3.jar:1.21.3-60-cf956ac
]
        at ca.spottedleaf.moonrise.common.util....
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: dependabot/github_actions/dot-github/workflows/dawidd6/action-download-artifact-6
#

Bumps dawidd6/action-download-artifact from 3 to 6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dawidd6/action-download-artifact/releases">dawidd6/action-download-artifact's releases</a>.</em></p>
<blockquote>
<h2>v6</h2>
<p><strong>Full Changelog</strong>: <a href="https://github.com/dawidd6/action-download-artifact/compare/v5...v6">https://github.com/dawidd6/action-download-artifact/compare/v5...v6</a></p>
<h2>v5</h2>
<p><strong>Full Changelog</strong>: <a href="https://github.com/dawidd6/action-download-artifact/compare/v4...v5">https://github.com/dawidd6/action-download-artifact/compare/v4...v5</a></p>
<h2>v4</h2>
<h2>What's Changed</h2>
<ul>
<li><strong>VERSIONING CHANGE</strong>: now there will only be major releases of this action, e.g. v5, v6 and so on</li>
<li>build(deps): bump undici from 5.28.3 to 5.28.4 by <a href="https://github.com/dependabot"><code>@โ€‹dependabot</code>...

#
[PaperMC/Paper] branch deleted: dependabot/github_actions/dot-github/workflows/dawidd6/action-download-artifact-6
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Adds EntityEquipmentChangeEvent, a more generic version of PlayerArmorChangeEvent that applies to the equipment changes of living entities.

At the moment, the patch changes PlayerArmorChangeEvent to extend EntityEquipmentChangeEvent. I'm not sure on this, especially since that would make PlayerArmorChangeEvent no longer extend PlayerEvent.

Another alternative I considered was for the event to instead expose a map of slots -> equipment changes, so that the event is called only once when multiple slots are changed, and avoiding changing the inheritance of PlayerArmorChangeEvent.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Changed this for the following logic:

Neither damage event will be called for non-positive damage.
This 100% preserves old behaviour.
Negative or zero damage is still processed, however no events will be emitted, as this isn't a damage, this would be "repairing" the item.

How and if such a usecase should be represented via the API is up for later discussion, but should not be a blocked for ensuring the existing API maintains backwards compatibility.

rustic folioBOT
rustic folioBOT
#

Fixes #11649 - As noted in the issue, when CommandNodes are serialized they are used as the key in a Map. Their equals()/hashcode() should only match if they are equal nodes (name & command), but due to the erasure of the command field pre-serialization, nodes with different commands can be mapped onto the same value. This causes the client to interpret both nodes as the same, causing suggestions where they should not.

This is fixed by creating a different no-op Command for the erasure, instead of them holding the same lambda.

rustic folioBOT
rustic folioBOT
#

Expected behavior

That it works like what the docs says, and how it worked before 1.21.3

Observed/Actual behavior

It returns inclusive, not exclusive. In a world that has 320 block height, the method returns 319. In 1.21.1 it worked correctly, returning 320.

Steps/models to reproduce

  1. Use world.getMaxHeight()
  2. See that it returns 319 instead of 320

Plugin and Datapack List

Not applicable

Paper version

This server is running SparklyPaper version 1.21.3-DEV-ver/1.21.3@586de79 (2024-11-25T21:05:13Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
Unknown version
Previous version: 1.21.3-DEV-32b3c0c (MC: 1.21.3)

Yeah it is my own fork, but jmp did say that "mojang changed the internal method to be inclusive".

Other

No response

rustic folioBOT
#

Welcome to the joys of open source where if you want something fixed, you either do it yourself or are stuck waiting until people with free time can jump into relatively complex issues

The calculation here relies on attributes, and so I'm going to imagine that either we (being us or upstream) have borked something, or, mojangs got a desync issue here and we'll need to try to manually update the attributes earlier than mojang does usually in order to mitigate this

rustic folioBOT
rustic folioBOT
#

Maybe PlayerTryUseBowWithoutProjectileEvent would be better?

I already thought about using the PlayerReadyArrowEvent for this.
The simplest way to implement the functionality to let a player fire a bow without having an arrow in their inventory seems to be this for me, because when creating a new ItemStack (even with CraftItemStack#asNmsCopy(), to set the arrow from the CraftItemStack used in the event), it would be diffcult to consume the arrow (removing the arrow from the player inventory) when the arrow ist not manipulated by the event.
(get the arrow -> create a craftbukkit copy -> call the event with the arrow -> the arrow is not manipulated -> get the arrow from the event -> create a nms copy -> created a new ItemStack although the original one was not changed -> Player#useAmmo() breaks; or am I missing something?)

rustic folioBOT
rustic folioBOT
#

Hi,

I know that this PR is old but I wanted to clarify something.

Paper uses an LCG random for random block selection during random ticking. Specifically, we take the lower 12 bits of Random#nextInt().

See https://github.com/Tuinity/Moonrise/blob/mc/1.21.3/src/main/java/ca/spottedleaf/moonrise/mixin/random_ticking/ServerLevelMixin.java

If you find an issue with this implementation, you may open an issue on https://github.com/Tuinity/Moonrise.

rustic folioBOT
#

Expected behavior

Player with map in inventory, map isn't changing at all, no packets sent

Observed/Actual behavior

Player with map in inventory, map isn't changing at all, packet constantly being resent

Code analysis:

 if ((true || this.dirtyDecorations) && this.tick++ % 5 == 0) { // CraftBukkit - custom maps don't update this yet // ALWAYS EVALUATED AS TRUE ONCE A SECOND
                this.dirtyDecorations = false;
                // CraftBukkit start
                java.util.Collection<MapDecoration> icons = new java.util.ArrayList<MapDecoration>();

                if (vanillaMaps) addSeenPlayers(icons); // Paper

                for (org.bukkit.map.MapCursor cursor : render.cursors) {
                    if (cursor.isVisible()) {
                        icons.add(new MapDecoration(CraftMapCursor.CraftType.bukkitToMinecraftHolder(cursor.getType()), cursor.getX(), cursor.getY(), cursor.getDirection(), Optional.ofNullable(PaperAdventure.asVanilla(cursor.cap...
rustic folioBOT
#

Expected behavior

Cancelling PlayerReadyArrowEvent for a crossssbow shoud lead to the arroww/firework rocket not beeing loaded into the crossbow.

Observed/Actual behavior

For the player the crossbow seems to be loaded with a projectile. However, relogging or interacting with the player inventory "resets" the item to show it's actually not loaded.

Steps/models to reproduce

@EventHandler
fun preventCrossbowFromShooting(event: PlayerReadyArrowEvent) {
    if (event.bow.type == Material.CROSSBOW) 
        event.isCancelled = true
    }
}

Plugin and Datapack List

Plugins: Only my own plugin
Datapacks: only built-in

Paper version

This server is running Paper version 1.21.3-66-master@afb5b13 (2024-11-27T14:32:35Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Opening a vault would call LootGenerateEvent with the correct loot-table key.

Observed/Actual behavior

LootGenerateEvent is not triggered.

Steps/models to reproduce

  1. Print message to the console when LootGenerateEvent is called.
    @EventHandler(ignoreCancelled = true)
    public void onVaultOpen(final @NotNull LootGenerateEvent event) { 
        System.out.println("LootGenerateEvent was called with loot-table: " + event.getLootTable().getKey());
    }
    
  2. Open a vault.
  3. See that no message is printed to the console.

Plugin and Datapack List

Image

Paper version

This server is running Paper version 1.21.3-67-master@d38624b (2024-11-27T20:28:58Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.3-38-de6173b (MC: 1.21.3)

Other

No response

rustic folioBOT
#
[PaperMC/Paper] New branch created: pool-nonsense
#

Using a LinkedBlockingQueue means you have to set core and max core thread pool size the same, as they will never go above the minimum pool size by just passing them through. So this fixes the async command executor pool to actually use 2 threads, and also cleans up other usage to be explicitly "fixed" thread pool sizes, and splits off one more in Minecraft's Util class

rustic folioBOT
#

This is not the only method affected: ~Chunk#getBlock/getChunkSnapshot are now inclusive~, nvm got confused by what you called exclusive compared to the doc Chunk#getEmptyChunkSnapshot throw an ArrayIndexOutOfBoundsException with your changes (at y = getMaxHeight) instead of the IllegalArgumentException

Looks like I ended up checking only getMaxHeight usages on the API module, not on the server...

Well now this is a bit trickier, I don't know if I should assume that all getMaxHeight on the server are assuming that the value will be inclusive (new docs) or exclusive (old docs).

Wouldn't it be smarter to adjust the docs instead of the method?

Plugins already rely on the behavior of the current docs, I found this issue because my plugin stopped checking for the block at the top of the world due to this, so I dug deeper to find what was causing the issue. Other plugins also have issues due to things change, like mcMMO.

for (y in world.minHeight until wo...
rustic folioBOT
#

Is your feature request related to a problem?

Starting from version 1.21.2, Mojang has created unique entity IDs for each type of boat material. If I want to limit a chunk to save a maximum of 128 boats, it is currently impossible to do so because each type of boat has its own unique entity ID. It is clearly impractical to allocate only a dozen or so quotas for the entity IDs of each type of boat.

Describe the solution you'd like.

Support using "AbstractBoat" to cover all types of boats.

entity-per-chunk-save-limit:
abstractboat: 128

Describe alternatives you've considered.

Combine multiple entity IDs to share a limit on the number of entities๏ผŸ

entity-per-chunk-save-limit:
'oak_boat, spruce_boat, birch_boat, ..., bamboo_chest_raft': 128

Other

No response

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: itemmeta-customname
rustic folioBOT
#

After more internal discussion, this is okay as a temporary solution for those that really need it - can you put this behind an unsupported config option (like allow-default-registry-removal)? and otherwise still throw.

Not 100% sure if the config is actually loaded before the Enchantment class init, so that'd be something you should verify first plz

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: pool-nonsense
rustic folioBOT
#

Expected behavior

Blocks break very quickly, like keeping the attributes of the other item

Observed/Actual behavior

Blocks breaking very quickly

Steps/models to reproduce

The best way to explain this would be via the video that is provided.

https://www.youtube.com/watch?v=ETC3vLmF2-U

Plugin and Datapack List

None

Paper version

This server is running Paper version 1.21.3-74-master@47f2071 (2024-11-29T16:26:16Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
You are running the latest version

Other

No response

rustic folioBOT
#

I can reproduce this issue on the latest development version by just running this code:

@EventHandler
public void lootTableGenerate(LootGenerateEvent event) {
    this.getLogger().info(event.getLootTable().key().asString());
}

Opening a shipwreck chest yields the following log:

[23:35:25 INFO]: [Paper-Test-Plugin] minecraft:chests/shipwreck_supply

But opening a vault does not log anything to the console

#

LootGenerateEvent should not be called for Vaults. The documentation specifically says Called when a LootTable is generated in the world for an InventoryHolder. Vaults don't have inventories and aren't InventoryHolders. What you want is a new event for more general loot table generation events. Something like this. That PR is waiting on the improved LootContext API which is needed to better represent loot table contexts.

#

Poking around in the internals a bit, I found out that opening a vault actually triggers a BlockDispenseLootEvent instead:

@EventHandler
public void blockDispense(BlockDispenseLootEvent event) {
    this.getLogger().info("BlockDispenseLootEvent:");
    event.getDispensedLoot().forEach(item -> {
        this.getLogger().info("  " + item.getAmount() + "x " + item.getType());
    });
}

Opening a vault yields the following output:

[23:47:24 INFO]: [Paper-Test-Plugin] BlockDispenseLootEvent:                                                                                                                                            
[23:47:24 INFO]: [Paper-Test-Plugin]   1x IRON_CHESTPLATE                                                                                                                                               
[23:47:24 INFO]: [Paper-Test-Plugin]   4x IRON_INGOT
[23:47:24 INFO]: [Paper-Test-Plugin]   2x IRON_INGOT
[23:47:24 INFO]: [Paper-Test-Plugin]  ...
#

I can reproduce this on the latest build consistently with this test code:

@EventHandler
public void onPlayerRiptide(PlayerRiptideEvent event) {
    this.getLogger().info("A player just triggered a PRE");
}

Using a riptide trident like normal, I get the following, expected output into the console:

[23:55:37 INFO]: [Paper-Test-Plugin] A player just triggered a PRE
[23:55:41 INFO]: [Paper-Test-Plugin] A player just triggered a PRE

Switching items in the same moment as releasing the right-click on the trident does propel the player, but not trigger the console log.

#

Thank you for clarification. Yes, BlockDispenseLootEvent is a great alternative. Once https://github.com/PaperMC/Paper/pull/11159 is merged it should be easy enough to get the loot-table key.

I can still see something like VaultUnlockEvent being an ultimate solution to that (It could have an advantage of being cancellable) but that's not what this issue was originally about; I will open a discussion about this instead.

#

Looking into this a bit deeper it seems that net.minecraft.world.entity.LivingEntity#releaseUsingItem() has its this.useItem as an empty item when switching, which causes the event to not happen server-side, yet the client probably still thinks that the trident gets used, causing a desync.

[00:12:06 INFO]: [--DebugLogger] releaseUsingItem: item.minecraft.trident
[00:12:06 INFO]: [Paper-Test-Plugin] A player just triggered a PRE
[00:12:14 INFO]: [--DebugLogger] releaseUsingItem: empty
[00:12:19 INFO]: [--DebugLogger] releaseUsingItem: empty

(The two empty releaseUsingItems is when I switched as I released)

#

Is your feature request related to a problem?

Currently, it's quite tricky to listen to (and cancel) vault unlocking without listening to PlayerInteractEvent.

Describe the solution you'd like.

VaultUnlockEvent which would be called when player (successfully) unlocks a vault with a key. This event should be cancellable.

Describe alternatives you've considered.

PlayerInteractEvent is what I'm using currently. While it works, it isn't as reliable as VaultUnlockEvent could be, mainly because logic is based on predictions of whether vault actually unlocked or not.

Other

No response

rustic folioBOT
#

Expected behavior

I'm trying to set a model on an item using the new component API, specifically DataComponentTypes.ITEM_MODEL.

I would expect it to set the component

Observed/Actual behavior

Using the new paper component api for ITEM_MODEL causes the following ClassCastException error to happen instead of setting the component:

[22:46:19 WARN]:        at io.papermc.paper.datacomponent.ComponentAdapter.toVanilla(ComponentAdapter.java:23)
[22:46:19 WARN]:        at org.bukkit.craftbukkit.inventory.CraftItemStack.setDataInternal(CraftItemStack.java:591)
[22:46:19 WARN]:        at org.bukkit.craftbukkit.inventory.CraftItemStack.setData(CraftItemStack.java:579)
[22:46:19 WARN]:        at org.bukkit.inventory.It...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Motive

Based on https://github.com/PaperMC/Paper/issues/11656, developers currently have to either use NMS or copy-paste the already existing NMS implementation. This PR aims to fix that by exposing ways to call that NMS implementation more easily by extending onto the (Human)Player#dropItem method to provide more extensive ways of making the player drop items.

What does it add?

The following overloads to the HumanPlayer#dropItem(...) method have been added:

  • Item dropItem(ItemStack itemStack)
  • Item dropItem(ItemStack itemStack, boolean retainOwnership)
  • Item dropItem(ItemStack itemStack, boolean retainOwnership, boolean throwRandomly)
  • Item dropItem(int slot)
  • Item dropItem(int slot, boolean retainOwnership)
  • Item dropItem(int slot, boolean retainOwnership, boolean throwRandomly)
  • Item dropItem(EquipmentSlot slot)
  • Item dropItem(EquipmentSlot slot, boolean retainOwnership)
  • `Item dropItem(EquipmentSlot slot, boolean retainOwnership, boo...
rustic folioBOT
#

I don't think slot related methods are a good idea having methods for itemstack and equipment slots cover basically all needs

The issue with that is that dropping by ItemStack pretty much always forces the first ItemStack to be dropped. Dropping by slot allows to choose an explicit one, like the one current held, as example

I did not think of that
in that case, it totally makes sense

#

This change replaces the previous approach using ASM with a simpler one only depending on MethodHandles and hidden classes.

The concept is pretty straightforward: We have a template class that contains all the logic. This class is never loaded directly, but its bytecode is used to define hidden classes. Each hidden class gets its own MethodHandle (and the other attributes needed). This way, the attributes can be static, allowing full optimization by the JVM. This is the main difference compared to the previous MethodHandle-based implementations.

The generated classes previously had the additional problem of book-keeping: The classes needed to be loaded by a class loader, and - as plugins can be unloaded - the classes also shouldn't outlive their plugin.
Hidden classes can be unloaded even if their defining class loader is still reachable, so the JVM takes care of that this way.

One difference is that previously one class was loaded per method, even if a method was register...

rustic folioBOT
#

in my tests it worked (1.21.1 and 1.21.3)

When I remove that line, it turns into an dupe glitch ๐Ÿ˜ฅ

https://github.com/user-attachments/assets/86db1db4-a9ba-4c8a-9ac8-1acd7d08951e

@EventHandler
public void onInventoryClick(final InventoryClickEvent event) {
    if (!event.getClickedInventory().equals(event.getWhoClicked().getInventory())) {
        return;
    }

    event.setCancelled(true);
    event.getWhoClicked().dropItem(event.getSlot());
}
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Yeah okay so I made it now that if you pass an incorrect slot in, it throws an IndexOutOfBoundsException, like this:

[20:14:39 ERROR]: Command exception: /drop -1                                                                                                                                                           
java.lang.IndexOutOfBoundsException: Slot -1 out of range for inventory of size 41                                                                                                                      
        at org.bukkit.craftbukkit.entity.CraftHumanEntity.dropItem(CraftHumanEntity.java:839) ~[main/:?]
        at org.bukkit.craftbukkit.entity.CraftHumanEntity.dropItem(CraftHumanEntity.java:832) ~[main/:?]
        at test-plugin-1.0.0-SNAPSHOT.jar/io.papermc.testplugin.TestPlugin.logic(TestPlugin.java:29) ~[test-plugin-1.0.0-SNAPSHOT.jar:?]
        at test-plugin-1.0.0-SNAPSHOT.jar/io.papermc.testplugin.TestPlugin$1.execute(TestPlugin.java:21) ~[test-plugin...
rustic folioBOT
#

Fix terminal color on Windows to close #11637.

There is no %TERM% or %COLORTERM% environment variables set by default on Windows system, also, the %WT_SESSION% variable won't always exist in terminal for some reason on Windows 10+, so the ColorLevel#compute in ansi will return no color for most of circumstances on Windows. But we can assume that terminals on Windows are always support the color and just set the -Dnet.kyori.ansi.colorLevel=truecolor flag.

Tested on Windows Server 2012 R2 / Windows Server 2019 / Windows 10 / Windows 11, and all work fine, the color come back.

rustic folioBOT
rustic folioBOT
#

Expected behavior

When spawning a display entity, delaying for >60 ticks, and then it with a set teleport_duration, the teleportation should work fine with a specific interpolation set.

Observed/Actual behavior

The entity gets slow when it gets to the end of the interpolation

https://github.com/user-attachments/assets/61b9d7b9-7074-444b-8c6f-afb5dd11b710

Steps/models to reproduce

  1. Spawn a display entity
  2. Set the teleportDuration to 59 ticks
  3. Wait 8 ticks (enough that it goes over the 60 tick position sync)
  4. Teleport the display entity
  5. Watch the entity

Plugin and Datapack List

Not applicable

Paper version

This server is running SparklyPaper version 1.21.3-DEV-ver/1.21.3@6921e60 (2024-12-01T03:37:24Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)

(something something it is my own fork and stuff like that, the ServerEntity code is not changed)

Other

This happens due to boolean flag2 = flag1 || this.tickCount % 60 == 0;, b...

rustic folioBOT
#

Is your feature request related to a problem?

Is it possible to modify command /demo and /credits output like changing its text and background ?

Describe the solution you'd like.

Maybe it can be modified by client resource pack

Describe alternatives you've considered.

Let server send custom packet by using plugin, then client use mod to handle those packets.

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Disabeling "Explosion Optimisation" Should disable all Optimisations that impact behaviour.

Observed/Actual behavior

 private float getBlockDensity(Vec3 vec3d, Entity entity) {
        if (!this.level.paperConfig().environment.optimizeExplosions) {
            return this.getSeenFraction(vec3d, entity, this.directMappedBlockCache, this.mutablePos); // Paper - collision optimisations
        }
        CacheKey key = new CacheKey(this, entity.getBoundingBox());
        Float blockDensity = this.level.explosionDensityCache.get(key);
        if (blockDensity == null) {
            blockDensity = this.getSeenFraction(vec3d, entity, this.directMappedBlockCache, this.mutablePos); // Paper - collision optimisations
            this.level.explosionDensityCache.put(key, blockDensity);
        }

        return blockDensity;
    }

Even when disabeling optimizeExplosions, the code uses the getSeenFraction function from PaperMC instead of the getSeenPercent f...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Adds a sanity check to CraftPlayer#closeInventory(InventoryCloseEvent.Reason) that ensures the player is online.

This fixes an edge case which can cause dupes in certain plugins.

Example
https://www.youtube.com/watch?v=OzaV7nUXKxQ -> 2:50

In this specific case the following happens;

Coinflip plugin plays an animation on the player, has a runnable that runs later on the current Player object to close its inventory. Before this task runs the player disconnects and re-joins the server, opens a new gui (crate preview in this case) -> Coinflip plugin calls the closeInventory method on the old player object, crate plugin mistakes that for the current player instance closing their inventory, allowing the current player to take out items of the crate preview gui.

#

I was going to comment and say that I'm somewhat precarious of this due to the risks, especially around existing plugin logic, doing things like closing an inventory before saving its contents in various places

moving this logic to isConnected() looks like it will cause this exception to occur inside of the PlayerQuitEvent, which makes this change 100% untenable

Only problem is that isOnline gets the player based of its UUID which in this case wouldn't solve the underlying issue

#

Well, yea, both checks are flawed; I'm generally not sure that this is on us to solve, either; making API calls suddenly throw exceptions creates more issues than it solves, especially when we're only doing this to mitigate bad practices elsewhere and not an issue inside of the server/API

Could argue that this method should never ever be called on an offline player and therefor the API should probably prevent you from doing that just like how it prevents you from doing certain things asynchronously

rustic folioBOT
#

Well, yea, both checks are flawed; I'm generally not sure that this is on us to solve, either; making API calls suddenly throw exceptions creates more issues than it solves, especially when we're only doing this to mitigate bad practices elsewhere and not an issue inside of the server/API

Could argue that this method should never ever be called on an offline player and therefor the API should probably prevent you from doing that; just like how it prevents you from doing certain things asynchronously

Maybe adding JD to make devs aware that calling the method while the player is offline can cause issues makes more sense. And that they should check if the player is offline/online themself.

rustic folioBOT
#

Expected behavior

BlockState copy = blockState.copy(location);
copy.update(true, true)

This should set the block type and copy over all block entity data like inventories, bee data, etc.

Observed/Actual behavior

Snippet above only properly sets the block type and does not copy over the block entity data. Throws following warning Skipping BlockEntity with id.

Steps/models to reproduce

Run this snippet with any valid input as blockState and location

BlockState copy = blockState.copy(location);
copy.update(true, true)

Plugin and Datapack List

Issue occurs with only the plugin I'm testing with

Server Plugins (1):
Paper Plugins:
BlockEdit

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

Paper version

This server is running Paper version 1.21.3-77-master@1e035f3 (2024-12-01T15:52:35Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)...

rustic folioBOT
#

No you are not missing anything I don't think.
I don't see a nice way to have this interact with player ready arrow event either no.

Naming wise, well, realistically this should probably not be limited to bows only.
It is a general "PlayerFailedProjectileSearch" or something (shitty name but you get the gist :sweat_smile:) as this is going to be called for crossbows as well.

I'll try to get this PR into a pr party next weekend so I can poke some other maintainers on a better name for this, but I think the functionality this is adding is worth having :+1:

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

This may be a Minecraft Bug, not a paper bug, but I can't reproduce it in vanilla.

NOTE: Experimental Feature minecraft:minecart_improvements is active.

Minecarts should power detector rails when rolling over them.

Observed/Actual behavior

Minecarts with org.bukkit.entity.Entity#hasNoPhysics() don't power detector rails, unless an other entity is walking over the rail. Then the detector rail stays powered until the minecart leaves the rail.

Steps/models to reproduce

Create a minecart and assign noPhysics. Let the minecart roll onto one or more detector rails. The rails aren't powered. Walk over the rail (aka through the minecart). The rail will be powered, until the minecart leaves the rail.

Plugin and Datapack List

  • my own plugin
  • Datapack: minecart_improvements (Experimental Feature of Minecraft)

Paper version

1.21.3-80-master

Other

My guess is that NMS method `net.minecraft.world.level.block.state.BlockBehavior#enti...

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

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

Bukkit Changes:
ed0ec489 SPIGOT-7965: Unknown TransformReason for Hoglins 9db03457 SPIGOT-7964: Fix typo in Deprecation annotation d14119af PR-1082: Add "since" to Deprecation annotations e8a318d4 PR-1067: Add method to get Advancement requirements

CraftBukkit Changes:
40dd796db SPIGOT-7971: NotSerializableException on serialize CraftUseCooldownComponent fa85c5e0a SPIGOT-7968: ProjectileHitEvent not trigerred when arrow hits entity b75b792ec SPIGOT-7970: World#getMaxHeight() returning incorrect value 2b9a094bb SPIGOT-7965: Unknown TransformReason for Hoglins fd3f5a380 SPIGOT-7966: Some trees do not generate with #generateTree f2822317c PR-1515: Add a Class reader and Class node argument provider 07abf6852 PR-1514: Add a test case for ClassTraverser a7577cb24 Fix Inventory#addItem not respecting max stack size ...

#
[PaperMC/Paper] branch deleted: upstream-update
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: dev/1.21.4
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
#
[PaperMC/Paper] branch deleted: dev/moonrise-update
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Plugins will send bungee plugin messages, assuming they are behind a proxy which will intercept them, this can cause info leaks if the server for some reason isn't bungee

Describe the solution you'd like.

paper knows whether its behind a proxy, we should discard outgoing bungee plugin messages and perhaps warn to console if they aren't on backend, instead of sending to the players.

Describe alternatives you've considered.

using protocollib to block them?

Other

No response

#

The server won't send plugin messages to an unregistered channel, i.e. the only way those clients would get that info would be if their client specifically asked for it, in which case, you have malicious players.

I don't think that this is our role, maybe we should expose this state in the API to make it easier for plugins, but, this is one of those weird areas where we'd only be masking the issue for a bunch of plugins, it's not really our role to patchwork over security issues from other plugins

#

Not to mention that plugin messaging is a perfectly valid way of communicating with client mods, and there are several plugins out there that do; if a plugin doesn't want to send a payload to the actual client it would be the plugin's responsibiltiy to check whether the server is connected to a proxy before sending the payload, API for that could be added, I don't think that exists right now

rustic folioBOT
#

Is it possible at all to get some rudimentary performance benchmarks here? I assume this new strategy is better, but would love to see. ๐Ÿ™‚

Measuring what's going on in real applications is rather difficult. I micro-benchmarked the changes though, and there this new approach performs better (I'm actually surprised by how much, not sure if there's something wrong with the benchmark). See https://gist.github.com/SirYwell/c8ad6bd2a1cac1f6324f3a65219dffcd (note that the , in the results is a decimal point from my understanding)

#

One difference is that previously one class was loaded per method, even if a method was registered multiple times. Now, each time a method is (re-)registered, a new class will be loaded. I assume that this isn't a problem in real world use-cases and argue that the simplification justifies that.

This was done because there are plugins that will continually un/register handlers which caused issues as those generated classes would pile up and run the JVM out of classspace

#

One difference is that previously one class was loaded per method, even if a method was registered multiple times. Now, each time a method is (re-)registered, a new class will be loaded. I assume that this isn't a problem in real world use-cases and argue that the simplification justifies that.

This was done because there are plugins that will continually un/register handlers which caused issues as those generated classes would pile up and run the JVM out of classspace

If I'm not mistaken this is where the weak relationship that hidden classes have with their classloader would be helpful, the class can be unloaded and forgotten after all refs to it are no longer reachable

rustic folioBOT
#

https://openjdk.org/jeps/371

A hidden class is not created by a class loader and has only a loose connection to the class loader deemed to be its defining loader. We can turn these facts to our advantage by allowing a hidden class to be unloaded even if its notional defining loader cannot be reclaimed by the garbage collector.

So most probably unregistering handlers would automatically allow jvm to deal with unloading the hidden class

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

Its not really Papers responsibility to prevent plugins from doing stupid things. Plugins can themselves check if the server is running behind a proxy or not, and then simply not send such messages.

I can assure you that approximately 0 plugins currently, or ever will do this.

Does not mean it's Paper's responsibility to fix a plugin issue, it isn't really viable without sacrificing the plugins that do intend to communicate with clients. If anything, stable API for checking whether the server is behind a proxy should be added, and the documentation on using plugin messages altered to mention and account for that.

#

Its not really Papers responsibility to prevent plugins from doing stupid things. Plugins can themselves check if the server is running behind a proxy or not, and then simply not send such messages.

I can assure you that approximately 0 plugins currently, or ever will do this.

Does not mean it's Paper's responsibility to fix a plugin issue, it isn't really viable without sacrificing the plugins that do intend to communicate with clients. If anything, stable API for checking whether the server is behind a proxy should be added, and the documentation on using plugin messages altered to mention and account for that.

why would a plugin use bungee channel to communicate with clients? impossible

rustic folioBOT
#

Can we potentially do this ONLY when a display entity is currently interpolating?

It would be possible, but it is a bit more complex...

I thought about an alternative implementation that tracks when was the last teleport + teleport_duration, but that would be way more complex than the current implementation, and, due to circumstances, the entity may not be interpolating on the client when the teleport_duration is set, example: if you set the teleport duration and teleport the entity on the same tick, the teleport_duration would be set but the client would not interpolate it, because you need to force a entity refresh to the client to cause it to interpolate on the same tick.

What I'm doing right now is using packets to create the text display & stuff, so technically this PR is not need, but I do think that an warning should be added to the https://docs.papermc.io/paper/dev/display-entities page because I spent an entire day pulling my hair out, only to find out that t...

#

Is there an MC bug report that explains this?

I couldn't find any reports about this bug report on the tracker, I do know that Mojang seems to know about this issue, which is why they clamp the teleport duration value to 59 (which is below the periodic teleport sync delay of 60 ticks lived) and they did say that they clamp the value because "Please note that this value is clamped to avoid glitches due to periodic position updates", however I think that they don't expect users to keep teleporting the same display entity over and over, thinking that players would actually create new display entities every time they need to teleport them.

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

This pull request introduces a new event to handle changes in the maximum number of player slots on the server. The changes include the addition of a new event class and its integration into the server code.

Event Addition:

  • patches/api/0502-Add-ServerChangeMaxPlayerSlotsEvent.patch: Added a new event class ServerChangeMaxPlayerSlotsEvent to handle changes in the maximum number of player slots. This class includes methods to get and set the old and new maximum player slots, as well as to handle event cancellation.

Server Integration:

#

This pull request introduces a new event to handle changes in the maximum number of player slots on the server. The changes include the addition of a new event class and its integration into the server code.

Event Addition:

  • patches/api/0502-Add-ServerChangeMaxPlayerSlotsEvent.patch: Added a new event class ServerChangeMaxPlayerSlotsEvent to handle changes in the maximum number of player slots. This class includes methods to get and set the old and new maximum player slots, as well as to handle event cancellation.

Server Integration:

#

Yea I am concerned about the event in general.

Regarding a player queue, the max players are only ever updated this way by other plugins.
Given whatever other service needs to be informed here, something would need to actually send that message.
That would mean we'd have a plugin A that does change this number but is not self developed, then plugin B that listens to that event and then notifies the external service about it?

I am unsure of how many plugins I know that change the max player count like this, especially in the context of server networks, where this kind of logic is probably better of at the queue level itself, rather than a server deciding its own max player limit.

#

Well no, I am not saying anything, I was just asking what kind of third party plugins exist that change the max player numbers like this on their own without being prompted to do so. It sounds like a rather destructive way of managing a full server on the plugins part, so I am just curious.
Do you have a specific plugin for this that I can glance at?

I am mostly asking because, as stated prior, we generally are not a fan of events for this as plugins expect their API calls to work.
A third party plugin that for some reason manages the entire servers max player count like this, might not be to pleased when the value is doubled by another plugin instead.

#

https://www.spigotmc.org/resources/changeslots-change-max-players-slots-bukkit-bungee.49648/ - Easy Plugin - Could do this on our own with no issue

This plugin is the main issue we are currently having, resulting in us trying to have this event included. Other than that you could take any gamemode (BedWars, SkyWars, etc.). Some of them change the playercount when the plugin is loaded resulting in the velocity not knowing the max player count anymore.

#

That plugin doesn't even modify the slots in a manner that this event would fire;

It's long been tradition that, outside of some very key explicit areas, events are not fired; if a plugin does something, that operation occurs. I can maybe understand notification-esque events for some of this stuff, but, not fond of aspects like cancellation

You are right. They did some kind of update where they are setting this via reflections for some reason. Nevermind on that plugin then. Doesnt change the fact that other plugins do it via the correct .setMaxPlayers method.

#

Hey @yannicklamprecht, since I see you rebasing this PR all the time: you really don't need to do that for this particular one.
While we do like this API in principle, it opened up a lot of discussion internally and we are not really sure yet on how we want to land it. We do have an idea on how it could look like post hard fork, but for now you don't need to waste time updating it, unless you need it for your own uses of course.
Thanks for sticking with us!

rustic folioBOT
#

Expected behavior

I expect ./gradlew runDev to run successfully.

Observed/Actual behavior

./gradlew runDev

> Configure project :
paperweight-core v1.7.6 (running on 'Linux')

> Task :paper-server:runDevServer
OpenJDK 64-Bit Server VM warning: Option AllowRedefinitionToAddDeleteMethods was deprecated in version 13.0 and will likely be removed in a future release.
[0.019s][warning][cds] This file is not the one used while building the shared archive file: /home/scrayos/.sdkman/candidates/java/21.0.2-jbr/lib/modules
[0.019s][warning][cds] This file is not the one used while building the shared archive file: /home/scrayos/.sdkman/candidates/java/21.0.2-jbr/lib/modules
[0.019s][warning][cds] /home/scrayos/.sdkman/candidates/java/21.0.2-jbr/lib/modules size has changed.
2024-12-05T19:57:00.523304358Z main WARN Advanced terminal features are not available in this environment
[20:57:00 INFO]: [bootstrap] Running Java 21 (OpenJDK 64-Bit Server VM 21.0.2+13-b375.1; JetBrains...
#

Well the reason I am asking so much for a usecase is that, for API we are generally not happy to include due to the mentioned reasons), we'd need a really good usecase to justify that.
If the plugin you were struggling with does not even use this in the first place, it just isn't a very good argument to merge something that breaks the existing API concepts.

As cat stated, a notification-like event should solve your usecase? (e.g. no setters or cancellation)

#

Hey @yannicklamprecht, since I see you rebasing this PR all the time: you really don't need to do that for this particular one. While we do like this API in principle, it opened up a lot of discussion internally and we are not really sure yet on how we want to land it. We do have an idea on how it could look like post hard fork, but for now you don't need to waste time updating it, unless you need it for your own uses of course. Thanks for sticking with us!

  1. It's a no brainer to update the pr.
  2. I need the feature in my own fork and I'm to lazy to workaround the fact that code generation for forks isn't working that easy after a code gen change somewhere this year.
rustic folioBOT
#

Expected behavior

The max-players option should never allow a player count above that limit, unless the last player(s) are excluded from it by being an op.

Observed/Actual behavior

When multiple players join at the same time, they can slip past the max-players limit in server.properties despite not being allowed to.

Steps/models to reproduce

  1. Set up a fresh server and set "max-players" in server.properties to 2. (Note: In my testing I also set "offline-mode" to false since I don't have 3 accounts)
  2. Boot up 3 seperate accounts.
  3. Join with one of them
  4. Now you have to quickly join with the other 2 accounts. To best reproduce this I recommend to use a tool like clumsy and set your ping to 100ms. Alternatively you can try to join with all 3 accounts at once to increase the chance of it happening.
  5. Now there are 3 players on a server with a player limit of 2

Plugin and Datapack List

No plugins or datapack...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Hello would it be possible to add a config option that allows mobs that are immune to effects (undead for poison/regen) and others.

This used to be an option in 1.20.4 im not sure when it was removed exactly but it is not present in 1.21.1.
My server somewhat relied on this config option to allow zombies to have the ability to use regeneration effect. There is no other way of allowing them to have regeneration unless you wanna use reflection/direct nbt

Describe the solution you'd like.

Config option(s) for allowing mobs to use effects they would be immune to in vanilla

i have looked at the nms code and it looks to me all it would require is a conditional(s) for one method to check config option(s)

Describe alternatives you've considered.

im not sure about alternatives, perhaps a method with (nbt) internally that can do this per mob, but that increases the work a bit. im perfectly happy having a config option

Other...

rustic folioBOT
rustic folioBOT
#

Expected behavior

turtle swiming under water

Observed/Actual behavior

spawn turtle under water
a few seconds turlte will die

only on paper server
in singleplayer all good

Steps/models to reproduce

spawn turtle under water
a few seconds turlte will die

Plugin and Datapack List

Server Plugins (93):
Paper Plugins:

FancyHolograms, FancyNpcs, Pl3xMapExtras
Bukkit Plugins:

AdvancedSpyInventory, AmazingTitles, AncientGates, AntiFarm, AuctionHouse, AuraMobs, AuraSkills, AxGraves, AxShulkers, B_s_Hookah
BattleTraining, BetterBeacons, BetterFish, BetterStructures, BossBarHealth, BottledExp, BreweryX, BulletinBoard, ChatItem, ChestShop
ChestSort, ChunkSpawnerLimiter, Chunky, CMILib, *CommandSync, ConditionalEvents, CoreProtect, CustomAnvil, DebugStickPro, DiscordSRV
Disenchantment, ElderGuardianBoss, EliteMobs, EnderDragon, Essentials, EssentialsChat, EssentialsDiscord, EssentialsDiscordLink, EssentialsSpawn, EvenMoreFish
ExcellentEnchants, FreedomChat, FreeMinecra...

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: itemmeta-customname
rustic folioBOT
rustic folioBOT
#

Stack trace

[02:10:01] [Paper Watchdog Thread/INFO]: Stopping server
[02:10:47] [User Authenticator #3/INFO]: UUID of player Rommel_Erwin is 0577119f-f441-456a-b695-af3b8309ea21
[02:11:27] [User Authenticator #3/INFO]: UUID of player Rommel_Erwin is 0577119f-f441-456a-b695-af3b8309ea21
[02:13:10] [User Authenticator #4/INFO]: UUID of player Rommel_Erwin is 0577119f-f441-456a-b695-af3b8309ea21
[02:13:39] [Paper Watchdog Thread/INFO]: [Geyser-Spigot] Disabling Geyser-Spigot v2.5.1-SNAPSHOT
[02:13:39] [Paper Watchdog Thread/INFO]: [Geyser-Spigot] Shutting down Geyser.
[02:13:39] [Paper Watchdog Thread/INFO]: [Geyser-Spigot] Geyser shutdown successfully.
[02:13:39] [Paper Watchdog Thread/INFO]: [Cigarette] Disabling Cigarette v2.0.5
[02:13:39] [WebSocketConnectReadThread-296/INFO]: [Geyser-Spigot] The skin uploader has been closed
[02:13:39] [Paper Watchdog Thread/INFO]: [InstantRestock] Disabling InstantRestock v2.4.6
[02:13:39] [Paper Watchdog Thread/INFO]: [SimpleSit] Disabling ...

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

For it to be more properly integrated, this PR will need to be redone with all the new registry-related APIs.
Additionally, Mojang has redone its brain system's format to be significantly different than what this API proposes.

I am closing this as in general this will need to be rewritten, and don't have the time for that atm.

#

Is your feature request related to a problem?

Upstream's TrialSpawnerConfiguration is poorly designed and thought out. It should be a registry-related type that is immutable. The current design makes it impossible to store a registered config without serializing the whole thing to the trial spawner instead of just the reference key.

Describe the solution you'd like.

We should just deprecate that type and associated API for a new immutable type with registry entry builders for modification.

Describe alternatives you've considered.

N/A

Other

No response

#

How is it more complex? Imo, what I would do is expose the posRotInterpolationTarget on Display. check if its != null (meaning they are interpolating), and then don't resync the position.

On the server the posRotInterpolationTarget is always null. The only code that sets it is the Display lerpTo function (which is not called on the server), and the code that ticks the posRotInterpolationTarget is behind a if (this.level().isClientSide) { clause.

However I think it wouldn't be hard to make the server call those functions tho... But here's another issue:

Another issue is that this:

display.setTeleportDuration(59)
display.teleport(...)

Does NOT work as how you would expect. What I expected is that the display entity will teleport to the destination over 59 ticks. In reality the entity is teleported before the entity is updated on the client, so the display entity will teleport directly to the new location without any easing.

And how would...

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: feature/reg-mod-copy-from
#
@Override
public void bootstrap(@NotNull BootstrapContext context) {
    // io.papermc.testplugin.brigtests.Registration.registerViaBootstrap(context);

    final TypedKey<Enchantment> NEW = EnchantmentKeys.create(Key.key("mm:test"));
    context.getLifecycleManager().registerEventHandler(RegistryEvents.ENCHANTMENT.freeze(), event -> {
        event.registry().register(NEW, EnchantmentKeys.POWER, builder -> {
            builder.maxLevel(10);
            builder.description(text("MOARR POWER"));
        });
    });

    context.getLifecycleManager().registerEventHandler(LifecycleEvents.TAGS.preFlatten(RegistryKey.ENCHANTMENT), event -> {
        final PreFlattenTagRegistrar<Enchantment> registrar = event.registrar();
        registrar.addToTag(EnchantmentTagKeys.IN_ENCHANTING_TABLE, List.of(TagEntry.valueEntry(NEW)));
    });
}
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: is-tick-sleeping-api
rustic folioBOT
#

Expected behavior

Backups of a paper server are being done successfully.

Observed/Actual behavior

I recently realized (thankfully before any real data loss could occur) that all of the backups I create of my worlds via the Essentials/EssentialsX plugin "backup" function - which just executes a user defined script - results in maps that are incomplete or otherwise corrupted.

Here is an example of one such backup opened inside MCA Selector:
Image
Notice how a good part of the chunks - those that actually have the most player activity - are missing entirely. If I open this world it will just regenerate those chunks as if nothing was there. Notice also how it seems to corrupt(?) the save at a region level, not chuck, as represented by MCA.

The only (unrelated) mention to Essentials that I could find here was this apparently unrelated issue so...

rustic folioBOT
#

Paper does not do blocking IO to write chunk/region data to the disk, it relies upon the host to deal with this aspect as it needs to, this does have some caveats. Windows is also generally a huge caveat here, many backup tools are written with the behavioral expectation of linux which doesn't have as much aggressive file locking mechanisms, and deals with non-blocking IO in a much more reliable manner.

You can reenable the blocking IO by setting -DPaper.enable-sync-chunk-writes=true in your startup flags, may require some quotes on that to mitigate windows oddball command processing. outside of that, live backups are generally not something that is entirely supported, while it does work with some degree of reliability with the correct setup/environment, you are always running on the line of unsupported behavior.

#

You can reenable the blocking IO

How would this help here? Wouldn't it prevent any kind of backup at all then?

live backups are generally not something that is entirely supported, [...] while it does work with some degree of reliability with the correct setup/environment

Can you give me some pointers about what this would entail? I would imagine I'm not the only paper server owner on windows that wants to do backups while the server is running. There are also plugins that supposedly do this in a more involved manner like this - whould this work better/at all with paper?