#paper

1 messages ยท Page 4 of 1

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

There is a linked pull request which restores the patch for this, feel free
to test it; I'm inclined to pull it soon however, I don't wanna hit the
merge button and not be around for any issues as in currently having health
issues

On Wed, 1 Nov 2023, 00:16 StKillReal, @.***> wrote:

So, month has passed, still waiting๐Ÿค”

โ€”
Reply to this email directly, view it on GitHub
https://github.com/PaperMC/Paper/issues/9794#issuecomment-1788206667,
or unsubscribe
<http...

rustic folioBOT
rustic folioBOT
#

Well, using "initialize' for that event might be confusing seeing as the map loading by the server on startup is called that too and describes a completely different behaviour.

"Create" sounds correct for me as a new map (as in the MapView, not as in an ItemStack with the kinda arbitrary type "map") is created on the server. Don't see it getting confused with crafting either, seeing as it would just use "CraftEvent" like the others if that was what the event refers too.

rustic folioBOT
#

Expected behavior

I am using latest build #260.
zombie-villager-infection-chance should be working but it is not

Observed/Actual behavior

I have zombie-villager-infection-chance set to 10.0 but it is not working, villagers get infected 100% of a time (hard difficulty).
Before I updated the server from 1.20.1 it worked correctly.

Steps/models to reproduce

set zombie-villager-infection-chance to 10.0
Spawn a villager and a zombie.
The villager always gets infected instead o...

rustic folioBOT
#

resolves #9260
decided to deprecate the spigot method since it doesn't check if the player is gliding while papers already does that check for you.
spigots method name is also kinda misleading since you could think it also gives you some kind of a boost on the ground. i mean they state in jdocs that its only going to work if the player is using the elytra but meh.

rustic folioBOT
#

Welcome to paper :wave: thank you for your first PR!

I am a tad unsure if your current implementation does actually fix the related issue.
Right now, this mostly looks like an event that is pretty much just a duplicate of the PlayerInteractEvent.

If I interpret the issue correctly, the event should be called when the player is basically done brushing the block instead of the start of the brushing process.

#

Welcome to paper ๐Ÿ‘‹ thank you for your first PR!

Thanks, but this isn't my first PR, have some old ones I have to clean up some day

If I interpret the issue correctly, the event should be called when the player is basically done brushing the block instead of the start of the brushing process.

Yeah, my bad, sorry, the event will no longer be cancel-able though, however, then, I can expose the dropped itemstack

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I think it can be even better. Can't we first check if the translation key exists in adventure's global translator? If it doesn't, do we need to bother running it through adventure's renderer? Maybe @kashike can weigh in on this if I'm missing some functionality of adventure's translation system.

