I provide a server-side archive that can reproduce the lag phenomenon, which contains the control groups of paper and spigot, I hope you can help analyze it
https://mega.nz/file/57cnHISZ#i7VDdEJf6xwok93Y2i7KIkxu8byvxVeMFDY85qLlqR4
#paper
1 messages ยท Page 2 of 1
So the problem with this, is that crops will break if they can't see the sky and have a light level lower than 8 (or smth close).
There are multiple light level and conditions for crops to grow, so idk how well a single configuration value will handle those.
Hey @PoiiohPoii, can you please provide a new spark report?
Yeah I saw something lower down in the class about crop survival which I guess could also be turned into a config option?
There is this which is the only othert light dependant part of the CropBlock class so I'd assuming making this configurable would fix your issue?
@Override
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
return (world.getRawBrightness(pos, 0) >= 8 || world.canSeeSky(pos)) && super.canSurvive(state, world, pos);
}
Due to this not covering all cases of the original bug, I'm going to close this. Feel free to submit a new PR which fixes all multiblocks (due to the age, putting the fix behind a config option would also be good). Thank you for your contribution.
Superseded by this paperweight commit.
I believe all of the above should be resolved.
This adds a method called isConnected to the OfflinePlayer which allows for beter checking if an instance of Player is still representing an actual online player. When a player reconnects isOnline on the old instance will still return true, but isConnected returns false. This way you can distinguish stale Player instances so offline Player instances.
More information in the comments on the paper-api patch.
This introduces new methods on the PluginManager that supersede the old registerEvent/registerEvents methods. These new methods return a RegisteredListener object which can be used by plugins to better handle their registered listeners. The RegisteredListener now also has an unregster() method which can be used to directly unregister that listener from all relevant handler lists instead of having to iterate over them all.
Clarify that this returns only registered listeners created from the supplier Listener, not all of them ever registered.
Also, we generally steer clear of using "var" anywhere.
I think these deprecations are going too far. I don't ever see us removing these since they work fine. I think they are a better candidate for the "Obsolete" annotation.
Is there an annotation for Obsolete or should I just only note its obsoleteness in the lore?
There is, itโs โApiStatus.Obsoleteโ from jetbrainsโ annotation library
Expected behavior
Bukkit.dispatchCommand should launch a ServerCommandEvent as when typing in the console.
Observed/Actual behavior
It doesn't launch the event.
Steps/models to reproduce
Use Bukkit.dispatchCommand in a plugin and listen for the ServerCommandEvent.
Plugin and Datapack List
Server Plugins (84):
[18:26:56 INFO]: Bukkit Plugins:
- AdvancedAchievements, AfkTitle, *AntiAFK, AntiDecoCombat, AreaShop, ArmorStandTools, ASReplace, BlockLocker, BlockVillagersEn...
Fix PR adding methods to BlockData that are currently just on Block which either never should have been there in the first place or should have been in both places.
Am splitting this up cause they are kind of annoying PRs to review cause the diff is ugly.
Patches #9644
Tested with a test plugin and works fine, not sure if its in the most optimal place however it seems to work just fine
The event is cancel-able and changes made via #setCommand should also be reflected:
Should denote a) via annotation and b) in the javadocs that the returned collection is immutable.
Can just be replaced by a com.google.common.collect.Collections2.transform(serverPlayerList, ServerPlayer::getBukkitEntity) in the code itself.
Generally a rather weird javadoc structure on the event, you are skipping the main javadoc comments on every method and just describe the method in either @return or @param flags.
Can you replace this with proper javadocs as found in the rest of the codebase, describing the method in a normal javadoc body and the specific return/param value in the tags.
Negative backoff ticks make no sense. This could use a @Range annotation as well as obvious javadocs and a runtime validation via Preconditions.
Expected behavior
BlockPhysicsEvent should always be cancellable.
Observed/Actual behavior
With a plugin cancelling all BlockPhysicsEvent, no physics should be "played".
Now, the physics cancelled are only those when you break a block below another one. If you try placing sand where it could fall, it will even if it shouldn't.
See this video for better understanding : https://youtu.be/I8pPa0my7lk
Steps/models to reproduce
Create a plugin cancelling physics
Try to pla...
don't have the means to look, but this would more scream like a case of "the event didn't fire where I expected it to", a common issue for the physics event, rather than it not cancelling properly (Pretty sure that that would be impossible in its current state)
Falling blocks literally schedule a tick on their onPlace.
The event, as cat said, isn't called and cannot really be called there either.
You can use the EntityChangeBlockEvent to prevent the falling sand block from spawning in the first place, but in my honest opinion this is a wont fix.
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
CraftBukkit Changes:
4f7ff4dec PR-1246: Add missing AbstractTestingBase to tests which need them
f70a7b68d SPIGOT-7465, MC-264979: Fresh installations print NoSuchFileException for server.properties
8ef7afef6 PR-1240: Call BlockGrowEvent for vines that are growing on additional sides of an existing vine block
This PR fixes shields not playing sounds when being broken by an axe or when blocking a damage. This bug is client-sided but can easily be fixed by playing the sounds instead of the entity events, this is exactly what this PR does.
Maybe it would be better to both broadcast the entity event and play the sound?
Don't import - use fully qualified names instead.
Oh yeah my bad, forgot to check the imports for this file
Maybe it would be better to both broadcast the entity event and play the sound?
I chose not to send both because when mojang is gonna fix the issue on their end, we're gonna have a time where the sound is gonna be played twice
Do you mean getNearbyPlayers? Or are you referring to putting if (!activatingPlayers.isEmpty())?
From where you copied this from (the inside of the isNearPlayer method in MobSpawnerAbstract).
I assume the linked PR only fixed the inventory desync? Placing a lily pad and cancelling it still triggers a block update, but the desync doesn't happen anymore
Fixes https://github.com/PaperMC/Paper/issues/9504 (part 2)
PlaceOnWaterBlockItems use a slightly separate system for placing their blocks which doesn't go through the "capture" system for all other blocks being placed by items. This copies over some of the logic just for those items.
6813244 Fix/improve destroy speed API (#9645) - Machine-Maker
This whole patch can be merged into the patch that fixes a ton of other random vanilla bugs.
Part of the comment should be where exactly you got this line (which I assume is from the handleEntityEvent in LivingEntity). Also, I think that first float param should be 1.0F for event 29.
Why is the player blocking exempted here? broadcastEntityEvent sends it to the current player as well as nearby players.
Are we fine with dropping the logging change? Upstream's fix doesn't include one.
Yeah, that would be one potential fix. I just wonder if an event allowing plugins to customize it more finely would be better. Idk how such an event would work tho.
Uhm, I missed the part where it sends it to the player, going to fix that on other places as well
Nice catch, sorry for not paying too much attention on this. And got you for the comment, going to add that
Expected behavior
When any player clicks on a message with a callback click event the callback should be called normally.
Observed/Actual behavior
When sending a non-op player a component with an callback click event attached to it the player will only receive a message that the command could not be found (because he has no permission for /paper and therefore not for /paper callback) Unknown command. Type "/help" for help.
Steps/models to reproduce
// Player sh...
Relatively easily resolved by updating how the PaperCommand constructor register its permissions (allowing subcommand to overwrite the PermissionDefault and then having callback pass TRUE instead of OP)
I am just about to actually do exactly that :)
I
We might want some input on whether this is the behaviour we want backoff ticks to have or if they should simply just skip the player search and use the "boolean" if players were nearby from the last attempt before the backoff.
Hmmm, that's a great point. I prefer the current functionality of it but it'd be interesting what others would have to say.
Not really sure how to do this. Is it by annotation or something similiar?
Also, I'm not sure why it reordered the patches the way it did.
Not really sure how to do this. Is it by annotation or something similiar?
Also, I'm not sure why it reordered the patches the way it did.
Is your feature request related to a problem?
Following #6464. event.getLocation().getBlock() returns AIR during StructureGrowEvents involving trees. Prior to this PR, it would return the sapling that the tree grew from. It appears that there is no way to figure out what sapling was involved in a StructureGrowEvent without using TreeType and mapping all types to the correct sapling.
Describe the solution you'd like.
A method of accessing the type of sapling (or other original blo...
Hello! Can you please update this PR to include this?
it'll be updated before the merge yes ๐
You can put a comment "// diff on change" in the isNearPlayer method to be sure to prevent desync even if this method is completely rewritten by paper. Also currently the pr doesn't allow point a and c to happens so see my first comment about that (the edit) but i think the event should be called before the player check to allow a and c.
i don't think this list was null even before your change? an empty list is not the same as a null object
Yeah, I think that was an unintended regression, that the block doesn't show the sapling. So that is the fix done in the linked PR.
0c0a480 Do crystal-portal proximity check before entity... - MartijnMuijsers
Expected behavior
As in earlier versions, the nodding does not happen, they look straight at you
Observed/Actual behavior
Mobs / animals nod when you stand on a pedal flower (1.20 biome flower) after a while when they look at you.
Steps/models to reproduce
- Place a pedal flower next to you
- Spawn a mob / animal next to you that can walk and look at you
- Stand on the flower and observe the mob / animal
- When they look at you, they rarely nod a few times in a weird w...
Generally really nice work ๐ a few annotations left but beyond that good and ready for testing/review.
+ io.papermc.paper.event.entity.PreSpawnerSearchEvent preSpawnerSearchEvent = new io.papermc.paper.event.entity.PreSpawnerSearchEvent(io.papermc.paper.util.MCUtil.toLocation(world, pos), activatingPlayers, Math.max(0, searchCooldownTicks));
@Range(from = 0, to = Integer.MAX_VALUE)
Could use a @Unmodifiable
Only change from noah's PR is a safety net init of the command atomic ref.
If we somehow explode in the executeBlocking, the excption messages have something to fall back onto.
Happens on Spigot, doesn't happen on CraftBukkit. Spigot's inactive ticking is to blame as far as I can tell. If the entity isn't fully ticked all the time, there is some desync to the head movements that looks pretty janky. Also, I had to be in survival mode for this to show up properly.
Can reproduce.
Same happens with hostile mobs in vanilla though, especially when standing in a position the mob can not reach. maybe because it's switching between the target and look at goals repeatedly.
However it seems to be much more frequent on Spigot and Paper.
Is your feature request related to a problem?
Chest protection plugin signs would be rewritten.
Describe the solution you'd like.
I want to disable sign editing in version 1.20.
Describe alternatives you've considered.
there's no way to try
Other
No response
You need to wax the signs yourself or the protection plugin should make them non-editable through API.
Please use our Discord or forums in the future for questions.
Annotations aren't allowed for Void functions.
The list is never null though? I'm somewhat confused regarding this comment.
Basically what you mean is to allow for the list to be able to add/remove players (basically allow spawners to be activated at any range?).
In my opinion I don't think this is a desirable outcome as basically it will allow spawner's to functionally be always active which in my case would be opposite of the PR.
Although, I could add something like the following (not sure if this is what you meant!), although I don't think it would be great.
private List<Player> activatingPlaye...
Timings or Profile link
https://spark.lucko.me/3LUGkngcdt
Description of issue
Everytime I enable Anti xray in the World-defaults config file. The server ram creeps ups slowly but it doesnt stop eventually it surpasses the max amount of allocated memory Which is 8GB Just to note there is at most 5 people playing at a time. And once that happens the tps drops down to 15-17 (5-10) in extreme cases and if left on for too long eventually crashes.
I have run the server without any p...
The way Java works is the heap memory will increase to the amount specified in Xmx. The total memory of the process may be bigger since the entire process' memory is not just the Java objects.
tl;dr unused RAM is wasted RAM
In the Spark you've sent the memory didn't even reach the Xmx.
What we'd need is a heap dump to prove any memory is actually leaked.
Hmm ok yeah ill try to get a heapdump asap im not sure if its a leak or not but what I know for sure is it is causing TPS loss over time could it be due to to the high GC cycle times?
About the performance it's likely the CPU which was designed for web stuff, not running game servers.
Jees how good of a server does anti xray need lol
But my server isnt maxing out or anything thats why im confused
Anti-xray likely isn't the cause but it's definitely not helping, that CPU is just old and not great. If you want to have a discussion about CPUs for running a server feel free to join our Discord so we can keep this issue on-topic and not spam people's e-mails with further unrelated comments.
Yeah sorry about that Ill close this ticket Ill look into possibly changing server providers to see if that helps. Thanks for the help and sorry for wasting your time
The methods now take an optional component that overrides the title of the container.
Multiple questions:
- What should be best done with this patch and patch 927 because they both touch the same line of code?
- Should I group the methods for openWorkbench, openEnchanting, openVillagaer and openMerchant below the respective default method or can this be kept this way?
- Does it even make sense to offer these extensions for openVillagaer and openMerchant? I just added them at the momen...
Is your feature request related to a problem?
Now the restrictions on the book are quite comprehensive, but I feel that there are still some shortcomings
Most people have a vague idea of word count
Describe the solution you'd like.
The book can save 100 pages by default, can you add an option to customize the maximum number of pages of the book, such as the maximum number of pages of 20 pages
It seems nice to give tips on restrictions
Instead of kicking out the player directly
...
The annotation should go on the int parameter but i wonder if zero really makes sense?
You don't really need addPlayer here and the boolean but the goal is to allow a and c otherwise how you would do?
For your point c you could have a #setResult(Event.Result) / e.getResult() that would bypass the player check when not set to default for example.
what i mean is that even before this commit (https://github.com/PaperMC/Paper/pull/9614/commits/dd7964fcbe11e05c7e3099e2f8443aaa3e8a649f), the list was empty at best and that your change in this commit goes against your point a and c (can't exclude players in the check if the check is done before the event).
The existing options (in the global configuration, book-size) already allow you to ensure that a book doesn't get too large for the server to handle, though the default values aren't perfect.
They are configured in bytes and not pages, because pages can have very different sizes depending on the characters used on them.
Because of this, a page limit isn't really the best way to protect against book-related exploits.
If you want to limit the page count for some other reason, a plugin can d...
So basically I won't need the cancellable in this case if I have set/getResult is what I'm understanding?
Additionally I don't know why the sync added all the other files. I tried reverting but it just added more files. Is there anyway to just remove them from this PR?
The existing options (in the global configuration, ) already allow you to ensure that a book doesn't get too large for the server to handle, though the default values aren't perfect. They are configured in bytes and not pages, because pages can have very different sizes depending on the characters used on them. Because of this, a page limit isn't really the best way to protect against book-related exploits.
book-sizeIf you want to limit the page count for some other reason, a plugi...
except it wouldn't be intutive, as theres no way to convey the limit to end users; all we can do is respond after the fact, it's not like we can display to them in some form or useful manner that they're exceeding the limit and what they're writing is going to be trashed, etc
This can consider the staled #6487 ? its like the #6898 created later.. mostly for the Wither/Golems created using blocks detect how and who build (for avoid things like try listen place blocks and spawn for try make that)
Patches #9644
Supersedes #9646
I used the same plugin i used for my issue ( #9644 ) and now it works fine.
This is my first PR so i don't really if i made these things right :)
[PaperMC/Paper] New comment on pull request #9660: Call ServerCommandEvent on Bukkit#dispatchCommand
Please do not open pull requests from the master branch, create a new branch instead.
Patches #9644
Supersedes #9646
I used the same plugin i used for my issue ( https://github.com/PaperMC/Paper/issues/9644 ) and now it works fine.
This is my first PR so i don't really if i made these things right :)
Stack trace
Log: https://pastebin.com/KqcZQsV5
Crash report: https://pastebin.com/XYVfnEZf
This exploit is different to an older one I reported: https://github.com/PaperMC/Paper/issues/9510
Plugin and Datapack List
FastAsyncWorldEdit, LibsDisguises, BookExploitFix, protocollib
Actions to reproduce (if known)
No response
Paper version
git-Paper-160 (MC: 1.20.1)
Other
No response
The exception in the log seems to be thrown from a method in the BookExploitFix plugin, can you reproduce this issue without that plugin?
This is probably just going to be the lack of a depth limit
Reproduced without that plugin: https://pastebin.com/Ln9qLwkM
[PaperMC/Paper] New comment on pull request #9661: Call ServerCommandEvent on Bukkit#dispatchCommand
Thanks for your contribution, however why are we superseding this 2 day old PR?
- moves the loading after vanilla loading,so it overrides the values.
- disables saving any forced stats, so it stays at the same value (without enabling disableStatSaving)
- fixes stat initialization to not cause a NullPointerException
b8edb0e Updated Upstream (Bukkit/CraftBukkit/Spigot) (#... - NoahvdAa
b4e3b3d Allow non-op players to execute the click event... - Sytm
Introduces a proper way to check if an ItemStack is empty just like in vanilla's code. The added isEmpty() method is even redirected into Mojang's method but an identical implementation is provided on ItemStack itself.
Also fixes an incorrect nullability annotation on getCursor.
Can't do that since it's mutabke
Good point, I guess an EMPTY static value is not necessary, it was more for vanilla parity. Now that I think about it vanilla's empty is also mutable? Well weird.
I think these two nullability fixes are a better fit for this patch: https://github.com/PaperMC/Paper/blob/b4e3b3d1dd447bac4cbf478595c1ec320bc6dd4b/patches/api/0172-Fix-Spigot-annotation-mistakes.patch
nullIfEmpty seems weird to have as a methodโฆ why is that being added?
[PaperMC/Paper] New comment on pull request #9661: Call ServerCommandEvent on Bukkit#dispatchCommand
The author of the first PR created it really fast and a comment was added one hour after its push.
As this addition will help me a lot, after 2 days without a change on the first PR, i tried doing it myself supposing that the first author didn't see the comment.
I'm sorry if this is not the way you do usually
nullIfEmpty seems weird to have as a methodโฆ why is that being added?
It's something that's more common in Kotlin code, it allows you to pick if you want to treat something as nullable or as a possibly empty item stack. But since in Java it doesn't do much I'll remove it.
Fixes #9451
(Is blacklist filtering even feasible like Machine said in the linked issue or would it be too much work to cover all edge cases?)
Filtering custom model data is a no go
Removing CustomModelData will change the look of the item for other players. That should not be added.
That's why I deliberately put it inside the hideItemmetaWithVisualEffects block
visual effects are generally more trivial things, idk how a lode compass appears differently to others if it has a pos or not, but, CMD is purely intended to allow people to change how items look in general using datapacks, etc; it being removed ever sounds like a stupidly niche edge-case at best
I've just run into this as well. The commands.yml aliasing doesn't seem to work correctly when I try to override WorldGuard's locate command to go back to the Mojang version, and it continues to use the plugin's version of the command rather than the alias taking precedence over it as described in the PaperMC documentation. The wglocate alias I've added below works as expected, and calls the plugin's version of the command.
WorldGuard an...
try adding "locate" to
commands.replace-commands in spigot.yml
I just tried adding locate to that section, restarted the server, and it doesn't seem to have had any effect.
I don't like calling this titleOverride. Even tho its just a param name, it should be something like defaultTitleOverride or something to distinguish it from the actual title override just added to InventoryOpenEvent
Use title to maintain consistency.
Use title to maintain consistency.
Adds an event that gets called whenever a LootTable rolls any loot.
There are two aspects I'm not sure about:
- Whether this should be a ServerEvent, or a WorldEvent like the LootGenerateEvent (but just forwarding the world from the LootContext location seems a bit pointless)?
- If this is the best way to implement / call such an event. The goal was to have a general event for all loot table rolls, but this implementation only covers loot generated via LootTable#getRandomItems method retur...
My rationale for calling this parameter name instead of title was that when you set the title override to "Test" you would see "Test - Novice" instead of just "Test".
I think it is better to add some additional JavaDoc explaining that.
Should I still rename the param?
Expected behavior
Displays have their own tracking range in getEntityTrackingRange:
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/spigot/commits/e4265cc8b4856f4f8fa2d2931ecdfecd9f768528#CraftBukkit-Patches/0014-Entity-Tracking-Ranges.patch
Spawning a display should use that value. Instead it uses TrackingRangeType.OTHER due to Spottedleaf's patch https://github.com/PaperMC/Paper/blob/master/patches/server/0413-Use-distance-map-to-optimise-entity-tracker.patch
Need to add a ...
These changes should already be in that patch?
What I'm implying is that you may consider modifying said patch with those annotation changes instead of having them in this one.
Not sure if this is required since the team already approved the changes tho.
tell me the name of the patch the changes are right now.
and tell me the name of the patch you want them to be.
@Sytm already beat you to the punch, I already moved them to spigot annotation fixes patch. ๐
@CodeByCam They're inactive now, but I administer the server this concerns.
Do you need a report for when the server is under load with players using ghast farms?
We'd certainly be happy for more spark reports yea ๐
https://github.com/PaperMC/Paper/issues/9585#issuecomment-1690702638
This archive seems to replicate this phenomenon as well
Reaching its destination in the archive, the ghost returns to the Overworld from the Nether
The system I use is Windows 11 Pro
https://github.com/PaperMC/Paper/assets/135555687/3245f6c0-32fa-4294-b536-2db4fca621ec
https://spark.lucko.me/QlUlf6Jzcj
Paper's Nether portal itself seems to cause a large lag, and the ghast generation speed is slower, so it will constantly unload and load the portal, a veritable lag machine.
But sometimes after the server on my other machine restarts, this lag disappears, it may be which thread is wrong, from time to time, I don't know, but I can be sure that spigot will not have s...
idk how a lode compass appears differently to others if it has a pos or not
What does this visually change?
Vanilla does not have any visual changes, but some mods which aren't necessarily cheats could behave differently.
The portal with the lower y value taking priority is intended behavior, in vanilla the list of possible portal candidates is first sorted by distance and then by height. I also reproduced this on both paper and vanilla, and the results were what you described in the observed/actual behavior both times.
I'm unable to reproduce this issue, as the schematic you provided also does not seem to be a working farm; the villagers have constant line of sight with the zombie which prevents them from sleeping. After replacing the soul sand and trapdoors with solid blocks and removing the slabs, villagers sleep normally and iron golems start spawning. The beds also have occupied permanently set to true in their nbt data, which also prevents villagers from sleeping, replacing the beds fixes that.
The ...
Is your feature request related to a problem?
Some developers expect to use the commands section in the paper-plugin.yml as they do in the plugin.yml. This is unsupported, which causes calls such as getCommand("myCommand").setExecutor(someExecutor) to fail with a NPE.
A NPE does not immediately explain the cause of the bug, namely that the developer expects to use the commands section but the commands section is no longer a feature. So the developer revisits the paper-plugin.yml, ...
Is your feature request related to a problem?
With the advent of Paper plugins, calling into the CommandMap for registration is now recommended over the plugin.yml's commands section. The CommandMap#register method exists; however, there is no #unregister method. Yet plugins would benefit from de-registering; for example, if the plugin implements configurable aliases, or if it is a dedicated alias plugin outright.
Describe the solution you'd like.
Add a CommandMap#unregister method...
Expected behavior
normal chests
Observed/Actual behavior
chests visual lag, the part of chest or full chest is disapearing only visual
Steps/models to reproduce
dont know
Plugin and Datapack List
[18:17:04 INFO]: Server Plugins (66):
[18:17:04 INFO]: Bukkit Plugins:
[18:17:04 INFO]: - AdvancedBan, ajLeaderboards, AntiCombatLog, ArmorStandEditor, AureliumSkills, Bendi...
We can't fix something we can't reproduce.
Please update your server and try reproducing the issue using vanilla client and without plugins, if you can, feel free to reply here and we'll reopen it.
If this issue is still replicable on the latest version, please attach a heap dump and we'll re-open this.
If you can still reproduce this issue on the latest version, please take a new heap dump and attach it here. Closing for now due to the age of this.
The harderdespawn plugin seems like it does exactly what you're asking, it removes mobs on chunk unload immediately, which allows you to keep the despawn ranges the same.
I don't think it should refuse to load the plugin. Either it throws an exception or a warning.
For me it makes more sense to show a warning than an exception because there is not really a "downside" of the command section existing in paper-plugin.yml.
The harderdespawn plugin seems like it does exactly what you're asking, it removes mobs on chunk unload immediately, which allows you to keep the despawn ranges the same.
Yes I know, I'm using this plugin right now, but only when the block is unloaded, the mob disappears, the bio farm is long term afk, and it may still not work well
Despawn Range (hard)
best option really would be to add an option to let the y check essentially be configu...
Is your feature request related to a problem?
I need it.
I want to identify player on PlayerHandshakeEvent.
Describe the solution you'd like.
Add player's port to PlayerHandshakeEvent.
Describe alternatives you've considered.
Bytecode Modifications.
Other
Thanks in advance.
but it doesn't break the plugin nor does it have it any notable performance downsides.
I would argue in favor of an error, since the file doesn't fit the schema and its a clear developer error
Timings or Profile link
unrelated
Description of issue
Recently I noticed that the network activity has increased quite a bit. The measurements are done with the built-in Resource Monitor in Windows.
Reproduction steps
- Create a plugin with this code, add required dependencies (to get access to the server classes you need to build NMS or paperweight), build and add to your server's plugins
// Create header and footer fiel...
just to be sure (since you put 169 as paper version), you are reporting a regression introduced by this commit https://github.com/PaperMC/paper/commit/d6d4c78e7d88f3fcd274bceab1e6b022224096ef (build 40) two months ago?
because the code you posted doesnt worth on the version before that commit since that commit brought in the async scheduler.
our sus factor is that this is on your side, i.e. you went from sending the header list packet 4 times a second (i.e. every 200ms), to sending it 250 times a seconds, 12.5 times a tick, or, every 4ms
i would say warning in dev env, in case for backwards compatable schema changes (like when folia was added)
After I switched to Windows 11 to Ubuntu 22.3, the lag spike disappeared, and I was also confused, it will only happen on Windows 11
[PaperMC/Paper] New comment on pull request #9661: Call ServerCommandEvent on Bukkit#dispatchCommand
An important note: this is a potentially breaking API change. Some plugins may rely on the behavior that ServerCommandEvent is not called by using dispatchCommand.
[PaperMC/Paper] New comment on pull request #9661: Call ServerCommandEvent on Bukkit#dispatchCommand
Mhm, yes, I was considering pinging @4drian3d whose plugin SignedVelocity relies on command and chat events. However, this PR is only for the ServerCommandEvent, so that plugin will not be affected.
Other plugins might. Really, dispatching a console command is something of a universal interface between plugins, and lots of plugins implement features that use dispatchCommand to call into other plugins in certain places when timing is appropriate: shop plugins when granting purchases, sk...
[PaperMC/Paper] New comment on pull request #9661: Call ServerCommandEvent on Bukkit#dispatchCommand
For years theres been a general contract that API calls, outside of niche cases, will not fire events; I fail to see the argument for breaking this assertion here
Sorry, I'm reporting this issue again.
I have this on both computers, they are both Windows 11, and the probability of occurrence is very high.
After I switched Windows 11 to Ubuntu 22.3, the lag spike disappeared, and I was also confused, it will only happen with Windows 11.
The CPU models are i5 11400F and i5 12400
The system uses Ubuntu 22.3, and the lag phenomenon does not occur
Closes #8947
Moves the deactivate event call into the onRemove method for the beacon block itself to prevent it from running when the block entity is unloaded. Also fixes an issue where the events were not being called when the beacon beam gets blocked.
The field I added feels a bit wrong but it works, it's to prevent the activation event being called immediately after loading, can't see any better way to differentiate between a newly placed beacon and a newly loaded one.
Discovered these during the making of #9674
[PaperMC/Paper] New comment on pull request #9661: Call ServerCommandEvent on Bukkit#dispatchCommand
I created this PR because in my opinion, an event should be fired because, as the javadocs says : "This event is called when a command is run by a non-player.". As dispatching a command with the console is running it by "a non-player", i though that it would be legitimate.
The more, this patch keeps the purpose of the event : being able to log executed commands.
I understand that maybe some ...
For readability's sake I think it would be nice to give this method a different name instead of a more arbitrary looking boolean parameter
The other method could be linked here
The scaffolding is waterloggable and when the limit of suspended blocks is reached, the block fade into air (for the BlockFadeEvent) and into water (for the EntityChangeBlockEvent/BlockDestroyEvent)
This fix an issue with mobs ignoring the silent boolean when changing their equipment using the api
Expected behavior
The event should be called only once, when the chunk is unloaded.
Observed/Actual behavior
EntityRemoveFromWorldEvent is called in a loop for minecarts that are in an unloaded chunk.
Steps/models to reproduce
Place a minecart on a rail, then make sure the chunk is unloaded (by teleporting far away).
If you have a plugin that listens to EntityRemoveFromWorldEvent, you'll see the event is fired every second.
Plugin and Datapack List
Paper version...
I am unable to replicate this on latest paper.
The plugin logic
@EventHandler
public void on(final EntityRemoveFromWorldEvent event) {
Bukkit.broadcast(Component.text(event.getEntity().getName() + ":" + event.getEntity().getUniqueId()));
}
yields exactly one unload for a minecart placed on a normal rail (placed at 10000/100/0). Both walking away from the chunk as well as teleportation to 0/100/0 only triggered a single event call. Are you sure you are not trying to l...
You're right, after looking into it again, it only seems to occur on SuperiorSkyblock's world.
I will look into it.
Turned to be an issue on my side.
Might be worth kinda just merging with the existing 0851-Add-missing-BlockFadeEvents.patch patch, beyond that, lgtm
Why is this static ?
Any chance of getting a quick review? :)
Should be a subtle change
@jpenilla, what's wrong with this PR? o.o
Thanks for the info @GoldenEdit. Are you able to provide a zip of a world (or part of) with the farm you have please?
Thanks for the info @GoldenEdit. We're aware of this issue and will hopefully be able to improve the performance around VoxelShape. Are you able to provide a zip of a world (or part of) with the farm you have please?
When reproducing this I was only running a quick test by spawning Ghasts directly into the portal.
I may be able to provide you with a WorldEdit schematic of one of the farms on a server I manage, let me know if you would like that.
This issue happens anytime a ghast enters...
Thanks for the info @GoldenEdit. We're aware of this issue and will hopefully be able to improve the performance around VoxelShape. Are you able to provide a zip of a world (or part of) with the farm you have please?
When reproducing this I was only running a quick test by spawning Ghasts directly into the portal.
I may be able to provide you with a WorldEdit schematic of one of the farms on a server I manage, let me know if you would like that.
This issue happens any...
For reference: #paper-dev message
If this behaviour is intended, feel free to close this PR, but as written in that message, I think /restart and /stop should follow the same order of operations when disabling plugins and saving players.
Some quick googling revealed that jdk.internal.misc.Unsafe.park is an internal Java function which causes the program to halt temporarily until some condition is met. In this case, it seems like some incident is doing some background calculations asynchronously which interfere with the event loop for Minecraft, causing the tick to be halted until it finishes. As for which incident, it is impossible to say without a much deeper dive
Timings or Profile link
NULL
Description of issue
I've always been bothered by the occasional lag in Nether portals
I spent two days sifting through the versions
Eventually locating to paper-1.19.2-174, which added the Rewrite chunk system, was a feat
But on Windows systems, there seems to be some lag issues,Lag doesn't happen on Ubuntu(Linux)
When I use paper-1.19.2-173 (without the Rewrite chunk system), the lag doesn't happen
I've been troubleshooting the cause for months, ...
You are running an unsupported version of Minecraft (1.19.2). Additionally, please follow the issue template in the future with regards to plugin/datapack list, config files, paper version, and profiler link.
ๆจๆญฃๅจ่ฟ่กไธๅๆฏๆ็ Minecraft ็ๆฌ ๏ผ1.19.2๏ผใๆญคๅค๏ผ่ฏทไปฅๅๆ็ งๆๅ ณๆไปถ/ๆฐๆฎๅ ๅ่กจใ้ ็ฝฎๆไปถใ็บธ่ดจ็ๆฌๅๅๆๅจ้พๆฅ็้ฎ้ขๆจกๆฟ่ฟ่กๆไฝใ
I said paper-1.20.1-169 is affected as such, please don't close
You are running an unsupported version of Minecraft (1.19.2). Additionally, please follow the issue template in the future with regards to plugin/datapack list, config files, paper version, and profiler link.
Paper version
paper-1.19.2-174.jar------>paper-1.20.1-169
This issue is similar to the one you have opened before but no extra info was provided, additionally there's another issue already opened for lag from nether portals.
This issue is similar to the one you have opened before but no extra info was provided, additionally there's another issue already opened for lag from nether portals.
I know, but I've spent a long, long, long time narrowing it down here, and I'm not a professional in this area, so please understand
paper-1.20.1-169:
https://spark.lucko.me/6l14r2WOJ3
paper-1.19.2-173:
https://spark.lucko.me/DRmVgNvR2c
paper-1.19.2-174:
https://spark.lucko.me/PHhlxPAc0f
Although the issue has been closed, I hope that the paper team will also pay attention to this issue, which is greatly appreciated.
We really have little care about windows, it's well known that file Io is much slower on that platform, and unless something shows that the issue is elsewhere, there's little we can do other than advising to maybe try to toy with the number of Io workers.
Outside of that, we'd need a trace showing all server threads when that occurs, which I'm pretty sure across the GitHub and discord, I've asked enough times that I no longer care with how much my head is spinning.
Hi, this pull requests adds the fix-javadoc-plugin to the "root" build file. It automatically adds a "finalizedBy" task for each task of the Javadoc type to get rid of the annoying "double annotations".
Before:
After:
Please do not open pull requests from the master branch, create a new branch instead.
Hi, this pull requests adds the fix-javadoc-plugin to the "root" build file. It automatically adds a "finalizedBy" task for each task of the Javadoc type to get rid of the annoying "double annotations".
Before:
After:
Here's a link to my fix-javadoc-plugin: https://github.com/mfnalex/gradle-fix-javadoc-plugin
I'm currently waiting to get it approved for the gradle plugin portal - until then, it'll only be available in my own repository.
depending on a 3rd party repo is pretty much a no-go
as for the intent of this PR, I mean, post cleanup is nice, not something I personally care about enough to introduce a plugin and such for
As said, I'm waiting to get it approved in the gradlePluginPortal(). I could also PR the whole plugin the paper repo instead? It's basically just one .kt class in buildSrc
Imho there's 4 solutions:
- We'll wait until it got approved for the gradlePluginPortal()
- I add this plugin to the paper repo's buildSrc or similar
- I can upload it to maven central
- or we just forget about it and live with the double annotations
Please let me know if you're interested in adding this at all, because if not, I don't have to waste time into getting it approved for the plugin portal and/or uploading it to maven central
I agree with lynx, can be merged into that other patch and the patch renamed to smth about adding and fixing fade events.
This is required because when changing the result for an anvil (when the event is called because of AnvilMenu.setRenameText method) to an invalid result the item is not synced back to the client
I like this on principle, but is using regex really the best approach here? Also, I guess ideally it would be fixed in the javadoc generator, anybody ever tried to chase that down?
Kinda related to stuff, I wanted to edit javadoc files anyways to add like a navigation to navigate projects and versions and add an alert if you aren't viewing latest, but I guess that would be suited better for the software who serves the javadocs
I also wanted to say that this allows the PlayerKickEvent to work with the /stop command because players are kicked before plugins get disabled and therefore the PlayerKickEvent is called.
I know that regex isnโt the best solution, I only wrote this for myself and it seemed to work just fine. I didnโt dare to take a look at the actual javadoc generation code lol
JDK-8175533 and JDK-8278592 are the only references i can find with any info.
The problem occurs with any annotation that is both a declaration annotation and a type use annotation ... for example, an annotation on a field declaration that is both FIELD and TYPE_USE.
[JDK-8278592#comment-14482841](https://bugs.openjdk.org/browse/JDK-8278592?focusedCommentId=14482841&page=com.atlassian.jira.p...
Expected behavior
When using the steps to reproduce code, the loot should populate without error.
Observed/Actual behavior
When using the steps to reproduce code, an error occurs at LootTable#populateLoot():
java.lang.IllegalArgumentException: Missing required parameters: [, , , , ]
Steps/models to reproduce
LootContext.Builder context = new LootContext.Builder(block.getLocation()); LootTable table = Bukkit.getLootTable(key); table.populateLoot(null, context.build());
...
I'm not 100% in loop with this system, but, mojang is what sets the required params for a loot table to function, this just seems like you're gonna have to supply them?
This is 100% not something that can be done mid patch release, this is more a major change in behavior in which needs to be done on a major release with proper testing to ensure that we don't break anything;
This is how this logic has worked for a decade, and while you can maybe argue that it's weird, it is a side-effect of various dozen other choices in the codebase over a decade which has left us here
So you say this could be added but this is more likely something for a new major MC version?
Or did you mean something else with "major release"?
Yea, this logic would be desirable in the long run imo, it just
a) would best fit something like, 1.21 release
b) might be best to wait for papers hardfork or be proposed to spigot.
Given that the quit/onDisable stuff has worked like this for years and most logic that relies on this logic deals with rather crucial parts of plugins (e.g. data saving) changing this mid version is rather terrible for plugin developers to update.
Additionally, given that this breaks spigot compatibility, im...
b) might be best to wait for papers hardfork or be proposed to spigot.
#6911 suggests to add a config option. Would that, assuming this is getting merged at some point, be a feasable option until a hardfork? Or is this something that better waits until the hardfork?
a config option was proposed for /stop to boot everybody, but there is no expectation that it would change event behavior, the server has stopped ticking and many things relied upon that in order to fire events, etc;
If we're going to change the behavior around this, it should just be changed without a config option, rather than having such a dangerous setting sitting around with massive side-effects
I guess that would be an option. But probably only if it's disabled per default, logically.
On the other side if you enable it and have spigot plugins that rely on the old system it breaks again. So maybe an unsupported option until Hardfork?
The API does not give access to some of those values. I believe it only gives access to direct_killer_entity and this_entity.
I don't think the bug is going to be fixed in the javadoc tool anytime soon.
I meanwhile did some improvements to the fix-javadoc-plugin. I have let it generate the full paper API docs and uploaded them here, in case anyone is bored feel free to check them out and let me know if you can find any issues (like e.g. still duplicated annotations, or maybe even missing correct annotations or anything).
As mentioned, I'd be happy to eithe...
I noticed that by default, the annotations in method parameters appear on separate lines (at least that's what happens when using annotations-java5), so I made that configurable in the task.
In case anyone wants to take a look at the fixed paper docs:
Ok so I have looked into this for a while and it seems that its not really a possibility to just check-and-print if there is a command section in the paper-plugin.yml.
It seems that a methods get a BufferedReader which is then converted to a PaperPluginMeta instance in a builder. Then its already too late to check if there is a command section because it just doesn't parse it.
public static PaperPluginMeta create(BufferedReader reader) throws ConfigurateException {
Yam...
Does node.isVirtual() work? Or similar
I too couldn't reproduce this on the latest Paper version
that was the first thing I checked. isVirtual always returns true. Wether its in the config or not.
That's because it just doesn't parse commands.
The only thing I can think of is to add a new node resolver.
However i quickly tested it with a check in the FlattenedResolver and that doesn't seem to get a commands tag either.
Ok so I did a mistake. I only defined a commands tag with no actual commands in it.
I tested it with a command defined and now it works with virtual()!
The warning is printed very early (Before the Environment log).
This PR adds a simple warning if a commands section has been found in the paper-plugin.yml file.
I am taking suggestions for the warning message since I don't know if I should include how to register commands with Paper Plugins.
I also did not know which logger I should use since I don't think a plugin logger has already been created at the time where the warning is printed.
Which brings me to the next point:
Currently the warning is printed before the server is started:
You could probably link to the docs page (https://docs.papermc.io/paper/dev/getting-started/paper-plugins#commands) that explains what to do instead.
Tbh, It's a bit worrying that people are using these plugins like this, to the point where we need to warn if they aren't even reading the documentation.
That format is still very much subject to change, and in all honesty, I would rather have some kind of warning if a paper plugin is being loaded... because those are very much still experimental and are waiting for future API.
That is a good point. But I think the one thing has little to do with the other.
I think many people are creating a Paper plugin with the MinecraftDev IJ plugin and don't even realize that its different to Bukkit Plugins. So what you suggested should probably be handled over there by adding a little warning next to the paper manifest checkbox.
You can see it in the Discord that people are even too lazy to read JavaDocs so we cannot assume that they read the docs. The best thing we can d...
And if a developer is actively handing out Paper plugins, /shrug what fun.
There are already plugins published on Modrinth using the paper-plugin.yml. I recall viewing this myself.
With all due respect, one should not publish an API to a popular project without expecting its use. The adoption of Paper plugins began as soon as a newfangled API for declaring plugin metadata was released. These shifts are not necessarily misguided, as the original impetus for Paper plugins outlined sever...
With all due respect, one should not publish an API to a popular project without expecting its use.
We do expect usage of the API, hence we published it. To collect feedback on it as we further improve it.
I don't think anyone minds people publishing paper plugins, IF they are aware of the contracts that come along with the usage of paper plugins, specifically changes to format, abi, api without backwards compatibility promises, as explicitly defined via the docs page and the ex...
There are already plugins published on Modrinth using the paper-plugin.yml. I recall viewing this myself.
Personally, I have more than 10 public plugins made based on a paper-plugin.yml, I am fully aware that there will be changes in the structure of this type of plugins in the future and I have no problem to update my projects based on the new changes.
What I don't agree is to add a warning in console about a paper plugin being loaded, because there would be users asking about the wa...
another warning in their server logs isn't going to help much.
In my opinion its generally wrong to say that "it wont help much". If we have the opportunity to make it more user-friendly we should use that opportunity I dont think a warning doesn't hurt anybody.
Another idea that had already been mentioned is that we could throw an exception instead of just printing a warning. That way 90% would actually read the message.
But I am generally against this approach since it would be kind ...
With my comment about a warning I was only referring to a general warning comment for loading paper plugins, sorry if that wasn't clear.
I am 100% on board with a warning/exception for an invalid yaml format in the paper-plugin.yml.
Closes #8462
The FollowOwnerGoal is ticked before the re-leashing logic inside Mob#restoreLeashFromSave is, which allows tamables to teleport to their owners in their first tick. This PR fixes that by also checking whether the entity has a "pending" leash before running the goal.
cant we have a general yaml format and throw if the format doesnt match? special casing this feels strange
imo better than messing around with isLeashed, given that we would not want isLeashed to yield true until the entity is assigned.
Looks good to me, I'll test the PR later today when I make it back home.
The comments can be resolved by the merger or you in time, but should not prevent the PR from being merged ๐
searchResult not SEARCH_RESULT
we should probably clone here. Mutation of this variable via plugins is rather undesirable.
Version 1.19 of the plugin is available in gradlePluginPortal(), so no separate repository is required anymore.
Closing as there's been no response, and the issue not being reproducible outside of peaceful where this is intended behavior.
The message is not relevant anymore since it's totally fine if there's no activating player. probably you can just copy the above line pattern.
The range annotation is only needed on the getter/setter
This comment is not needed, you're already in a start/end block
Missing a space between the if and (
The comment is not needed here since you have already a diff on change
The diff on change should be on the hasNearbyAlivePlayerThatAffectsSpawning line, you can merge both comments in a single one to avoid duplicate // Paper
Is it necessary to have a NotNull in there or should I change the annotation to Nullable or does it not matter?
The annotation is fine (and it matter otherwise that means the list can be null and #unmodifiableCollection on it will probably throw a NPE if that's really the case), but the message was outdated you can check with Preconditions.checkNotNull(activatingPlayers, "Activating players list can not be null"); instead
special casing this feels strange
usually it isn't really a problem to have random tags in the config.
This is rather meant as a hint that defining commands has changed.
cant we have a general yaml format and throw if the format doesnt match?
A generic exception like "invalid section <name> found in paper-plugin.yml" would just again bring the people to the discord asking what they should use instead.
The warning is supposed to minimize this.
What if, instead of checking the paper-plugin.yml for a commands section, we print a warning if JavaPlugin#getCommand() is called by a paper plugin?
@Nullable
public PluginCommand getCommand(@NotNull String name) {
// Paper start - print warning if paper plugin
if (getResource("paper-plugin.yml") != null) {
this.logger.warning("---------------------------------WARNING--------------------------------");
this.logger.warning(" Defining comma...
I can't seem to reproduce this, was this fixed already?
This server is running Paper version git-Paper-170 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: 39953cf)
You are running the latest version
Previous version: git-Paper-169 (MC: 1.20.1)
After testing, seems to work well.
However, I am a bit bleh about the naming of the event after thinking about it.
It isn't really pre-search, the "heavy" searching logic is still executed.
The backoff ticks can prevent that, but the event is not really pre- anything.
After testing, seems to work well.
However, I am a bit bleh about the naming of the event after thinking about it.
It isn't really pre-search, the "heavy" searching logic is still executed.
The backoff ticks can prevent that, but the event is not really pre- anything.
Yep, more I coded, the more I thought maybe it should just be called "SpawnerSearchEvent".
Am I bind or does it actually not allow cancellation?
It does via setResult(DENY)
that seems the nicer way for that particular usecase
not sure tho if checking for the file is the best way, idk much about the infra behind paper plugins, but there gotta be a nice instanceof check we could do
but there gotta be a nice instanceof check we could do
i changed it to
if (!(pluginMeta instanceof PluginDescriptionFile)) {
this.logger.warning("---------------------------------WARNING--------------------------------");
this.logger.warning(" Defining commands in paper-plugin.yml is unsupported! ");
this.logger.warning(" Please refer to the docs for proper command initialization! ");
this.logger.warning("https://docs.papermc.io/...
Looks good to me and works as expected. Considering the client will refuse to pick-up results that don't match the input, forcing a re-sync of the result is necessary to make the event work properly in other cases too.
You provided no type for your LootTable. By default, the ALL_PARAMS type is used, which requires all LootContextParams to be set. Craftbukkit does not handle that correctly, so you get an error.
Providing a type should fix the issue, though this should be handled better by the API.
You can use the EMPTY type for one that does not require any parameters:
{
"type": "minecraft:empty",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "m...
Adds Barrel to the LootableBlockInventory Interface as it is currently missing.
I'm assuming it's something to do with reverting patches?
Keeping that import adds maintenance burden to those maintaining the project. Leaving it as it was would mean the patch might fail if there's any changes to the imports in that line, even though it has no actual influence in the changes implemented by the patch.
TLDR; the less changes in a diff, the less likely for conflicts to occur, the easier it is to maintain.
Missing a space between the // and Paper
Missing a space at the end between ) and {
Missing a new line between the description and the return/parameters, this also applies for getSpawnerLocation and setSearchResult
You missed the constructor
Should I move the event to Block instead of Entity as well?
It's a little bit tricky since the base spawner is used by the spawner block but also by the minecart spawner, i don't mind that whatever you chose but i think people are more used to see a spawner block
What is the general opinion on this one:
#general message
(adding Cancelable which defaults to DENY)
Again, i don't know if we have a precedent for this.
Issue isn't really setCancelled(true), issue is setCancelled(false).
Does it use DEFAULT or ALLOW ?
Its a bit meh
Updated it to reflect discussed changes.
I also decided to throw a RuntimeException instead of returning null.
The only downside is that it doesn't respond to
getServer().getPluginCommand() yet.
Adds API to handle the individual experience points of a player. This is what the existing get/setTotalExperience should have been, but we never got.
I know that the implementation is kind of top-tier cursed, but thanks to the three different equations Mojang has choosen this is what it is. If something like this is not desired in Paper just close the PR, although it would be nice to have.
I have tested this method up to I think it was around 39,000,000 experience points/level 2961 an...
if we pull this, we def need a link to some documentation here
is there no way we could call a vanilla method that does something like this?
Well, I pulled the equations from the Minecraft Wiki tbh. Sadly, the player experience is only stored as the level and the progression towards the next level as a float from 0.0 -> 1.0.
If you were to collect experience ingame the points are first converted into progression and then added to the current progression.
what is the difference here to the other method? that should definitely be documented on both methods, old and new, so that we dont leave people guessing or having to look at the code (which I cant right now, hence the question)
To quote the JavaDocs for the existing methods:
Gets the players total experience points.
This refers to the total amount of experience the player has collected
over time and is not currently displayed to the client.
As far as I can tell the curren...
Enforces the nullability when setting a Sign Line with the Adventure Method
Expected behavior
PlayerInventorySlotChangeEvent should trigger when swap item with offhand in container
Observed/Actual behavior
PlayerInventorySlotChangeEvent not triggers when swap item with offhand in container
https://youtu.be/A3zPAAu2l8w
Steps/models to reproduce
@EventHandler()
public void onSlotChange(PlayerInventorySlotChangeEvent event) {
Player player = event.getPlayer();
ItemStack oldItem = event.getOldItemStack();
ItemSta...
use com.google.common.base.Preconditions.checkNotNull(line, "Line cannot be null");
please don't use imports. Use Full Qualified Names instead.
Replicable, issue is that the chest menu in this case simply does not define a slot for the player off hand.
Only the chest content and the 4 rows in the main player inventory are considered.
I am unsure how nicely this is fixable, I'll leave this up for further discussion tho, might just not be a very fast / possible fix.
Adds an overload to World#rayTrace and World#rayTraceBlocks that accepts a Predicate. Blocks that match the predicate are ignored for collision calculations.
You provided no type for your LootTable. By default, the
ALL_PARAMStype is used, which requires all LootContextParams to be set. Craftbukkit does not handle that correctly, so you get an error.Providing a type should fix the issue, though this should be handled better by the API.
You can use the
EMPTYtype for one that does not have any parameters:{ "type": "minecraft:empty", "pools": [ { "rolls": 1, "entries":...
just drop a link to that page in the code then, then people know where the magic numbers come from when reading the code
3e44821 Improve java version check - MiniDigger
[PaperMC/Paper] New branch created: feature/improve-java-version-check
misses a proper link to the docs site
tested with these things:
D:\IntellijProjects\PaperClean\run>D:\Programms\graalvm-ce-java19-22.3.0\bin\java.exe -jar paper-bundler-1.20.1-R0.1-SNAPSHOT-mojmap.jar
Starting org.bukkit.craftbukkit.Main
System Info: Java 19 (OpenJDK 64-Bit Server VM 19.0.1+10-jvmci-22.3-b08) Host: Windows 11 10.0 (amd64)
D:\IntellijProjects\PaperClean\run>D:\Programms\graalvm-jdk-20.0.2+9.1\bin\java.exe -jar paper-bundler-1.20.1-R0.1-SNAPSHOT-mojmap.jar
...
[Paper] Branch feature/improve-java-version-check was force-pushed to `f2ed0a0`
I cant figure out why the diff is so messed up in the chunk patch, somebody pls handle that on merging, I g2g
I'd probably argue that, if we are adding a new patch for this, this change should be in the added patch as well.
Fixing it in two places makes dropping a patch harder / knowing what the patch/fix entails.
Not too sure on it tho, I hope we can get some PRarathon started this weekend and I'll get back on this :+1:
Might be nice to put this behind a config option so that it isn't immediately enabled, proxies and chat signing is still a bit iffy
This globalConfiguration variable isn't needed
Adds Foiled/Glow API using NBT.
Possibly can add the API to the Overrides for the default items that are foiled.
Relevant:
#5274
Also not sure if this is going to be relevant due to #8711.
P.S. For some reason Patch 1018 was edited and it says it removed something? I also can't rebuild or apply new patches after rebuilding the first time which is confusing to me.
@MarkusTieger Any chance you could revisit this PR and address Owen's comment? If you don't have time to update it we could update/supersede this ourselves.
I honestly think this might be best to keep for property API.
There is certainly a need for "glowing" but given that mojang does not support this natively without the empty enchant array, exposing this to the API seems a tad bleh, we are kinda just hacking for the plugin user abusing the "quirk" that the client still displays enchantment glint on an empty but present enchantment array.
imo it is a mistake to promote this to a stable API interface like ItemMeta. The property API would ma...
Thank you for your contribution, however yes I am more inclined to side with lynx's comment... especially with the sensitive nature of itemstacks currently.
This will also need to be added to the CraftMapRenderer class
There is certainly a need for "glowing" but given that mojang does not support this natively without the empty enchant array, exposing this to the API seems a tad bleh, we are kinda just hacking for the plugin user abusing the "quirk" that the client still displays enchantment glint on an empty but present enchantment array.
So is the client not detecting the following server code?
public boolean isEnchanted() {
return this.tag != null && this.tag.contains("Enchantme...
I'm wondering whether it might be nice to have a system property for this instead of an option so that it can be set by hosts, though I doubt many of them use the restart command
Forgot to remove a sysout here, also paper comments inside paper comments
CreativeModeTabs#streamAllTabs can be used here
@MarkusTieger Any chance you could revisit this PR and address Owen's comment? If you don't have time to update it we could update/supersede this ourselves.
Sorry, i completely forgot about this pr. I will update it tomorrow and address the comments...
I think it would be best to move all this logic to before the instabuild check on line 20, so that the event is called before data is created & saved. We could create a map item manually and add the next map id (without incrementing the counter incase of cancellation) to the tag, then replace that MapItem#create with MapItem#createAndStoreSavedData and pass in the itemstack from the event.
It would be nice to expose the original itemstack here as phoenix commented
Missing newline between fields and constructor, also missing space between the () and { in two spots
Only partially replacing blocks in the chunks would make the anti-xray effectively useless, mode 3 was added shortly after this issue was opened and addresses some of the drawbacks mode 2 has.
I haven't seen anyone else with this exception on recent versions, so this issue is likely already fixed by vanilla. Looking at the code, it seems like it'll now log a warning instead of throwing like it did before.
People who experience villagers suddenly suffocating should open a new issue if still replicable, as that isn't really related to the original issue reported here.
It might be nice to add an ItemStack parameter to setInLove to pass the copy through, DoNotUse could then be added to the old signature in case of updates.
From what it seems from testing, the glowing is handled by the client and the conditions as well so any server side changes won't impact if an item glows.
Marking the current methods as obsolete just because of the return value seems a bit "strict" to me, imo the new methods could just be referenced in a seeAlso javadoc comment
Does the memory type api not cover this? I know MM has a PR to expose more memory types.
Stops desync (most likely caused by latency) in the event of a player updating a block which the server hasn't recognized as a sign.
Please do not open pull requests from the master branch, create a new branch instead.
Stops desync (most likely caused by latency) in the event of a player updating a block which the server hasn't recognized as a sign.
The SpawnerSpawnEvent#getSpawner can become null when the spawn is done from a minecart spawner
and the HangingBreakByEntityEvent#getRemover doesn't seems to be null even when the entity is damaged by an explosion.
Do you have any link to a place this issue you're fixing has been reported at and/or reproduction instructions? As it stands, this PR has a few issues which makes it not mergable:
- Sending a block entity update packet doesn't do anything in terms of desync
- This will cause an NPE if there is no block entity where the client thinks there is one
- There is no range check done
Expected behavior
Entities riding other entities should teleport without issues by end gateway within the same world.
Observed/Actual behavior
Entities riding other entities can't teleport.
Steps/models to reproduce
Plugin and Datapack List
Server Plugins (0):
[23:16:47 INFO]: There are 2 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)]...
Expected behavior
A detector rail is only triggered when a minecart drives over it.
Observed/Actual behavior
Detector rail is sometimes triggered when a minecart drives next to it.
Steps/models to reproduce
YT-Video: https://www.youtube.com/watch?v=frW0af0Dhbs
Litematica schematic: detector rail bug.zip
Plugin and Datapack List
Bukkit Plugins:
GriefPrevention, Multiverse-Core, Multiverse-Invent...
If you need something to test:
https://github.com/MarkusTieger/Velocity/tree/dev/3.0.0
(from an older velocity pr, that wasn't merge because it broke the api. I updated it and it still works fine. Velocity 5.0.0 does support uds, but not 1.20.1)
Known vanilla issue, can be tracked here for sure.
Avoids block change acks for blocks which are potentially out of a players reach.
Can you please further explain your change here? This part of the code is rather sensitive, and would appreciate why exactly you are making this change here.
Since, you are eliminating two places where the block ack occurs. But it doesn't really make sense why these acks should be cancelled, as if the client does introduce something like this (which may be due to a desync) it would make sense to do this ack to revert it clientside.
Additionally, you are missing Paper comments.
What would you name the config entry for this?
And I am using this for a few months now and have no problems at all behind my velocity proxy (and without) and the chat is working as it should even with a custom chat format and (when modified) with modified messages.
I think this is obsolete (for developers) now with the introduction of the new PlayerFailMoveEvent
Failed to check out the right branch... again...
I'll close this and move it to a new pr... again...
Can you please further explain your change here? This part of the code is rather sensitive, and would appreciate why exactly you are making this change here.
Since, you are eliminating two places where the block ack occurs. But it doesn't really make sense why these acks should be cancelled, as if the client does introduce something like this (which may be due to a desync) it would make sense to do this ack to revert it clientside.
Additionally, this causes a bit of a desync a...
Fixup of #9183 and #9256
Prebuilt jar for testing: https://workupload.com/file/y9Fg4uQ4YCz
Is your feature request related to a problem?
There is missing documentation for the SCULK and SCULK_CHARGE particles in the Javadocs; there's no information on the required data for these particles.
SCULK particles have integer data for a delay (in ticks I believe) and SCULK_CHARGE have float data for a "roll" which just basically rotates the particle
Describe the solution you'd like.
Added documentation for these particles
Describe alternatives you've considered.
I've co...
Don't link to jars pls, we have a label for that
The enforceSecureProxyProfile setting seems unnecessary when you can just toggle the setting in server properties?
You are free to benchmark this on your OWN, this benchmark from my part was done on DonutSMP events, that get around 700-800 players in a close 400x400 area where there's a lot of Crystal PVP everywhere, lots of chunk interactions etc, compression is highly necessary on environments like this, and a few servers also use this, it's a quick change and most users shouldn't ever feel any need to have this changed but it's a good software improvement if you confirm this should be applied.
This ...
Please do not open pull requests from the master branch, create a new branch instead.
You are free to benchmark this on your OWN, this benchmark from my part was done on DonutSMP events, that get around 700-800 players in a close 400x400 area where there's a lot of Crystal PVP everywhere, lots of chunk interactions etc, compression is highly necessary on environments like this, and a few servers also use this, it's a quick change and most users shouldn't ever feel any need to have this changed but it's a good software improvement if you confirm this should be applied.
T...
The enforceSecureProxyProfile setting seems unnecessary when you can just toggle the setting in server properties?
removed
You might want to merge the patches tho
My finest work yet. Just a simple way to fetch the time an EntityDamageEvent happened.
This should be merged into the original patch 0706-Use-Velocity-compression-and-cipher-natives.patch, ideally adding a config option for the compression level with the default staying -1 as the middle ground between performance and compression level
is this different to calling System.currentTimeMillis(); in your event handler?
or maybe a stupid suggestion, if its useful here, wouldnt it be useful in every event, as an interface / smth
I mean, for most intents and purposes, the difference will be minimal unless you're posting that off async; time millis is generally fast enough, so it's not a big deal but I don't exactly see an inherient advantage here; isn't this one of the things that mojang stores a timestamp for the packet?
Well, the issue is that it more leaves the client in a "still predicting" state even after the block break has finished.
If there is ever API for DamageSources and the CombatTracker, I could see a timestamp added to each DamageSource being useful, because then time, involved entities, direction and type of each instance of damage received would be together.
But currently I fail to see the advantage over just listening to the event and storing the timestamp yourself.
Vanilla only tracks combat start and end time as well as the time since the last attack, not timestamps for individual damages.
But currently I fail to see the advantage over just listening to the event and storing the timestamp yourself.
Mostly it's because this is a trivial object addition to an event whereas one would need to start managing HashMaps etc for this would would certainly be more effort, memory cost, and the like. It's certainly not a vital addition but I could see it being useful for others. All else fails I'll just continue using it in my fork.
This should go into the missing entity API patches, beyond that, LGTM.
Expected behavior
I am aware that I'm running a fork of paper, if this is an issue for you then I don't know what to tell you, this works on paper as well, if you don't want to patch this simply because of me running a fork then that's fine.
[20:49:37] [Server thread/ERROR]: Failed to handle packet net.minecraft.network.protocol.game.PacketPlayInWindowClick@2e16f2ab, suppressing error
net.minecraft.ReportedException: Container click
at net.minecraft.world.inventory.AbstractConta...
Thanks for the report!
...this works on paper as well...
Have you reproduced this whilst using the latest Paper jar, without any plugins? If so, can you please provide your latest.log (found in your logs folder).
heya!
would be great if you could put the stack trace in a code block for better readability.
To patch this, in the AbstractContainerMenu's doClick method when the action type is quick craft it tries to get the slot from an array based on the slot that was sent in the packet, the default minecraft server (and spigot, paper..) allows slots -1 and -999 to go through but don't validate that slot in the doClick method before trying to get it from the slots list which throws an IndexOutOfBoundsException
As I don't have time to whip up my own client right now and figure out how to cause ...
The server does not crash with that error
Please do not open pull requests from the master branch, create a new branch instead.
fixItemsMergingThroughWalls
c9cd94f Fix fixItemsMergingThroughWalls check (#9707) - s-yh-china
Expected behavior
Endermite cannot attract Enderman through hatred
Observed/Actual behavior
Endermite cannot attract Enderman through hatred
Steps/models to reproduce
Endermite cannot attract Enderman through hatred
Plugin and Datapack List
vanilla file/bukkit
Paper version
paper-1.20.1-174
Other
This problem only occurred after I upd
Please provide actual reproduction instructions, how are you summoning the endermite? Only ones spawned naturally will attract them
Please provide actual reproduction instructions, how are you summoning the endermite? Only ones spawned naturally will attract them
The Enderman monster spawning tower I originally used can be used normally.
When I update the paper version, it can no longer be used.
Monsters occur naturally
When I actually tested Endermite's hatred value, there was less than 10 blocks left.
The wiki says there is a 64-frame range
Fixes MC-868
Adds a check if distance between minecart and detector rail is less than maximum distance of the centre of a blcok to the edge of a block (0.5)
Closes
#9698
Throughout the MC codebase to avoid the math.sqrt function (expensive) the distance checks are made on squared values.
If the classic formula is math.sqrt((x2-x1)ยฒ+(y2-y1)ยฒ) < limit
then removing sqrt on both sides of the equation leaves (x2-x1)ยฒ+(y2-y1)ยฒ < limitยฒ
The ...distanceSquared function should be somewhere in vanilla. Please double-check me on the 0.5dยฒ value.
I don't have much time to do this and I also haven't touched much of the patch system, if anyone else who wants to become a contributor of the project wants to take this on, feel free to do the required changes ;)
Expected behavior
Calling Projectile#setShooter with a null value as the shooter should remove the shooter from the projectile
Observed/Actual behavior
Shooter is not removed from the projectile
Steps/models to reproduce
- Add this listener to a plugin:
@EventHandler
public void onLaunch(PlayerLaunchProjectileEvent event) {
event.getProjectile().setShooter(null);
event.getPlay...
The server does not crash with that error
Indeed, however is does make it so users can pretty much spam as many window click packets as they want I believe
Supersedes #9703
As from the author requested: Here a new version with the correct patches and a config option.
The config option is located under the misc section. I did not know if I should change the version of the config but that should not stop this PR from being merged.
Is it possible to add people as co-authors so the original author also gets credits?
Closing due to reasons mentioned above, and in general this leaves the client in an invalid still predicting... state.
Closing this as in general it's not really certain what you are trying to fix here. Feel free to respond with a more detailed description of your changes, but it's not really understood what kind of "desync" this is resolving here.
Don't think we need to update the version here
Would probably be better to use IntOrDefault here.
-1 yields default compression for the zip deflater as well as for the native ones velocity implements (6 iirc)
We don't yea. Version bumps are only needed if we need a migration to be run on existing data.
fb06829 Optimise multiple block updates occurring in th... - Spottedleaf
You can generally add a coauthor by simply adding their name into the patch, see e.g. https://github.com/PaperMC/Paper/blob/master/patches/server/0872-Fix-a-bunch-of-vanilla-bugs.patch#L60
the placement of the option is ok or should I move that as well?
yea :+1: imo it is.
Ok so I have tried this and I don't seem to be able to do that.
It tells me that No TypeSerializer found for field compressionLevel of type class io.papermc.paper.configuration.type.IntOr$Default, before it just did not want to create the misc section at all.
To my eyes I have made everything like where it is already in use.
The updated GlobalConfiguration variable:
public IntOr.Default compressionLevel = IntOr.Default.USE_DEFAULT
The updated line in `Connection#setu...
Very likely related to https://github.com/PaperMC/Paper/commit/72e87abc2db813ecd74a323c33a7b9c79b0c67b9
Simple replication build:
On build 171, nearly all endermen instantly run towards the endermite in the minecart. On build 175, the vast majority of endermen just stand around idling on the platform on the left, not trying to attack the endermite.
Ah so i think this is why:
https://github.com/PaperMC/Paper/blob/master/patches/server/0005-Paper-config-files.patch#L1166
(only the world-config has the IntOr Serializers registered)
What are we doing now? Should we create a separate PR adding the stuff to the global config or should I include that here?
[PaperMC/Paper] New branch created: brain-activation-distane
Based on https://github.com/TECHNOVE/Airplane/blob/ver/1.17/patches/server/0010-Dynamic-Activation-of-Brain.patch. Modified to not have to manually patch every new entity using Brain (other than adding new config defaults), also skipping unnecessary activity checks
DAB(Dynamic brain activation) drowns AI entities far away from the player.
https://youtu.be/B0kRxuuwQ88
Same Issue: https://github.com/pufferfish-gg/Pufferfish/issues/58
I spent a lot of time fielding complaints from players about this: entities in the distance behaving dumbly (piglin brutes being basically pacifist sometimes), mobs dying for all sorts of reasons (see above) like drowning or suffocation, mobs not reacting properly to plugin actions (like being statue-ified for a bit after teleporting), lots of normally Paper-compatible and fairly innocent farms sporadically and unpredictably breaking, or becoming so slow or stuck at typical distances that it ...
eyes too hurty to say much, but, stuff like that video is basically in part why EAR 2.0 exists, if we want to do this, we'd probably want to look at adopting a similar set of concepts
[PaperMC/Paper] New branch created: brain
Honestly yeah I agree after looking into it some more, even defaulting to false seems weird with an option that just breaks entities this hard. Here's non-compromising performance improvements I added put into its own patch (keeping this pr as is for history purposes): https://github.com/PaperMC/Paper/pull/9713
[PaperMC/Paper] branch deleted: brain-activation-distane
Need to double check whether this is safe (probably not, if behaviors can stop without changing activity, intended to just rerun)
@Leguan16 good job ;), it'd be nice if paper added on the docs examples of the available compression options with example of rates, as a benchmark of course, this should benefit a few servers a lot with bandwidth decreasing as well as more performance and cost decreasing :)
This does require a PR to the docs before it may be merged yea. @Leguan16 if you have the time, it would be great if you can propose the change there as well :+1:
I can add a description to the global-configuration.mdx what it does but I have no time to benchmark this and create a proper docs page for it. Besides, I don't even know how I should benchmark this.
@PedroMPagani you seem to know what it does exactly so what should I put in the description (So I have it correct)?
I don't see the usage for benchmarking on the docs. A quick explanation that a higher compression level means more CPU time spend for less data transmitted and a lower value meaning less CPU time spend but more data transmitted is fine.
Alright! I will add that later.
Expected behavior
Whenever an entity goes onto a wire connecting two tripwire hooks, there should fire two induvidual BlockRedstoneEvents for the two related tripwire hooks.
For example, when an entity goes onto a tripwire with one end having a tripwire hook facing east, and the other end a tripwire hook facing west, then there should trigger a BlockRedstoneEvent once for both of the tripwire hooks.
Observed/Actual behavior
Only the east facing and north facing tripwire hook sho...
When a plugin uses Projectile#setShooter(null), the projectileSource will be nulled out, but the cached owner & owner uuid won't be. Additionally, the projectileSource will also be filled back in the next time Projectile#getOwner is called.
This includes the mentioned collision patch https://github.com/PaperMC/Folia/pull/153
When preventing players from moving into unloaded chunks; I would argue that if a scenario arises where the player is attempting to move to a chunk which is indeed loaded, but is sandwiched between a one or more unloaded chunks it would be more beneficial for the method to return in a place where a warning message is explicitly logged rather than just silently not allowing the movement.
This can be done by ensuring that the location of the movement resides in an unloaded chunk.
No comment from me on this PR, There is no reports of this actually happening, I don't see a point of "fixing" such a hypothetical.
Expected behavior
A redstone pulse gets emitted whenever a player on a lectern changes the page of the book in the lectern. This should throw a BlockRedstoneEvent.
Observed/Actual behavior
No event occurs at all
Steps/models to reproduce
Make a testplugin with the following listener
@EventHandler
public void onBlockRedstoneEvent (BlockRedstoneEvent event){
plugin.getLogger().log(Level.INFO, event.getBlock().toString());
}
Create a book...
Stack trace
[14:29:48 ERROR]: Failed to handle packet net.minecraft.network.protocol.game.PacketPlayInUseItem@37288ab, suppressing error
java.lang.IllegalArgumentException: Expected packet sequence nr >= 0
at net.minecraft.server.network.ServerGamePacketListenerImpl.ackBlockChangesUpTo(ServerGamePacketListenerImpl.java:2195) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:1986) ~[?:?]
at net.minecraft.netwo...
Is your feature request related to a problem?
There are some cases in which BlockState is provided but it's not "fine". Fine in terms of being able to invoke BlockState#update.
One of such cases are https://jd.papermc.io/paper/1.20/org/bukkit/structure/Structure.html
Structures have a Palette, a BlockState collection with each BlockState having its Location as an offset from an origin.
There's an issue with Structure#place. This is done in a single tick and this affects performance (m...
the player send a wrong packet. unless this can be reproduced with a vanilla client on latest paper, there is not much we can do.
No comment from me on this PR, There is no reports of this actually happening, I don't see a point of "fixing" such a hypothetical.
I wouldn't really refer to it as a "fix" per say, more just a slightly more elegant way of handling things. I would imagine a scenario like this would most likely arise out of a client using some form of movement hacking in which case it would probably be better to log as either "Player moved too fast" or "Player moved wrongly" rather than just returning sil...
A vanilla client won't ever send a sequence that's less than 0
The server after receiving the seq < 0 kicks the player but for any reason the server throws a IllegalArgumentException
I disagree that allowing clients to seemingly teleport through unloaded chunks is a more elegant way of handling this than the current implementation.
I don't think we are interested in this fix, I hope you can understand where we are coming from here as this is a non issue you are trying to fix.
Thanks non the less!
the player send a wrong packet. unless this can be reproduced with a vanilla client on latest paper, there is not much we can do.
Gotcha. The player was using a modified client so you hit the nail on the head. Feel free to close this issue if there is nothing to be done. Thanks!
Is your feature request related to a problem?
While the option to prevent players from moving into unloaded chunks does exist. I think its reasonable for a single check to made regarding weather or not the chunk which contains the destination of the movement is loaded or not. As I think its agreeable that having a player moving into a chunk which is supposed to loaded but hasn't yet is almost certainly unwanted behavior.
In high latency conditions where this is most likely to occur, ...
I don't see the point here ? The reason this is a config option is explicitly to allow moving into unloaded chunks if wanted.
This issue just asks for this option to be effectively useless ? Server owners that do not want players to move into unloaded chunks can simply enable the configuration option.
Can you please elaborate what exactly the usecase of this issue is beyond just, well, effectively making the configuration option useless and just enabling its behaviour by default without a...
The config option will take any and all chunks between the clients current position and their final movement position and continue checking them until a chunk is unloaded from my understanding the goal of this behavior is to trade more rubberbanding for a more stable TPS. Some server owners might not want to make this tradeoff and hence leave the option in its default state. What I'm proposing is a singular check done not on all chunks in between but rather only the destination chunk, rubberb...
I mean, this seems like an edge case right ?
For this to actually have any effect you'd need to
- be fast enough to skip an entire chunk in a single move packet. Elytra and boats might do this.
- the chunk you skip into has to be loaded while the chunk you skip has to not be loaded.
- 1 & 2 need to consistently occur, a single move packet landing you in an unloaded chunk would still rubberband you back.
At these speeds, it'll still be a noticeable rubberbanding effect if you are...
Expected behavior
Normal treasure map
Observed/Actual behavior
i see the empty treasure map, with no X or dot on it
Steps/models to reproduce
i dont know how to reproduce it
Plugin and Datapack List
[20:31:04 INFO]: - AdvancedBan, ajLeaderboards, AntiCombatLog, ArmorStandEditor, AureliumSkills, BendingGUI, BetterRTP, BetterStructures, BlockRegenerationPlugin, BlueSlimeCore
[20:31:04 INFO]: BossCooldownPlugin, ChatBubbles, ChatEx, Chunky, Citizens, ClansLite, CMILib, ...
I mean, did you disable treasure maps in the world config ?
Beyond that, can you provide the world or the level.dat of the world so we have anything to replicate this ?
There is not much we can do with a bunch of plugins running and 0 info to start from.
FYI, I sometimes do have this problem too, but in a vanilla singleplayer world. Might be something that can be fixed on Paper, but as mentioned, this may be a Minecraft thing.
If the game canโt find an unvisited buried treasure within a set radius, it is just an empty map. It wonโt keep looking forever. This is vanilla behavior and so it can happens on Paper too.
Yeah I guess it is a bit of an edge case, although I think it raises the question of why we even need to construct an AABB which encompasses all chunks in between the player and destination, if its very unlikely that more than one check is needed to determine if the player lands up in an unloaded chunk, while at the same time opening up an opportunity for players with malicious intent to create lag by spamming out movement packets in chunks far away from their current location, racking up lar...
Could we add a chat message that tells the player that no treasure was found?
Or console message (warning/error)
I mean, I agree with your first block, limiting the full AABB chunk loading search and simply deeming a move packet invalid if the player were to skip too many chunks might be a worth concept to explore, spigot already has the "moved too fast" checks, this could simply live after instead of before said checks.
However, I disagree with an option for this that server owners do not have to enable. Adding checks like that without owners specifically enabling them would break existing setup...
Ah okay I understand your points of concern.
Although I am interested in exploring this AABB thing further. Thinking about it more, I would argue that there are more cases where simply checking the destination chunk is better than expanding an AABB, obviously there's the micro optimization of having physically having to do less work, however I believe this also ties into a point I made in this PR - https://github.com/PaperMC/Paper/pull/9717 about having messages logged to server console. ...
I mean, the point of the current check is to prevent what you proposed in this issue: Skipping unloaded chunks.
This is intended behaviour right now and I'd argue it is expected behaviour. Being able to teleport through unloaded chunks when the option to prevent movement through unloaded chunks enabled, seems odd.
The fact that these single move chunk skips exists, is merely a result of the fact that networking exists and we only get these packets in a given interval, not continuously....
To me it feels like the placement of this check above all other checks if kind of to act as a short cut out of the other checks, I don't know I could be wrong about this but intuitively it feels like doing a check to see if the chunk the player is moving into is even loaded is an obvious first step to determining if a movement is valid or not. To me it just feels like a check like this is an easy to to circumvent needing to do other checks later down the line, and therefore should be done fir...
I mean, the first check should just be the distance check imposed by spigots moved to quickly.
The chunk checks are stupidly fast given they evaluated the ticking thread and don't need to acquire locks.
The AABB usecase is certainly more than most people will need when they move a single chunk, but it is not much overhead for it either. Moving a single chunk will realistically only end up with the single check anyway + the few calculations to get there, which is a couple multiplications a...
i check my world config tomorrow, but, i can't explain how can i share you my world, it's 30-40gb size.
As machine said, there might simply not be a treasure around in the max radius.
You can simply share the level.dat that includes the seed any any other generation configs. No need to provide the entire world.
However, please make sure that this does not happen on the world in vanilla (generate the world in vanilla by copying the seed, go to where you found the map, see if it finds something), as that would suggest that well, you might have been out of luck.
and i provide the level.day tomorrow too
I was able to figure out a way of going around it. It forces using reflection. I'll provide details:
In a nutshell, it requires exposing in the method both CraftBlockState's "position" and "world" fields.
Then in the new method (as I suggested as an approach), which would be update(boolean,boolean,@Nullable Location)
the idea would be that if Location is null, to execute as it normally does. Else, if injected dependency Location is not null, it would make an instance of BlockPosition pas...
Ah okay I understand (sorry it was quite late last night while writing and I think I slightly misunderstood your proposal) I think what you have suggested offers a good compromise between all the different ideas which have been thrown around here.
Still encounter this bug in 1.20.1
Maybe try this case: build a piston (normal or sticky), and then keep this piston running. Then build a nether portal nearby, and wait random times. StarLight will receive a ChunkPos#toLong = -1, and then crash the server.
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 33
at it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap.rehash(Long2ObjectOpenHashMap.java:1297)
at it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashM...
Potentially mergable with the other fix we have, https://github.com/PaperMC/Paper/blob/master/patches/server/0960-Refresh-ProjectileSource-for-projectiles.patch.
Otherwise, LGTM
Could probably get rid of the somewhat ugly check here by just
final int currentRedstoneLevel = state.getValue(LecternBlock.POWERED) ? 15 : 0, targetRedstoneLevel = powered ? 15 : 0;
if (currentRedstoneLevel != targetRedstoneLevel) {
final org.bukkit.event.block.BlockRedstoneEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(world, pos, currentRedstoneLevel, targetRedstoneLevel);
if (event.getNewCurrent() != targetRedstoneLevel) {
r...
Merged the two patches and added you as a co-author to the missing entity api patch :+1: LGTM
Can you also fix the faulty javadocs of the old setResourcePack methods that do not FQN the Component ?
Given we don't import them, the javadocs link to the wrong method rn.
6378792 Add Barrel to LootableBlockInventory (#9687) - TreemanKing
7145f41 compression level change with config option (#9... - Leguan16
Closes #9714
Previously the BlockRedstoneEvent was called for every update even non redstone related one and was always unpowered (15 -> 0). Now only two events at least are called (four when cancelled, i'm not 100% sure about) and the redstone current changes are properly respected.
Probably some obfhelpers for flag3 and flag5 would be nice to have here, and in the if statement added above as well.
29d1c7b Call BlockRedstoneEvents for lecterns (#9721) - Warriorrrr
Trigger ServerCommandEvent in Bukkit.dispatchCommand, if the event is cancelled Bukkit.dispatchCommand returns false.
Related issue
#9644
I hope I am doing it right, it's my first time contributing to a project
Please do not open pull requests from the master branch, create a new branch instead.
Can you merge this into https://github.com/PaperMC/Paper/blob/master/patches/server/1032-Call-BlockRedstoneEvents-for-lecterns.patch, rename the title to something like "Call BlockRedstoneEvent properly" or something the likes ?
Don't forget smack yourself as a co-author :pray:
Trigger ServerCommandEvent in Bukkit.dispatchCommand, if the event is cancelled Bukkit.dispatchCommand returns false.
Related issue
#9644
I hope I am doing it right, it's my first time contributing to a project
This breaks (possibly) expected behavior for the detector rail as it currently operates. I created the setup below and summoned a minecart at varying points on the track horizontally. In vanilla, I could spawn it on 3/10ths of the adjacent block and it would still trigger the detector rail. With this PR, the position has to be within the detector block x/z coord.
Hi, welcome to paper!
Thank you for the contribution, however the issue you are trying to fix is already being tackled by two open PRs :sweat_smile:
Beyond that, it seems like you ran into some trouble with the patch system, an updating to the Bukkit module is not really how the repository works for paper-specific code.
If you find another issue you want to work on, feel free to stop by our discord for some help with the patch system if you need it :)
Tha...
This breaks (possibly) expected behavior for the detector rail as it currently operates. I created the setup below and summoned a minecart at varying points on the track horizontally. In vanilla, I could spawn it on 3/10ths of the adjacent block and it would still trigger the detector rail. With this PR, the position has to be within the detector block x/z coord.
From testing that I did prior to posting the PR, I used the sqrt(2) as the maximum distance (centre to corner). When I had used ...
I can still reproduce this, was also able to get it to fire 3 times sometimes
Still missing some paper comments, will give this a test later today
Missing space between the if and (, same for the diff below
Some paper comments are still needed here
Any news on this? If there's still something that needs changes before being able to merge, I'd be happy to hear them.
Pretty much the same thing as this: https://github.com/PaperMC/Paper/blob/29d1c7b60244bb002d29a5dcfc9c995019f550ab/patches/server/0281-Don-t-allow-digging-into-unloaded-chunks.patch#L4 just for ServerboundUseItemOnPacket. There isn't really a need to use up any more time handling the packet if its in an unloaded chunk.
Null check here can be removed here and in the other spot, the instanceof takes care of it
Thank you for your third attempt at ensuring unloaded chunks stay untouched!
As with the two previous ones, this one does not look particularly bullet proof.
If you want to contribute to paper, maybe check for some easier PRs first before touching such delicate logic :+1:
To potentially save you and us some more time, none of these changes are going to be backported to 1.19 or Folia.
The version is end of life and will at best receive critical bug fixes.
Thank you for your contribut...
Closing this, after further thought the performance optimization here is probably not worth spending time on a potential PR.
[Paper] Branch feature/importing-data-files was force-pushed to `16ef569`
[Paper] Branch feature/importing-data-files was force-pushed to `c88745b`
eb60bff Create raw chat type as resource file instead o... - Machine-Maker
[PaperMC/Paper] branch deleted: feature/importing-data-files
Fixes https://github.com/PaperMC/Paper/issues/8954
Takes advantage of modifying default vanilla resource files to change all the bedrock roof/floors to a custom condition source that accounts for the world config.
Supersedes https://github.com/PaperMC/Paper/pull/8955
We don't have to stick with upstream's ridiculousness in adding redundant public keywords to interface methods. For new methods, just don't include that.
Not a fan of this because it just overwrites what they entity might have the level set to. I didn't know the title came with a suffix. Calling it name then is fine since its not the full title. People can manipulate the Merchant if they want to change the level. (I see there's no API for that for the custom merchants, just the entities but that can be added)
I think instead of this diff, you can just create new instances of SimpleMenuProvider and pass in the new Component title. That way it avoids all the diff in this methods and doesn't add yet another local var that is related to a title.
The rest of the API uses checkArgument so the exception is of the IllegalArgumentException type instead of NPE, but idk how big a deal that is.
[Paper] Branch feature/improve-java-version-check was force-pushed to `10dc7de`
I cant figure out why the diff is so messed up in the chunk patch
It's gonna be something relating to whatever patch/diff tools are being used by paperweight that creates inconsistent (at least with everyone else) diff. A simple apply and rebuild on my machine removed all of them.
Expected behavior
When setting spawnpoint via bed or /spawnpoint player would spawn at the set spawnpoint.
Observed/Actual behavior
Player spawns at world spawn.
Steps/models to reproduce
.
Plugin and Datapack List
Paper version
This server is running Paper version git-Paper-163 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: 6f30f08)
You are 20 v...
For the CustomMerchant that is irrelevant because they never append a suffix at all
Hey!
Can you reproduce this without plugins?
My guess would be EssentialsSpawn.
Rebased everything on latest paper, as there were some conflicts
I would then also rename this method to something like setExperienceLevelAndProgress which takes the total xp amount like it does now.
I'm not a super fan of copying the logic for converting level into total points. Although I'm not super clear on what a good way to refactor the vanilla logic would be to allow us to use it directly. I think at the minimum, some // Paper - diff on change comments should be added to the key lines in Player#getXpNeededForNextLevel as that seems to be where the logic comes from.
I think to further differentiate this method and getTotalExperience, this method should be named something like calculateTotalExperience since it's not getting a value, but rather calculating it based on the xp level and progress towards next level.
Yeah, I agree that this is a somewhat unfortunate way of handling this, but due to how the experience stuff is implemented it is necessary.
If you look at the initial commit of this PR, you can see that at least for setting I was able to use parts of vanilla code to set the level and progress. Getting still had to be done with the formula.
I just added it for code cleaness or whatever, lol
~ [discord](#docs-website message)
Expected behavior
i open trade menu and push myself in ender gate using water and when i teleported to main island menu is still open
Observed/Actual behavior
i open trade menu and push myself in ender gate using water and when i teleported to main island menu is closed
Steps/models to reproduce
1:Open trade menu
2:teleport away from the villager to unload him
3:Menu is closed(but it shouldn't be this way)
Plugin and Datapack List
 - Aeltumn
0c8e84c Enforce sign line nullability when setting line... - thelooter
ede9c06 Fix Projectile#setOwner(null) not clearing owne... - Warriorrrr
After further consideration, I think this is not worth calling.
The event is cancellable so calling it and potentially cancelling a plugin run command could break way to many plugin to plugin interactions that rely on commands being executed.
E.g. right now plugin A might have to interact with a currency plugin B that does not have a public API.
For this plugin A calls dispatchCommand to execute a respective currency removal from plugin B.
Calling the event here means plugins could pote...
[PaperMC/Paper] New comment on pull request #9646: Call ServerCommandEvent on Bukkit#dispatchCommand
Ended up closing the original issue as it right now isn't feasible to implement this way.
Thank you so much anyway for your contribution, it is greatly appreciated.
This is generally the weird area of "I can get the why" but, It feels weird to accept this for just a single set of events, but it would also be weird to shove it for all events. I think this gets into the pattern where people for years have just wanted a general form of mechanism to attach data to event objects
[PaperMC/Paper] New comment on pull request #9661: Call ServerCommandEvent on Bukkit#dispatchCommand
Ended up closing the original issue as it right now isn't feasible to implement this way.
Thank you so much anyway for your contribution, it is greatly appreciated.
I hope we see more contributions from you in the future :)
Both of these methods on World should use Position instead of Location as a world isn't required.
06a741d Fix leashed pets teleporting to owner when load... - Warriorrrr
If you're gonna add comments like this, please comment the line instead of drop + comment
d8af99a Fix silent equipment change for mobs (#9677) - Lulu13022002
Is your feature request related to a problem?
For many years now, the /bukkit:reload command is the worst nightmare of every plugin developer.
It breaks everything and should not act as a way to "restart" the server while running.
Describe the solution you'd like.
My proposal would be to drop the current behavior, and add a Plugin#onReload method or an event like velocity does.
This would probably be a good thing for the new paper plugins.
Describe alternatives you've cons...
Closing this in favour of #8859, generally the bukkit reload mechanic is flawed but touching it now that many people expect some form of broken behaviour seems troublesome.
I can 100% see a usecase for a better lifecycle (e.g. proposed in #4317) in paper plugins, but that can be discussed in the respective issue :+1:
3cec9c9 [ci skip] Add missing javadoc links (#9497) - Machine-Maker
I really dislike the notion of this; There are still some Qs over what we want to do long term here, ideally we wanna move away from the broken bukkit command system, however, the expectation of there still being an easy to use command system still exists, etc, etc; it's not 100% decided that such a commands block will never exist, I think that this issue would generally be better off solved with documentation and such
Unable to test on current hardware, but, looking over this looks fine to me
ba0e1f5 Fix sapling observer detection and grow event (... - Machine-Maker
After some further discussion, this should properly address the API as well.
imo best to pass the entire SocketAddress to the PlayerLoginEvent and AsyncPlayerPreLoginEvent, deprecated the existing
methods yielded InetAddress and having them do the fallback, e.g. the API would have the
if (this.socketAddr instanceOf InetSocketAddress inet) return inet.getAddress();
return getLoopback()
and adding a new method that yields the plain socket addr.
Additionally, mark the cons...
Generally I agree with you but good luck getting new people to read the docs. As I have mentioned before this is solely for the purpose of hinting new devs that they are doing something wrong. This can always be removed in the future but to be honest, there are too much plugin tutorials and people will use those tutorials to develope Paper Plugins in the future. So getting people away from the old system will never really work until we remove the methods entirely. And until then I think its a...
Except this ends up leaking warnings to other plugin invocations of this stuff, which imho makes this a no go on this solution
Expected behavior
The server will read all the lines when it starts
Observed/Actual behavior
All teams (66) are read normally on the first startup. But when it started up again after shutting down the server, there were only 7 teams left
Steps/models to reproduce
- Add as many teams as possible
- Use
/team listto check all teams - Stop server
- Restart the server
- Use
/team list, and you can see that most of the teams were disappeared
Plugin and Datapack L...
Did you add any players to the teams? Empty teams will not be saved by default, you can find the config option for it here.
Did you add any players to the teams? Empty teams will not be saved by default, you can find the config option for it here.
No, I don't.
I don't think empty teams should be cleared
This is extremely important for map makers
Treeman, did you consider the fix posted in the originial MC-868? Link to comment by FX - PR0CESS
Now I will mention why this should not be fixed xD
When changing this code you run into an issue with client rendering. Due to the client using interpolation, the client will render the minecart as if it's turning and then put it in the rig...
Treeman, did you consider the fix posted in the originial MC-868? Link to comment by FX - PR0CESS
Now I will mention why this should not be fixed xD
When changing this code you run into an issue with client rendering. Due to the client using interpolation, the client will render the minecart as if it's turning and then put it in t...
Expected behavior
Clean loading of Shopkeepers plugin
Observed/Actual behavior
[08:56:10] [Server thread/WARN]: [Shopkeepers] Failed to load shopkeeper '1': Shopkeeper data migration failed!
com.nisovin.shopkeepers.util.data.serialization.InvalidDataException: Item migration failed for trade offer 1: SKTradeOffer [resultItem=UnmodifiableItemStack{BLAZE_ROD x 1, UNSPECIFIC_META:{meta-type=UNSPECIFIC, display-name={"extra":[{"bold":false,"italic":true,"underlined":false,"strike...
It appears something is overwriting ItemStack here which is explicitly not permitted in the bukkit API.
https://github.com/Shopkeepers/Shopkeepers/issues/842#issuecomment-1722495785 sounds plausible, please have the authors of the shopkeeper plugin look into this before opening an issue on paper.
If this turns out to actually be a breaking change under our current API promises, feel free to comment here, we will reopen the issue, until then this is a invalid issue :+1:
Closing this, as it is not replicable and, as @Leguan16 suggested, this strongly feels like a plugin.
If you can replicate this without plugins, feel free to comment here and we can reopen this.
Expected behavior
The chest lid closes, the stat for opening ender chests is not incremented, nearby piglins are not angered
Observed/Actual behavior
The lid stays open, the stat is incremented and piglins are angered
Steps/models to reproduce
Listen to InventoryOpenEvent and cancel if the inv type is ENDER_CHEST. Then try and open an ender chest in game.
Plugin and Datapack List
none
Paper version
581b683931db32618aa676160b731a276a3a6730
Other
_No respo...
Anything else I need to do or is this just awaiting reviews?
Closing issue as pastebins were wiped, and original stack traces were lost when server failed. Thanks to all the community members who initially tried to help me in Discord.
Is your feature request related to a problem?
An example problem would be if a plugin gives items to a player, but the player's inventory is full so the plugin drops the extra items on the ground, but the server has a feature where there is a collection box where the items should go to be collected.
Describe the solution you'd like.
An event added to PlayerInventory that is called when items are added. This event would happen after items are given to the player, but before the item...
[PaperMC/Paper] New comment on issue #9735: Adding an event for adding items to a player's inventory
There is https://jd.papermc.io/paper/1.20/io/papermc/paper/event/player/PlayerInventorySlotChangeEvent.html, should get you rather far.
I am not a fan of the rather niche event the issue proposes. Events just introduced for the API calls also seems questionable.
What is the actual XY here ? Plugins calling addItem should handle the returned items gracefully.
If your plugin needs to interface with that, it should be on the plugin to allow you to do that, not us.
At least from my end, I just need to find time to give this a final review and testing :+1:
[PaperMC/Paper] New comment on issue #9735: Adding an event for adding items to a player's inventory
That makes sense, I just created the issue to see what the thoughts about it would be.
Expected behavior
A purely visual lightning bolt should neither power lightning rods nor clear weathering copper blocks in the world.
Observed/Actual behavior
Lightning rods and copper blocks are mutated by a visual lightning strike.
Steps/models to reproduce
Summon a lightning strike using World#strikeLightningEffect onto weathered copper blocks or lightning rods.
Observe ...
Expected behavior
Changing the direction of a painting should only change the direction of the painting
Observed/Actual behavior
Changing the direction of a painting change the direction of the painting AND its art is reset to the default one (clientside)
Steps/models to reproduce
Just a very simple plugin that change the direction of the painting once spawned later
Plugin and Datapack List
This test plugin
Paper version
3fd1502717e753405a74fbad4a16d2fd7a14187...
@@ -1250,7 +1251,9 @@
return;
}
- entityTracker.broadcast(this.getHandle().getAddEntityPacket());
+ for (ServerPlayerConnection playerConnection : entityTracker.seenBy) {
+ this.getHandle().getEntityData().resendPossiblyDesyncedEntity(playerConnection.getPlayer());
+ }
}
private static PermissibleBase getPermissibleBase() {
I think that updating the protected void update() method in CraftEntity i...
Expected behavior
The scanForLegacyEnderDragon/enableFirstDragonSpawn world config doesn't work anymore since 1.20
Observed/Actual behavior
The scanForLegacyEnderDragon/enableFirstDragonSpawn world config should work
Steps/models to reproduce
Disable the config and go to the end (for the first time: delete the end world for already created server) -> notice how the dragon still spawn as if the config was on
Plugin and Datapack List
None
Paper version
3fd1502717e7...
What should be done with the world and finite preconditions? Adding a method method like Location#checkFinite to Position wouldn't be difficult, but the ray trace methods currently validate that the passed location has the same world. Should the newer ones just omit the check, and only check on the older ray trace methods?
0f74a09 Updated Upstream (Bukkit/CraftBukkit) - Machine-Maker
[PaperMC/Paper] New branch created: update-upstream
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:
69c7ce23 PR-990: Use Mockito instead of InvocationHandler for test mocking
997de31d PR-893: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping
6a8ce581 Fix malformed javadoc in previous commit
26c74f6d PR-890: Add more Sculk API (bloom, shriek, bloom event)
aa067ab...
773dd72 Updated Upstream (Bukkit/CraftBukkit) (#9739) - Machine-Maker
[PaperMC/Paper] branch deleted: update-upstream
Is your feature request related to a problem?
N/A
Describe the solution you'd like.
N/A
Describe alternatives you've considered.
N/A
Other
1.20.2 has been released.
This issue is for all 1.20.2 related discussions.
TODO
[PaperMC/Paper] New branch created: dev/1.20.2
There's two points I'm unsure about:
- Should the predicate be for
BlockStateinstead ofBlock? - Is the cast to
LevelAccessorfine? ThepassThroughpredicate is only non-null when theBlockGetteris an instance ofServerLevel.
Is your feature request related to a problem?
Minecraft Java Edition released 1.20.2 a little over 2 hours ago. I'm unsure of the complexity that goes into updating the paper server so I just wanted to notify you all of the news and offer assistance in whatever way possible.
Describe the solution you'd like.
For the PaperMC Downloads section to provide 1.20.2.
Describe alternatives you've considered.
Official Minecraft website provides a 1.20.2 server.jar file.
Other
Li...
Paper staff are aware of the update and are actively working on updating it as we speak (join our discord if you want to watch the update stream).
note for whoever's updating chunk system; some references in later patches may have been removed due to conflicts.
Is your feature request related to a problem?
While latest Java is 21, plugin developers still should stay on Java 8 because of retrograde server owners and hostings and thats like will be forever, until Minecraft itself will not force usage of latest JDK to allow plugin developers use latest features of Java, like switches, pattern matching, loom, string templates, enhanced instanceof, text blocks, structured concurrency, var, records, sealed classes, Stream#toList() and much more that ...
We're not going to force anyone to use a specific Java version other than what the minimum is.
Latest Minecraft version already requires Java 17.
If you need Java 21 features, require it in your plugin and tell your users to use that version and/or the enable preview flag.
papers policy generally is supporting the latest two LTS versions, but obviously MC can set higher limits than that and we have to move with it (as we did in the past).
its expected that the next MC update will move to java 21.
paper will never require preview features, thats stupid, they aren't meant to be used in production. they are meant to be used by devs to give feedback to the jdk maintainers.
e5bd562 Work here, work there, work for everyone - lynxplay
2617c92 More work work work work work work work work work - lynxplay
4875ee4 more more more more more more more more more work - NoahvdAa
3aa8e7e more more more more more more more more more mo... - NoahvdAa
Expected behavior
The main or offhand should be set to AIR
Observed/Actual behavior
A packet exception is thrown causing dupes in some cases
Steps/models to reproduce
Have a sword/any item in your mainhand and any item in your offhand at the same time, hit f while holding the main hand item and have this handler registered
@EventHandler public void onSwap(PlayerSwapHandItemsEvent event) {
event.setMainHandItem(null);
}
Plugin and Datapack ...
I already made a perfectly good issue for this โน๏ธ
915bb92 Fixup advancement patch (#9745) - Machine-Maker
47aeab8 fixup display slots patch (#9746) - Machine-Maker
8b512e3 Support Paper ip address config + add missing logs - Owen1212055
38b7565 Remove Spigot Bug Fix for MC-109346 - Owen1212055
Yes. It is more sensible to not log IPs. So if either is false, we should not be logging ips.
Oh nvm I got confused and thought it was inverted
c483d55 Shade the filtered jar, this fixes https://gith... - jpenilla
[PaperMC/Paper] New branch created: shade-filtered-jar
5053264 Migrate paper log ips option to new server.prop... - NoahvdAa
[PaperMC/Paper] New branch created: dev/1.20.2-log-ips-migration
Keep the comment like the world config transformations code does
Is there some way we can use DedicatedServerSettings#update to avoid needing to remove the final field? Like just change the property and then reconstruct the properties? Maybe its not actually better, but if it is, it removes the need to remove the final
Nope, those are specifically mutable values, changing the logIPs value to also be a mutable value would involve a lot more diff and work than just stripping final;
<img width="1202" alt="image" src="https://github.com/PaperMC/Paper/assets/44026893/c53d322f-c7e1-49c1-a134-621cbe76d52b">
Yeah, I saw that, but you shouldn't need to change it to be a MutableValue, just do something like
this.settings.update(properties -> {
properties.properties.setProperty("logIps", newValue);
return properties.reload(whatever)
})
[PaperMC/Paper] Issue opened: #9749 SuspiciousStewMeta does not respect other values on PotionEffect
Expected behavior
The type used in SuspiciousStewMeta (PotionEffect) accurately conveys the information stored in the meta
Observed/Actual behavior
PotionEffect has 4 additional pieces of information that are not persisted in the itemstack nbt, only the type and duration are. This is not mentioned in the docs, but beyond that I don't think the use of PotionEffect is correct. See below.
Steps/models to reproduce
N/A
Plugin and Datapack List
N/A
Paper version
9...
6be4395 Migrate paper log ips option to new server.prop... - NoahvdAa
[PaperMC/Paper] branch deleted: dev/1.20.2-log-ips-migration
Expected behavior
In Spigot server, fake players can keep ticking chunks even if real players teleport far away.
But in Paper server, chunks will immediately unload when real players teleport far away.
Observed/Actual behavior
entity.touchingUnloadedChunk();
- Always return true in Spigot server
- Return false in Paper server when real player leave.
/paper entity list minecraft:player
- Ticking when real players together with fake player
- Non-ticking when rea...
Opening this for historical purposes, not to be merged
[PaperMC/Paper] branch deleted: dev/1.20.2
[PaperMC/Paper] New tag created: 1.20.1
[PaperMC/Paper] New tag created: 1.20
Expected behavior
When Player#hideEntity(Plugin, Entity) is called, the passed entity should be hidden to the player.
Observed/Actual behavior
Nothing happens with no errors in console.
Steps/models to reproduce
//All given values are not null
ArmorStand armorStand = (ArmorStand) location.getWorld().spawnEntity(location, EntityType.ARMOR_STAND);
entityUUID = armorStand.getUniqueId();
armorStand.setInvisible(true);
armorStand.setInvulnerable(true);
armorStand.setGr...
Doesn't work in 1.19.4 too
Fix the UnsupportedOperationException thrown in UnsafeValues#loadAdvancement
TestPlugin.java
package io.papermc.testplugin;
import org.bukkit.NamespacedKey;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
public final class TestPlugin extends JavaPlugin implements Listener {
@Override
public void onEnable() {
this.getServer().getPluginManager().registerEvents(this, this);
this.getServer().getUnsafe().loadAdvancemen...
Quick, get rid of var before kenny sees this!
Honestly, I don't know if it is a good way
Nope, only used to see if this happens in newer versions
Nevermind, it was a client thing.
Stack trace
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Multiple entries with same key: LootItemConditionRandomChance[probability=0.25]=poke:effect_checking/movechance and LootItemConditionRandomChance[probability=0.25]=golem:random_lc
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) ~[?:?]
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073) ~[?:?]
at net.minecraft.server.Main.main(Main.java...
Have you tested those packs on vanilla?
Fixes maps not having their id field assigned which causes an NPE when a plugin tries to get the id, also fixes the initialize event not being called in this spot.
If it's possible to replace the private -> public with an AT then let me know, wasn't sure how to handle the generic return type
I've ran both on a vanilla 1.20.2 test server for a few weeks, packs ran without issue on there
AT would just use the erased type, not sure I care though atm
I was thinking it'd also be possible to set the brand before the instanceof & return in handleCustomPayload, but that would result in the message received event not being called for plugins, so this seems like it'd be the simplest way to solve it at least
5923b7d Fix missing map initialize event call & missing... - Warriorrrr
The proper solution would be to actually handle the new type properly instead of just trying to bodge it out
[PaperMC/Paper] New branch created: meta/update-wiki
[PaperMC/Paper] New branch created: fix/update-wiki
[PaperMC/Paper] branch deleted: meta/update-wiki
Expected behavior
The JD for the block place event says Called when a block is placed by a player., so either for the event to not fire there or for the JD to be clarified.
Observed/Actual behavior
Whenever you place a book into a Lectern, a block place event is fired.
Steps/models to reproduce
This is using the Debuggery plugin (which is part of Paper's org), let me know if proper Java code is preferred.
/devent org.bukkit.event.block.BlockPlaceEvent- Right click ...
[PaperMC/Paper] branch deleted: fix/update-wiki
298c478 Fix tests that broke during the junit 5 update ... - Machine-Maker
[PaperMC/Paper] branch deleted: fix-tests
Expected behavior
no crash (it worked in 1.20.1)
Observed/Actual behavior
crash: https://cpaste.de/uxababimog.properties
Steps/models to reproduce
have a server with multiverse or probably some other multiworld plugin and teleport the player in PlayerJoinEvent to another world
Plugin and Datapack List
No datapacks, Multiverse + some custom plugins
Paper version
This server is running Paper version git-Paper-"298c478" (MC: 1.20.2) (Implementing API version 1.20.2-R...