I'm not sure this is possible. The adventure Translator interface accepts TranslatableComponents or translation keys, but doesn't provide API for listing registered translation keys. A `Transl...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Now its hardcoded to 15 seconds, please add configuration to change it

As addition also provide configuration for the ability to change the coefficient of the arithmetic mean:

Describe the solution you'd like.

Configuration for KeepAlive interval (and/or coefficient of the arithmetic mean) for via System properties or paper config

Describe alternatives you've considered.

Fork paper and changes by myself

Other

_No re...

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

Expected behavior

Smooth gameplay over the LAN.

Observed/Actual behavior

On paper-1.20.1-196, I experience intermittent freezes (1-2 per hour), lasting for 5-10 seconds each.

Steps/models to reproduce

Running with 3 players over a gigabit LAN, on a quad-core Xeon with 16GB of RAM. Did not experience this nearly as often with paper-1.20.1-176.

Plugin and Datapack List

No plugins or datapacks.

Paper version

paper-1.20.1-196

Other

No response

rustic folioBOT
#

Adding a config option for something that can very easily completely break client connections completely and that potentially will have some conflicts with vanilla changes in the future just to fix a 15 second visual issue seems a bit much to me. The client relies on a certain order of things happening on login, allowing for changes here seems dangerous.

Additionally the ping on login will be very unreliable due to the large amount of data sent anyways.
Unless there is something else this...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

The issue wasn't the extra keepalive packets, the issue was generally the keepalive packets would end up on the tail end of the flood of packets from login + initial chunks, which the client would effectively stall out

The configuration phase and the chunk limiting stuff in paper (and now vanilla) should mostly aleviate the need for my patches to revert back keepalive behavior, it was just generally a sense of "we're not kicking clients during login all the time for this now so imma no tou...

rustic folioBOT
#

Expected behavior

Client brand packets should contain their brand.

Observed/Actual behavior

After recently updating paper, it seems like somehow brand packets are deserialized wrongly to have unknown brand payloads instead of net.minecraft.network.protocol.common.custom.BrandPayload, the result is that the .data() is an empty string instead of the client brand.

Steps/models to reproduce

Listen for payload packets

Plugin and Datapack List

Protocollib (for listening to th...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Hi,

When typing /help [any command], I do not get any kind of helpful usage summary. It seems like all usage information is missing or the help message is truncated. An example:

[12:10:28 INFO]: --------- Help: /whitelist ----------------------
[12:10:28 INFO]: Description: A Mojang provided command.
[12:10:28 INFO]: Usage: whitelist

In the official server one could get something useful out, though it is not prettily forma...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

This is basically intended behavior in a sense, craftbukkit replaces the entire help system built into vanilla, which made a lot more sense when they also modified the command itself as they could also add the missing syntax information in a more traditional manner. outside of stripping that out, this is probably a "won't fix/WAI"

rustic folioBOT
#

In all the cases where the launch projectile event is fired... shouldn't we uncomment the user.awardStat(Stats.ITEM_USED.get(this)); line at the bottom and remove the one wee add? It still would be correct and less vanilla diff. The only thing we would need to handle above was the itemstack shrink. You could also just leave that at the bottom if you added a new boolean at the top that determined if the stack should shrink. I think that is cleaner.

Also, for EggItem specifically, we can...

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

Expected behavior

Returns the nearest stronghold based on player's location.

Observed/Actual behavior

Returned the same stronghold when I'm anywhere.

No useful log in console.

I tested vanilla server with the same world, everything works fine.

Steps/models to reproduce

I discovered this problem when I updated my server from 1.20 to 1.20.1.

At the same time, the Residence plugin cannot find the location when I create a new residence. https://github.com/Zrips/Re...

rustic folioBOT
rustic folioBOT
#

Expected behavior

No errors.

Observed/Actual behavior

Errors in console - and general issues with NPCs.

Steps/models to reproduce

I will go over this in the "other" section.

Plugin and Datapack List

Plugins

[15:55:27 INFO]: Server Plugins (1):
[15:55:27 INFO]: Bukkit Plugins:
[15:55:27 INFO]: - Citizens

Datapacks

[15:55:01 INFO]: There are 2 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)]
[15:55:01 INFO]: There are no more data pac...

#

Comments on commits are probably the worst place to put any form of feedback, please refrain from doing so in the future.
Crash reports are obviously expensive as they have to collect a lot of system data for a potential analysis of a crash.
They should not happen in the first place.

Please either open an issue or, preferably, take this to our discord if you have any more feedback.

rustic folioBOT
#
[PaperMC/Paper] New branch created: improve-sysoutcatcher
rustic folioBOT
rustic folioBOT
#

Stack trace

[21:23:42] [Yggdrasil Key Fetcher/ERROR]: Failed to request yggdrasil public key
com.mojang.authlib.exceptions.MinecraftClientException: Failed to read from https://api.minecraftservices.com/publickeys due to Connection reset by peer
        at com.mojang.authlib.minecraft.client.MinecraftClient.readInputStream(MinecraftClient.java:108) ~[authlib-5.0.47.jar:?]
        at com.mojang.authlib.minecraft.client.MinecraftClient.get(MinecraftClient.java:57) ~[authlib-5.0.47....
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

When bundles have items inside them, and you right click drag to empty the bundle, after dragging your cursor away from the slot that was right clicked and then releasing RMB, the newest item added to the bundle's inventory will be placed. This is the behaviour using the vanilla Minecraft Server Jar.

Observed/Actual behavior

Holding right click and dragging your cursor while emptying a bundle causes the bundle itself to be dropped into a slot.
This makes emptying...

rustic folioBOT
rustic folioBOT
#

I seem to have the same problem with vehicles (invisible armorstands) they bugg when despawned in unloaded chunks and using this would be a nice way to always despawn vehicles in unloaded chunks which also helps on restarts and to just spawn then back on chunkload event (if player or admin didn't despawn the vehicle in the meantime but since this method also doesn't work I am running a little out of options

rustic folioBOT
rustic folioBOT
#

The key problem here is that there's no way to place command blocks and other gamemaster blocks without being fully opped. Right now my jank workaround is to listen for interact events, get all the block state data from the held item, and place a command block approximately where you clicked. This could all be saved if there was a way to place command blocks and gamemaster blocks without OP!

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

No errors will be reported and the correct value will be returned

Observed/Actual behavior

`java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.World.n()" because "this.o" is null
at net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity.unpackLootTable(RandomizableContainerBlockEntity.java:73) ~[?:?]
at net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity.isEmpty(RandomizableContainerBlock...

rustic folioBOT
#

Expected behavior

Cancel EntityShootBowEvent or PlayerReadyArrowEvent, the number of arrows in the player's inventory will not be reduced

Observed/Actual behavior

The number of arrows will decrease until you click on the arrow in the inventory to synchronize

Steps/models to reproduce

    @EventHandler
    public void onEntityShootBow(final @NotNull EntityShootBowEvent e) {
        e.setCancelled(true); // or e.setConsumeItem(false);
    }
    @EventHandler
...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Since it seems unclear in this PR, has tripwire duping been patched? If so, is there a configuration option to opt into allowing it as discussed in #9542?

I can't seem to find in the docs, so I'm guessing this PR was abandoned and superseded by something else perhaps (since certain users report being unable to make use of this duplication glitch even though this PR might not have been merged).`allow-shears...

rustic folioBOT
rustic folioBOT
#

This is wrong the method works as intended. However the upper bound is now limited by the max_absorption attribute. So you have first to increase this limit (set to 0 by default) to behave like before. But you still need to update the absorption hearts like you do after that. I guess for compatibility this method could either set the attribute before or ignore that limit but this is a feature.

rustic folioBOT
#

The event is fired incorrectly. The chunk system changes the chunk status incrementally, and carefully handles concurrent requests to lower it. It is possible that the overall result of the operation is to lower the status, even if initially it was requested to be higher. You can see this by how the function updateCurrentState works.

You should look more carefully at the operations done in each status change to determine where to place the event. In general this area of code is the worst...

#

The event is fired incorrectly. The chunk system changes the chunk status incrementally, and carefully handles concurrent requests to lower it. It is possible that the overall result of the operation is to lower the status, even if initially it was requested to be higher. You can see this by how the function updateCurrentState works.

You should look more carefully at the operations done in each status change to determine where to place the event. In general this area of code is the...

rustic folioBOT
#

I agree with @Lulu13022002 here. The method absolutely is still useful, but something is needed to address the max absorption attribute. The best thing to do probably depends on what happens if you override the max and just call that internalSetAbsorptionAmount method on both entities and Players. If there is some use to it, then perhaps another method with a boolean override. But I don't think the default behavior should be to override the attribute.

rustic folioBOT
rustic folioBOT
#

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

Bukkit Changes:
fde5602a PR-927: Add PlayerRecipeBookSettingsChangeEvent
949ff217 PR-930: Add methods to get/set evoker fang attack delay
f6f7c79d SPIGOT-7514, PR-929: Add "Enchantment Roll" API to enchant items according to Minecraft mechanics
d40e22da PR-712: Add API to get full result of crafting items

CraftBukkit ...

rustic folioBOT
#

Stack trace

https://paste.gg/p/anonymous/22ef4f7a69cb4276a77dd4aa569f5420

Plugin and Datapack List

no

Actions to reproduce (if known)

  1. use a unix address in the server-ip setting in server.properties such as unix:/tmp/paper-server.sock
  2. enable velocity/bungeecord in various configs
  3. patch velocity/bungeecord to allow for proper unix address support between the server and the proxy
  4. add the server's unix address to the proxy's server list
  5. start both the server...
rustic folioBOT
rustic folioBOT
#

Presumably fixed by #9086

From what I can see it only seems to address the issue in the login process and exposing the SocketAddress in the login events, I can't test the PR right now but I presume pinging is still broken.

There's still the issue with the NetworkClient.getAddress() v Player.getAddress() contract break but that is a separate topic from that PR.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

[14:02:22] [Server thread/INFO]: [STDOUT] [net.minecraft.CrashReport] Negative index in crash report handler (0/18)
[14:02:22] [Server thread/ERROR]: Failed to handle packet net.minecraft.network.protocol.game.PacketPlayInWindowClick@49b02578, suppressing error
net.minecraft.ReportedException: Container click
	at net.minecraft.world.inventory.AbstractContainerMenu.clicked(AbstractContainerMenu.java:398) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListener...
rustic folioBOT
#

Expected behavior

Increased speed while crouching with boots enchanted with Swift Sneak

Observed/Actual behavior

No speed increase compared to no enchantment

Steps/models to reproduce

Load paper server 1.20.2 on latest release as of time of posting (only tested this version)
Enchant boots with Swift Sneak enchantment using either anvil or /enchant command

Plugin and Datapack List

None

Paper version

This server is running Paper version git-Paper-280 (MC: 1.20.2)...

rustic folioBOT
#

Expected behavior

Players will spawn at the location where they last logged off

Observed/Actual behavior

The player will spawn in the overworld, regardless of the world he was in before last offline

Steps/models to reproduce

1ใ€Player A goes to the Nether
2ใ€Player A leaves the server
3ใ€Player B uses the command /openinv A (Requires op permissions)
4ใ€Player B closes the open GUI
5ใ€Player A enters the server, will spawn in the overworld instead of the Nether

Plugin an...

#

Plugins accessing internals is not supported, this is likely a side-effect of:

https://github.com/PaperMC/paper/commit/0cdce89d595a2c1c097c9e2a5ff96687977b3b25#diff-4cc9c08ffbbd0cd3194f84ba2456907e9a75b260a4e0a532a2762c762512b4edR93

basically, removing some legacy code from upstream which has been a fun source of problems for a few years now, issue is that they're not loading player data onto the player entity fully, and so, as a result, the world is being reset as they're not triggeri...

rustic folioBOT
rustic folioBOT
#

Expected behavior

When a command block is powered by a redstone signal with either of the following commands, it should send of whisper message to the nearby player.
Commands used :
/tell @p TEST or /execute at @p run msg @p Test

Player get a whisper message from the server.

Observed/Actual behavior

When a command block is powered by a redstone signal with either of the following commands, it failed.
/tell @p TEST
/execute at @p run msg @p Test

`[14:11:30 ERROR]: Thread ...

rustic folioBOT
rustic folioBOT
#

Stack trace

https://paste.gg/

Plugin and Datapack List

Chunky
CoreProtect
EasyArmorStands
FastAsyncWorldEdit-Bukkit
Geyser-Spigot
GSit-1.5.3
InvSee++
InvSee++_Give
LibsDisguises
Nova-0.14.10.
PaperTweaks
ProtocolLib
Skript
Stargate
ViaBackwards
ViaRewind
ViaVersion
WorldEditSUI

Actions to reproduce (if known)

No response

Paper version

Paper version git-Paper-280 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT)

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

The BlockDropItemEvent fires before the block is changed into its final state after being fully brushed. This gives you full control over what the block drops.

This doesn't solve your issue about cancelling the blockstate changing tho. That can be fixed by adding an EntityChangeBlockEvent right before that happens which you can cancel.

#

I do not think this event is needed at all. You can accomplish the same things by listening to the BlockDropItemEvent which, contrary to the linked issue, is fired before the block is changed allowing you to change the dropped items.

You can then just add a call to the EntityChangeBlockEvent before the blockstate is changed when the brushing is completed which you can cancel to prevent the brushable block from changing.

rustic folioBOT
rustic folioBOT
#

We might be able to use a com.google.common.collect.ForwardingCollection collecting in combination with a
com.google.common.base.Suppliers.memoize() to only compute the collection of players when a plugin actually needs it during the event.

So e.g. (pseudo code)

Supplier<Collection<Player>> lazyActivatingPlayersSup = Suppliers.memo(() -> transfor(worlds.getNearby.....));
Collection<Player> activatingPlayers = new FowardingCollection() {
  delegate() {  return lazySup.get()  }...
rustic folioBOT
#

Expected behavior

When players first join on my server they are facing the wrong direction. They are in the right location, but facing the wrong direction. I have set the world spawn location including the direction every possible way, using commands and the Paper API via a custom plugin but nothing is working.

Observed/Actual behavior

When players first join they are in the right location but the yaw is 0 even though the world spawn location has yaw 180.

Steps/models to repro...

#

When discussing, I am not sure how much of a fan we are of displayedName, I still perhaps think name() is better in this case? In general, the naming is just confusing.

Data display is also a bit odd, as this really only occurs in chat, so I think something like chatDisplay might help describe this better.
<img width="1247" alt="Screenshot 2023-11-11 at 5 41 05โ€ฏPM" src="https://github.com/PaperMC/Paper/assets/23108066/b4c58400-4ceb-4400-b208-abcad58e271b">

Donno, further opinions want...

rustic folioBOT
rustic folioBOT
#

Confirmed, this is a vanilla issue. The spawn angle is just ignored when the player's spawn location is "fudged". Even with a spawnRadius gamerule value of 0, the angle is ignored. There is an open mojira report for it.

My concern is, that I don't exactly know what a clean fix is here. It doesn't immediately strike me that with a spawnRadius > 0, the yaw should always be respected. But I suppose that is the best option.

rustic folioBOT
#

Is your feature request related to a problem?

Hello,
The modifications to org.bukkit.advancement.Advancement to return a Paper AdvancementDisplay that match different methods than those of its bukkit counterpart directly make Bukkit plugins (using the API) incompatible with Paper plugins.

Describe the solution you'd like.

Either:

  1. Make the Paper AdvancementDisplay extend the Bukkit One to create API compatibility
  2. Copy (and maybe deprecate) the Bukkit methods to ensure Buk...
#
[19:24:45 ERROR]: Error occurred while enabling StarCosmetics v1.3.0 (Is it up to date?)
java.lang.NoSuchMethodError: 'org.bukkit.advancement.AdvancementDisplay org.bukkit.craftbukkit.v1_20_R2.advancement.CraftAdvancement.getDisplay()'

Using Paper build 290 for 1.20.2

[19:25:16 INFO]: This server is running Paper version git-Paper-290 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: f186318)
You are running the latest version
#

Ok yeah, this is probably because you are calling the method on CraftAdvancement, whereas normal use with the API would call it on just Advancement. And the rewrite only checks for methods owned by Advancement.

If you're rewriting the bytecode on the interface (I assume you then must rewrite the bytecode on the class), why does it matter?
Would this be fixed by not casting?

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

I do not think this event is needed at all. You can accomplish the same things by listening to the BlockDropItemEvent which, contrary to the linked issue, is fired before the block is changed allowing you to change the dropped items.

You can then just add a call to the EntityChangeBlockEvent before the blockstate is changed when the brushing is completed which you can cancel to prevent the brushable block from changing.

In my opinion, having control over this in a singular eve...

rustic folioBOT
rustic folioBOT
#

I cannot replicate this. I created a world with a Paper server on 1.18.1 with the provided seed. I ran the locate at -5000 70 -5000. The two locations output were different.

[10:54:49] [Render thread/INFO]: [CHAT] Teleported Machine_Maker to -4999.500000, 73.000000, -4999.500000
[10:54:53] [Render thread/INFO]: [CHAT] The nearest stronghold is at [-3880, ~, -3272] (2059 blocks away)
[10:55:02] [Render thread/INFO]: [CHAT] Teleported Machine_Maker to 0.500000, 66.158147, 0.500000
[10...
rustic folioBOT
rustic folioBOT
#

Fixes MC-172801

This patch properly applies the generic.flying_speed attribute to bees and parrots. If entities do not have this attribute, they are unaffected. The flying_speed attribute is multiplied by 0.049999999254942 in order to have bees and parrots with the default value of flying_speed be unaffected, having the vanilla 0.02 value.

Closes #9827

#

Fixes MC-172801

This patch properly applies the generic.flying_speed attribute to bees and parrots. If entities do not have this attribute, they are unaffected. The flying_speed attribute is multiplied by 0.049999999254942 in order to have bees and parrots with the default value of flying_speed be unaffected, having the vanilla 0.02 value.

Closes #9827

rustic folioBOT
#

Is your feature request related to a problem?

Allow changing the raySize of LivingEntity#rayTraceEntities
This will never include Displays because Displays have a hitbox of 0.

Describe the solution you'd like.

Allowing the definition of the raySize so developers can include Displays.

Describe alternatives you've considered.

Requiring Spigot's long method

result = origin.getWorld().rayTraceEntities(origin.getEyeLocation(), location.getDirection(), 100, 1.0D, entity -> !...
rustic folioBOT
#
[PaperMC/Paper] New branch created: feature/bytecode-modification
rustic folioBOT
#

Expected behavior

Location location = new Location(Bukkit.getWorlds().get(0), 0.0, 0.0, 0.0);
player.openEnchanting(location, true);

If there is a level 30 enchanting table at this location, the player can open the level 30 enchanting table normally at any location.

Observed/Actual behavior

If the player is in the overworld, the level 30 enchanting table will be opened.
If the player is in the Nether or the End, the lowest level enchanting table will be opened.

S...

rustic folioBOT
#

I did some testing locally and saw similar behaviour:

On 1.19.1-81
Setting validatenearbypoi to -1 resulted in job changes occurring in about 2 seconds or less.
Setting validatenearbypoi to 300 resulted in job changes taking up to 15 seconds.

On 1.20.2-290 (latest)
Changing the value of validatenearbypoi had no affect on how long it took the villager to switch jobs. The longest it took was about 2 seconds.

I thought maybe the name of the behaviour had changed as strange as...

rustic folioBOT
#

I have done some extensive checking and tested multiple versions and returned the following results:

  • 1.20.2-290 - Broken
  • 1.19.3-448 - Broken
  • 1.19.3-429 - Broken
  • 1.19.3-428 - Broken
  • 1.19.3-320 - Broken
  • 1.19.3-308 - Broken
  • 1.19.2-307 - Working
  • 1.19.2-112 - Working
  • 1.19.0-81 - Working

After some research, I believe this may have been caused by the 1.19.3 update where the addition of entity sub-predicate types were introduced, adding the following:

  • variant- values...
rustic folioBOT
rustic folioBOT
#

currently when creating a new PotionEffect that has a hidden PotionEffect and adding that to a PotionMeta the hidden effect won't get added to the PotionMeta cause afaik there is no NBT for hidden effects or anything like that on a Potion. I don't think documenting this is sufficient. Perhaps just adding the hidden effects (if there are any) as normal custom effects to the PotionMeta is a solution? Please leave some feedback on this

rustic folioBOT
#

At the moment all openXXX methods on HumanEntity creating real inventories discard the world of the provided location and instead use the world of the player.
It could be easily done to respect the provided world, but a general issue of these methods is that some of these inventories try to access the actual blocks in the world at some point of time and if the block is in an unloaded chunk, same world or another, a sync main thread chunk load will occur which isn't really desirable.

So ...

#

opening inventories cross world was never an intended usecase for these methods, it was always intended that either you'd be opening a "fake" inventory to a player backed by real world logic, or something actually within some reasonable boundary of them; I don't think that this will be fixed, mainly inso is that if we support it, we need to ensure that it's safe to do and won't induce potential state issues, i.e. the chunk unloads, the world unloads, etc

rustic folioBOT
#

Expected behavior

Sheep should grass and regrow their wool when all PlayerNaturallySpawnCreaturesEvents are cancelled.

Observed/Actual behavior

Sheep do not eat grass and regrow their wool when all PlayerNaturallySpawnCreaturesEvents are cancelled.

Steps/models to reproduce

Make a plugin:

package com.example.test;

import com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listene...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Some entity AI behaviours were changed in 1.19.3 from having their own classes to becoming instances of the OneShot behaviour, including ValidateNearbyPoi. This caused the tick rate options to stop working for those behaviours, as the options use the class names as config keys.

This PR re-adds tick rate option support for the behaviours that were affected by the update.

All OneShot behaviours are created by a call to the BehaviorBuilder.create() method, which happens in a static...

rustic folioBOT
#

I could be reading #9916 wrong, but I think it is adding another setting to let you rate limit behaviours that require certain memories: jobsite, bed location, meeting point, etc. As any number of behaviours can depend on a given memory, this would rate limit a large of number of behaviours.

This PR just restores the pre-1.19.3 functionality of the existing behaviour rate limit settings, which let you rate limit individual behaviours

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

Expected behavior

Advancement "Oh Shiny" obtain when player throw even one gold item and piglin pick it up.

Observed/Actual behavior

Trigger "thrown_item_picked_up_by_entity" with "item" condition only triggers when player throws stack with two or more items in. Therefore, to get the advancement you need to throw out two gold items in the stack at the same time.

Steps/models to reproduce

  1. Revoke advancement by command `/advancement revoke @s only minecraft:nether/distract_p...
rustic folioBOT
#
[PaperMC/Paper] New branch created: bugfix/incorrect-piglin-pickup-item
#

thing is if we do say it returns the current one. it actually has to return the current one which it doesn't since the advancement progress is being retrieved during event creation and not during the method call. i am unsure if the jdocs or the way its stored is the issue. somebody from paper team should probably look over that one and say how its usually done with events

#

The existing EntityPickupItemEvent fixes patch moves the call to LivingEntity#onItemPickup for piglins after the respective EntityPickupItemEvent calls, which is correct.
However the patch moved the call so far down the line that the existing logic already mutated the picked up item entity, leading to faulty state being passed to the onItemPickup method.

To prevent logic in LivingEntity#onItemPickup to read from an ItemEntity that was already mutated, this commit moves the calls prior to ...

rustic folioBOT
#
[PaperMC/Paper] branch deleted: bugfix/incorrect-piglin-pickup-item
rustic folioBOT
#

I'm not sure if this adds to the issue much but some things seem to de-trim non-armor items more frequently. Going slow doesn't seem reliable either as sometimes waiting 10 seconds between actions can still result in certain actions de-trimming an item stack.

some such instances:

  • Right clicking a trimmed item stack like carved pumpkins to split the stack can detrim both stacks
  • Middle clicking stackable trimmed items can de-trim both, or make your cursor pick up an untrimmed copy of ...
rustic folioBOT
rustic folioBOT
#

Stack trace

https://paste.gg/

Plugin and Datapack List

Chunky
CoreProtect
FastAsyncWorldEdit-Bukkit
Geyser-Spigot
GSit-1.5.3
InvSee++
LibsDisguises
ProtocolLib
Skript
ViaBackwards
ViaRewind
ViaVersion

Actions to reproduce (if known)

-start :start.bat"
-cmd starts
-crash

Paper version

git-Paper-292 (MC: 1.20.20

Other

it starts and after like 10 secends closes

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

For example the material Material#BAMBOO_WALL_SIGN is NOT an obtainable item in survival minecraft. So the method is expected to return false.

Observed/Actual behavior

When I check the material Material#BAMBOO_WALL_SIGN with the isItem method it returns true.

Steps/models to reproduce

System.out.println(Material.BAMBOO_WALL_SIGN.isItem());

Plugin and Datapack List

none

Paper version

This server is running Paper version git-Paper-196 (MC: 1.20.1) ...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

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

Bukkit Changes:
96340858 PR-938: Various Sound API improvements
cbfe0ff0 PR-937: Minor improvements to World#rayTrace documentation
e979ee95 PR-935: Change Consumer and Predicates to super
27ae46dc SPIGOT-3641, SPIGOT-7479, PR-931: Add missing values to EntityEffect
0616ec8b Add eclipse .factorypath file to .gitignore
...

rustic folioBOT
#

This is a critical problem for us as well - so we just hack around it in our paper fork. Not ideal, and certainly not a PR I'd like to submit here... but this patch has worked for us for years now:

https://github.com/TeamMonumenta/monumenta-paperfork/blob/main/patches/server/0004-Monumenta-Move-player-saving-to-before-disabling-plu.patch

Would love to see this changed someday. Until this is fixed it's difficult to reliably build a plugin that alters how player data storage works.

@...

rustic folioBOT
#

Stack trace

c86930b51dbd4c30964a3dc0cddae62d

[17:47:28] [Paper Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-217 (MC: 1.20.2) ---
[17:47:28] [Paper Watchdog Thread/ERROR]: The server has not responded for 10 seconds! Creating thread dump
[17:47:28] [Paper Watchdog Thread/ERROR]: ------------------------------
[17:47:28] [Paper Watchdog Thread/ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[17:47:...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

[01:38:30] [User Authenticator #1/INFO]: UUID of player sapir3 is aa5cd6bb-d9d1-421f-b4ae-ceadc6ed7005
[01:38:30] [Server thread/INFO]: sapir3[/70.59.238.240:55627] logged in with entity id 8918 at ([world]-48.5, 53.0, 490.5)
[01:38:30] [Server thread/INFO]: >> sapir3
[01:38:32] [Server thread/ERROR]: Failed to handle packet net.minecraft.network.protocol.game.PacketPlayInWindowClick@44a4a42e, suppressing error
net.minecraft.ReportedException: Container click
	at ne...
#
rustic folioBOT
#

Any chance this can be updated to directly include it or do you want to keep that separate?

I really want to wait as long as possible before adding this. It is a poorly designed system with many flaws. It exposes "not-in-world" entities in new event calls that will be unexpected to plugins, the API itself does not care at all about cancelled spawn events, and I'm sure a dozen other problems with specific entity events that will not throw exceptions, but have bad behavior if called on a n...

rustic folioBOT
#

This is tricky here.

The whole "blockdata" api is based on the idea that most methods can exist as the block is independent.

However fluid is strictly tied to the world due to its inherently unfinished implementation.

I think that we should call this FluidState, to not only align with vanilla but to make a clear distinction between block data here.

Because in truth, FluidState represents a block in the world.

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] New branch created: build-updates-1
rustic folioBOT
#

Expected behavior

Im currently developing a vehicle plugin and I am teleporting the seats every tick to their offset position from the main armorstand.
I expect them to be like in this image.

2023-11-21_22 33 30

Observed/Actual behavior

However, when driving out of the render distance of a player and entering it again, the armorstands are desynced with the player like in this picture.

...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I see. Kinda sad that wasn't put forward on the original PR :S

thats what happens if you close PRs to the public ๐Ÿคท

Don't say it as if you don't know that it's not intentionally like that. (For anyone who doesn't know: It's a limitation with Stash's permission system, it was not a choice to not make them publicly visible)

And I am sure most relevant people have access anyways...

#

I see. Kinda sad that wasn't put forward on the original PR :S

thats what happens if you close PRs to the public ๐Ÿคท

Don't say it as if you don't know that it's not intentionally like that. (For anyone who doesn't know: It's a limitation with Stash's permission system, it was not a choice to not make them publicly visible)

And I am sure most relevant people have access anyways...

I always have and always will disagree with that argument. Any organization ...

rustic folioBOT
#

Expected behavior

ๆญฃๅธธ่ฟ›ๅ…ฅๆธธๆˆ๏ผŒๅนถไธ”ๆŽฅๆ”ถๅˆฐ่ต„ๆบๅŒ…

Entering the game normally and receiving resource packets

Observed/Actual behavior

็Žฉๅฎถ่ขซๆ‹ฆๆˆช
Player intercepted

Steps/models to reproduce

1.่ฟ›ๅ…ฅ็ฌฌไธ€ไธชๆœๅŠกๅ™จ๏ผŒๅŒๆ ทๅธฆๆœ‰ๆŒ‡ๅฎš่ต„ๆบๅŒ…๏ผŒๆŽฅๆ”ถๅˆฐ็ฌฌไธ€่ต„ๆบๅŒ…ใ€‚
2.่ทจ่ถŠไผ ้€ๅˆฐ็ฌฌไบŒๆœๅŠกๅ™จ๏ผŒๅคฑ่ดฅ

Plugin and Datapack List

  • ChestCommands, *ChineseNickName, Citizens, CMILib, CnUsername, *CommandNPC, ConsoleSpamFix, dynmap, Essentials, LuckPerms
    Multiverse-Core, Residence, SkinsRestorer, *Stp, Vault, VeinMiner, ViaBackwards, ViaVersion

P...

rustic folioBOT
rustic folioBOT
#

I stumbled upon this bug and poked around for a bit. Not finding an "easy" solution, I first tried moving the
((net.minecraft.server.level.ServerLevel) this.level).chunkSource.chunkMap.anyPlayerCloseEnoughForSpawning(this.mob.chunkPosition())
to the location of destroying the grass block - so the sheep can still regrow its wool. Preferring to have the bug of the grass not being destroyed, than to never regrow the wool at all.

The biggest problem I had in looking for a real solution, w...

rustic folioBOT
rustic folioBOT
#

Expected behavior

Cancelling a player's command would cancel the command being run
The player would be able to chat as intended

Observed/Actual behavior

After a player's command is cancelled, they cannot chat or run another command without being kicked.

Steps/models to reproduce

A simple plugin with a class that contains this code:

public class CommandListener implements Listener {
    @EventHandler
    public void onCommand(PlayerCommandPreprocessEvent event) {...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: refactor/remove-experimentals
rustic folioBOT
#
[PaperMC/Paper] branch deleted: feature/key-generation
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Asynchronous chunk generation provides an opportunity for mobs being added with generation to have effects added to them. The event does not support asynchronous firing.

This functions by checking the type of the ServerLevelAccessor provided in the finalizeSpawn method and doesn't fire the event if it's not a ServerLevel.

I don't think this is the final fix for this, some mechanism probably has to be introduced to allow the event to be fired asynchronously without breaking plugins' ex...

rustic folioBOT
rustic folioBOT
#

Expected behavior

Only a certain amount of entities spawn within the range of the spawner (In the case of the video below, 5 entities)

Observed/Actual behavior

MaxNearbyEntities is not obeyed by mob spawners and spawners will blow past the cap

Steps/models to reproduce

https://github.com/PaperMC/Paper/assets/62525223/25113864-48a7-4d02-b17f-5902351039f5

Plugin and Datapack List

None - Tested with only Paper

Paper version

This server is running Paper version ...

#

Might be an annoying question, but what about Location? The whole Position API seems to be immutable, but Location, which implements FinePosition, just isn't. I feel like there might be a problem when a plugin has positions stored that change over time. Also, Location already has a bunch of mutating offsetting methods, and now it has more, but without a single mark that those are creating an immutable Position that isn't a Location.
I'd say either Location's and Positions' javadoc should d...

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

I was able to trigger a ConcurrentModificationException while using this PR:

[18:54:22] [Paper Async Command Builder Thread Pool - 0/ERROR]: Caught previously unhandled exception :
[18:54:22] [Paper Async Command Builder Thread Pool - 0/ERROR]: Paper Async Command Builder Thread Pool - 0
java.util.ConcurrentModificationException: null
	at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1486) ~[?:?]
	at java.util.TreeMap$ValueIterator.next(TreeMap.java:1531) ~[?:?...
rustic folioBOT
rustic folioBOT
#

If your server has a lot of farms, the isNearWater calls gets very expensive.

To workaround this, we can throttle the tick rate of farmlands, because after all, you don't really need to check if the farmland is near a source of water that much, right? It is not like the water will magically vanish if they are in a player made farm.

This helps a lot, on my server farm lands were taking up 8% of CPU time, so throttling the tick rate to 8 helped.

There are two options: `dry-farmla...

rustic folioBOT
#

For each player on each tick, enter block triggers are invoked, and these create loot contexts that are promptly thrown away since the trigger doesn't pass the predicate.

To avoid this, we now lazily create the LootContext if the criterion passes the predicate AND if any of the listener triggers require a loot context instance.

While the performance increase ain't that big (on a random profile with ~55 players on my server, the createContext call was using 0.10% according to spark), ...

#

The blockEntityTickers list was replaced with a custom list based on fastutil's ObjectArrayList with a small yet huge change for us: A method that allows us to remove a list of indexes from the list.

This is WAY FASTER than using removeAll with a list of entries to be removed, because we don't need to calculate the identity of each block entity to be removed, and we can jump directly to where the search should begin, giving a performance boost for small removals (because we don't nee...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I'm not a super huge fan of the way this logic is structured. To be clear, it seems to work, but the optional.isPresent() check on the earlier if statement to counter the optional.isEmpty() check below might not be the most clear way to do this.

As much as I don't like using the return value of variable assignment, perhaps this is more clear?

- if (optional.isEmpty() || optional.get().matches(lootContext)) {
+ if (optional.isEmpty() || optional.get().matches(lootContext = (l...
rustic folioBOT
rustic folioBOT
#

Adds a new file, command-aliases.yml into our config folder for defining simple aliases for commands that work with tab completion and permissions. Schema is as follows

alias1: some-command

alias2:
  - some
  - command

alias3:
  target: some-command
  permission: some.permission

alias4:
  target:
    - some
    - command
  permission: some.permission

The default permission behavior is to combine all of the permission requirements at all of the nodes al...

#

Expected behavior

to stop playing when being broken

Observed/Actual behavior

still playing when broken

Steps/models to reproduce

place a juke box
spam it with a bunch of music discs

https://github.com/PaperMC/Paper/assets/53542804/3a9d801a-73ea-4277-8fa9-a67528f6464d

Plugin and Datapack List

spark, viaversion, viabackwards

Paper version

Paper version git-Paper-290 (MC: 1.20.2) (Implementing API version 1.20.2-RO.1-SNAPSHOT) (Git: f186318)

Other

_No r...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: version-catalogs
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: update-mapping-io
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Java version check should be ignored when starting the server

Observed/Actual behavior

The version compatibility check runs anyway and stops the server's execution

Steps/models to reproduce

Run an unsupported java version and try to run the server with "-paper.IgnoreJavaVersion=TRUE"

Plugin and Datapack List

openjdk-17

Paper version

1.20.2 Build#307

Other

I'd like i was just trying to run Paper through termux on my phone, which obviously is...

#

What's the exact command line you're starting your server with?

i have tried using "-DPaper.IgnoreJavaVersion=true" (which tells me it's not a recognized option) as well as "-Paper.IgnoreJavaVersion=true" which just doesn't do anything at all

Make sure you put that before the -jar, not after

That worked, thank you, sorry i didn't think the order of the command would matter, problem was between the chair and keyboard ๐Ÿ˜‚

rustic folioBOT
#

This patch should just completely replace Fix MC-117075: TE Unload Lag Spike. That is the patch that changes the removal logic from vanilla's removal 1 at a time to using the removeAll. No point in having a patch that is completely reverted in a later patch.

I've now replaced the old patch with the new code :3

I also changed the code a bit: Now the list itself tracks what indexes and where to start the search, instead of throwing the code in the tickBlockEntities() method, which m...

rustic folioBOT
#

I cannot reproduce this. Try without the via plugins? It looks like from your video, it doesn't have a record in it when you break, so it doesn't stop the music. The music stop is just a packet sent when a jukebox is broken that has a record in it, so some state somewhere is being desynced.

It's possible I'm not clicking fast enough, but I was doing in creative so I didn't need to switch hands, just put in disc, and pop it out. But always when I stopped and the music was still playing, br...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I know that this looks like a stupid optimization that doesn't do anything, but hear me out: getDurability() ain't free, when you can getDurability(), it calls getItemMeta(), which then allocates a new ItemMeta or clones the current item's item meta.

However, this means that we are unnecessarily allocating useless ItemMeta objects if we are comparing two items that do not have durability, and this impact can be noticed if one of your plugins has a canHoldItem function that chec...

rustic folioBOT
rustic folioBOT
#

I've been running this patch on my server for ~1 week already (after making my own makeshift patch that only did the ItemFrame getItem() optimization, only to find out that someone else already had made the same patch but better) and I didn't find any issues, and it also improves performance a bit if the server has a lot of item frames (which is my case for a Survival server) by avoiding calling getItem(), where all getItem()calls were using 0.25ms every tick. (not a lot but for big ser...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: refactor/remove-experimentals
rustic folioBOT
#
[PaperMC/Paper] branch deleted: update-mapping-io
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: merged-properties
#

This is an alternate way to share dependency versions between api & server to version catalogs (#9974), which have the problem where any catalog change that impacts the generated accessor ABI will cause the entire paperweight pipeline to run again (which makes it impractical for our use case)

If we decide to go forward with this, will need to merge https://github.com/PaperMC/paperweight/pull/226 and make a paperweight release first.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I don't know if someone else like Spottedleaf might have a different preferred way to remove the tickers.

Another way that I thought that it could be optimized even further beyond is if you System.arraycopy instead of a[j++] = a[i]; for each element that is not in the list. This way, indexes that are far apart (example: index 100 and 8000) could avoid the looping thru all the elements just to get from index 100 to 8000.

So, using our example: The search starts at index 100, then t...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

When Mojang first added the copper bublb, it had a 1-tick delay. This was a pretty big deal for Redstone, because Redstone usually runs at even game ticks so this would allow for events to occur at odd game ticks.

Describe the solution you'd like.

Patch the copper bulb so it has a 1-tick delay. AFAIK this is only server side, so it should be patchable by Paper. Please correct me if Iโ€™m wrong.

Describe alternatives you've considered...

#

The question is less, can a config option be implemented that's does this (it certainly could, off by default etc) it's more a, does paper want to offer config options that change vanilla behaviour just for the sake of changing it.

Existing config options are either bug fixes, performance improvements or sanitisers for data.
This would not have any motivation beyond "I don't like mojangs decision", which (while maybe reasonable) is not something we have done yet.

Imo it is also not somethin...

#

This PR is mostly for "hey maybe there is a better solution for this", since I don't expect this PR to be accepted since it is mostly a hacky hack that probably has concurrency issues (accessing hasScheduledAtLeastOneTask outside of a synchronized block) and probably has a better solution.

Folia's EntityScheduler executeTick loop in MinecraftServer's tickChildren is slooooow if you have a lot of entities (example: for a server with 15k entities, it uses ~1.7ms every tick, even if n...

rustic folioBOT
#

This is an alternate implementation of #9984, based on the patch that I'm running on my server. https://github.com/SparklyPower/SparklyPaper/blob/ver/1.20.2/patches/server/0010-Skip-EntityScheduler-s-executeTick-checks-if-there-i.patch

In my opinion this PR is better than other PR because it is cleaner and better, but it is more complex than the other one. I haven't tested on Folia tho to see if there is any concurrency issues BUT I think there wouldn't be any, all checks are made within t...

#

Rebased the PR on master (as of 11/19/2023). Messed up the first rebase, this is why the commits look a little messed up

Also tested using several solutions, hopefully this is enough to finally merge this!

Screenshot of the same banner created using different methods

The first banner was created using https://www.spigotmc.org/resources/itemedit-1-8-x-1-20-x.40993/

The second banner was created using <https://www.spigotmc.org/resour...

#

I have made another PR that also solves the same issue, but that one is based off the patch I mentioned in this PR's description: #9985

I decided to open a new PR instead of editing this one because I think both approaches are nice:

  • This one requires less changes, but if a EntityScheduler has been used at least once, then the scheduler will continue being ticked until retired.
  • The other one requires more changes, but is cleaner and better overall.
rustic folioBOT
rustic folioBOT
#

Expected behavior

(Paper version #246)
In version #246, plugins were able to obtain PlayerUUIDs, even when the player is Offline (BungeeCord or Waterfall.) This was crucial for plugins to perform tasks like displaying Playerheads or generating Playerdatas.

Observed/Actual behavior

(since Paper version #247+)
However, starting from version #247, plugins are no longer able to retrieve the real UUIDs, and instead, fake UUIDs are generated when the Player is Offline. Especially in...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

A not-uncommon problem with certain types of plugins, especially ones which mirror chat to other platforms i.e. Discord, is that..."special" plugins will handle events improperly, cancelling events and mimicking their behavior instead of allowing Paper to handle it. This causes problems for the consuming plugins, since as far as they're concerned, the event was cancelled and thus should be ignored.

The dumplisteners command helps tremendou...

rustic folioBOT
#

This patch adds new Chunk events that are called during the chunks' serialization/generation process.
Yes, there is a ChunkLoad or ChunkUnload event. However, they are called sync.

These proposed events are called during the process. They are primarily used to manipulate the persistent data container of the chunk to offramp saving/loading tasks made by custom plugins to the paper chunk loader threads system.

You may ask: Why not just store data in the persistent data container of the c...

rustic folioBOT
rustic folioBOT
#

I like the principal here, and think that yes it would be very useful to be able to hook onto the chunk loading async in order to add your own data. However, the issue I see here is the PDC really thread safe here? We may need to offer some sort of alternate implementation to ensure that it is safely mutable async. Unsure though, since if the chunk loading is blocked until the async event completion is done theoretically it shouldn't have any duel-thread mutations?

rustic folioBOT
rustic folioBOT
#

This patch adds new Chunk events that are called during the serialization / generation process of chunks.
A problem some developers may face while using the ChunkLoad or ChunkUnload events is the fact that they are called synchronously.
These proposed events are called during the process.

The use case of such events is that heavy saving / loading tasks from cache to the chunk nbt container or vice versa are executed asynchronously aswell but in the same thread
that saves / loads / gener...

#

This feels rather arbitrary IMO.
Preferably we just match specific nbt tags.

Custom model data feels somewhat randomly selected from the plethora of ways plugin developers can identify custom items. Given the fact that custom model data is not even the preferred way of identifying custom items (the PDC is) I am really not sure if I like a slapped on server side recipe choice that makes use of the custom model data value.

The fact that mojang does not support nbt matching recipes has be...

rustic folioBOT
#

This feels rather arbitrary IMO. Preferably we just match specific nbt tags.

Custom model data feels somewhat randomly selected from the plethora of ways plugin developers can identify custom items. Given the fact that custom model data is not even the preferred way of identifying custom items (the PDC is) I am really not sure if I like a slapped on server side recipe choice that makes use of the custom model data value.

The fact that mojang does not support nbt matching recip...

#

What do you mean the *rest" of the PDC ? CustomModelData isn't in the pdc. I 100% get what you are going for here. I am not saying it would be useless.

I am more arguing that this change picks an arbitrary way to identify a custom item and promotes it to the API with a recipe choice when plenty of other ways exist.

It's in a way fixing a symptom of a way deeper issue, Mojang not permitting recipe ingredients via compound tag.

If I am identifying my custom items via a pdc tag, e.g. I have a...

#

What do you mean the *rest" of the PDC ? CustomModelData isn't in the pdc. I 100% get what you are going for here. I am not saying it would be useless.

I am more arguing that this change picks an arbitrary way to identify a custom item and promotes it to the API with a recipe choice when plenty of other ways exist.

It's in a way fixing a symptom of a way deeper issue, Mojang not permitting recipe ingredients via compound tag.

If I am identifying my custom items via a pd...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Do you know if this works with shapeless recipes? My initial guess is that it does not. The initial implementation of ExactChoice also did not work with shapeless recipes which upstream just decided to ignore putting in the javadoc that it didn't work with them. I don't really want to go back to that adding more RecipeChoice that doesn't work in all recipes.

Ive been using this implementation for quite a while now but I am willing to do a full testing session to make clear it works on ev...

rustic folioBOT
rustic folioBOT
#

Do you know if this works with shapeless recipes? My initial guess is that it does not. The initial implementation of ExactChoice also did not work with shapeless recipes which upstream just decided to ignore putting in the javadoc that it didn't work with them. I don't really want to go back to that adding more RecipeChoice that doesn't work in all recipes.

Is there a specific reason why we are still using StackingContents and RecipePicker instead of building a whole new system? I was t...

rustic folioBOT
#

The nature of ExactChoice being flawed is more an issue with how bukkit represents itemstacks and would generally stand a chance of being fixed once we get the property API
Replacing entire vanilla systems generally needs a strong reason when plugins have been delivering this within their own code for years now, especially given the expectations that we'd be expected to maintain it, while mojang is working on stuff which would generally make the custom model data irrelevant for a good chunk ...

rustic folioBOT
#

The nature of ExactChoice being flawed is more an issue with how bukkit represents itemstacks and would generally stand a chance of being fixed once we get the property API Replacing entire vanilla systems generally needs a strong reason when plugins have been delivering this within their own code for years now, especially given the expectations that we'd be expected to maintain it, while mojang is working on stuff which would generally make the custom model data irrelevant for a good chunk...

rustic folioBOT
rustic folioBOT
#

Short explanation:

We were deciding between two approaches. After talking to @Machine-Maker who has helped us by providing guidance we either wanted to enforce the dropChance in the setDropChance method within the interval of [0.0, 1.0] and create a separate method that sets a guaranteed drop chance to 2.0 (following Mojang's approach when doing so) or merely updating the docs.

However, after comparing both approaches, we have decided to simply update the docs as we deemed it uneccessar...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

It should be allowed to add AttributeModifiers with same UUID into ItemMeta as long as they have different Attribute types, which is the vanilla behavior.

Observed/Actual behavior

ItemMeta#addAttributeModifier wrongly throws an IllegalArgumentException on adding such an AttributeModifier.

Steps/models to reproduce

ItemStack item = ;
item.editMeta((meta) -> {
    AttributeModifier modifier = new AttributeModifier(UUID.randomUUID(), "Example", 69420...
#
[PaperMC/Paper] New branch created: chore/update-contrib
#

Looking over this patch, I wonder if a reverse approach would be faster.
Given we have a sorted list of indices to remove from the list we would be able to do determine a set of "ranges" of elements to be kept.

E.g. with toRemove = [0, 3, 5] and a list of [a, b, c, d, e, f, g] we can immediately conclude that items 1 and 2 have to be moved by one index to the left, leading to [b, c, c, d, e, f, g]. We can also conclude item 4 has to be moved to the left by two indices, leading...

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

Machine and I discussed this yesterday but wouldn't it make sense to "merge" backoffTicks with tickDelay ?

The tickDelay variable does pretty much the exact same.
We'd save ourself a field here by this.tickDelay = Math.max(this.tickDelay, event.getBackoffTicks()) instead.

Passing the current backoff ticks to the event seems, in retrospective, kind of useless ? given the event is only called when those reach 0, I don't think there is much value here.

rustic folioBOT
#

3 days ago I posted a pull request #9991 about adding CustomModelChoice. However, we came to the conclusion that we need a more generalized approach.
As a result, I began working on what is called PredicateChoice.
To make it work the StackedContents logic had to be edited.
In the ExtraContentsMap we don't store the exact ingredient items of every recipe ingredient. Instead, whenever we account a new stack in StackedContents logic we compare it to the provided predicates and store them as "...

rustic folioBOT
rustic folioBOT
#

Missing all sorts of // Paper comments, but that's not a big deal.

Overall, this works with my initial testing. I haven't yet done any spark profiles yet to see if the performance is significantly worse or anything.

My main concern with this is the unnecessary replacement of MaterialChoice and ExactChoice. We should just be able to add a 3rd (PredicateChoice) to that lineup without needing to replace the others.