Teleporting the player in the join event is largely unsupported, to change the join spawn location use the PlayerSpawnLocationEvent. If changing the spawn location in that event still ends in unexpected results open a new issue instead.
#paper
1 messages ยท Page 3 of 1
Adds an event that gets called before the ExperienceOrb is spawned because of using a Grindstone. Allows you to get a copy of the ItemStack, modify/get the amount of Experience and get the Player involved
Calling onTake with itemstack instead of itemstack1 should not be an issue since it is not used anywhere except in the onTake method of the resultslot (Calling the event). Though someone should probably double check that.
Please do not open pull requests from the master branch, create a new branch instead.
Adds an event that gets called before the ExperienceOrb is spawned because of using a Grindstone. Allows you to get a copy of the ItemStack, modify/get the amount of Experience and get the Player involved
Calling onTake with itemstack instead of itemstack1 should not be an issue since it is not used anywhere except in the onTake method of the resultslot (Calling the event). Though someone should probably double check that.
I really need this, this bug is so annoying
Fully qualified imports are preferred to prevent import diff like this
Missing notnull annotation here
Missing space after the last comma here
While looking at the PrepareResult events a while back I got the idea to expand the PrepareGrindstoneEvent instead to allow getting and setting the experience during the creation of the result and not the retrieval like here.
While looking at the PrepareResult events a while back I got the idea to expand the PrepareGrindstoneEvent instead to allow getting and setting the experience during the creation of the result and not the retrieval like here.
Will close pr and allow you or someone else to expand on PrepareGrindstoneEvent
[PaperMC/Paper] New branch created: fix/clientbrand-v2
b85ce47 Actually fix client brand storage - electronicboy
I would prefer to have the javadocs changed to reflect that behavior instead of breaking plugins...
I disagree, this really does not seem like intended behavior. But at the same time, this event's current implementation makes stuff like that very confusing.
even if it was not intended, it is the only useful event atm (also for waxing, unwaxing, log stripping,.. - playerinteract does not have the resulting change result so it is quite bad to use for this), so it would break nearly every protection plugin if it is changed.
and if it is documented it can be made intended behavior.
Thank you, that is working.
but even if it is unsupported to teleport players there (is there any documentation for that? we used it for years and never had any issues) i think it should not cause a hard crash of the server but either return false from the teleport method or throw an exception
100% agree with brokkonaut here.
Would be great, if someone could rebase it, because there are conflicts and i never actually dealt with them in patches.
(Let's say i tryed, and after that, the applyPatches task failed)
Expected behavior
Basiclly, when I click the villager, left side is shown some rows.
Observed/Actual behavior
like this image, left side is shown nothing.
so we cannot trade something with villager.
Steps/models to reproduce
just spawn the villager, and place a job site block
and then, click them.
Plugin and Datapack List
 instead of a new stack of Air so the amount is set to 0. Same for below.
Ok, I see the issue. Am working on a fix.
Expected behavior
When I set the world's spawning point, players can spawn in the correct place
Observed/Actual behavior
When I set the world's spawning point, the place where the player revives after death is still the default spawning point on the map, and the player has not set home or bed. But /setspawn is work.
Steps/models to reproduce
/setworldspawn
/suicide or /kill
Plugin and Datapack List
CoreProtect, Essentials, EssentialsDiscord, EssentialsDiscordLink, Mult...
I remember that one of the three ViaPlugins caused a problem with villagers when using a new version.
Specifically in my case, it was when 1.19 was released, but the server was still on 1.18 and ViaVersion was used to allow players from 1.19, and all trades were not available, so probably this is not caused by Paper, but rather an existing problem caused by one of these plugins.
Tested datapacks in linked issue. Loaded correctly. Tested on a vanilla, base and pr. Worked on vanilla, was able to reproduce original issue on base. Fix confirmed on pr
I have looked into this for a while and discovered that we can just create a CraftItemStack out of the used item and check if it is an actual block. That should fix the issue with lecterns and copper blocks.
But what are we doing now?
Expected behavior
//1.20.1
ClientboundSystemChatPacket packet = new ClientboundSystemChatPacket(IChatBaseComponent.ChatSerializer.a(line), false);
(((CraftPlayer) player).getHandle()).c.a(packet);
//1.20.2
ClientboundSystemChatPacket packet = new ClientboundSystemChatPacket(IChatBaseComponent.ChatSerializer.fromJson(line), false);
(((CraftPlayer) player).getHandle()).connection.send(packet);
It should send a player a chat message with the json formatting.
Example whe...
Expected behavior
PlayerProfile profile = Bukkit.createProfile(uuid); should work
Observed/Actual behavior
java.lang.NullPointerException: Profile name must not be null
at java.util.Objects.requireNonNull(Objects.java:235) ~[?:?]
at com.mojang.authlib.GameProfile.(GameProfile.java:31) ~[authlib-5.0.47.jar:?]
at com.destroystokyo.paper.profile.CraftPlayerProfile.(CraftPlayerProfile.java:39) ~[paper-1.20.2.jar:git-Paper-"fe54a13"]
at org.bukkit.craftbukkit.v1_20_R2.CraftServe...
This is no longer an issue as of 1.20.2, most likely due to the collision optimization patch rewrite.
b43dd37 Fixup player profile getters and constructor to... - kennytv
[PaperMC/Paper] New branch created: profile
Changing nullability here would go beyond just getters with its creation and completion, so that feels more like a future thing
I can confirm this issue
Tested on base and pr. Issues reproduced on base for both tripwire hooks and lecterns. Fix confirmed for both in pr
This maybe needs to be updated to avoid a contract change from nullable to notnull?
Closing this pr, since this is a hack not a fix and your change doesn't work for the same reason electronicboy's commit doesn't either. However thank you for the report, the issue is still valid.
Can no longer reproduce the large lag spike in 1.20.2 thanks to leaf's collision optimisations
Is your feature request related to a problem?
Due to its special status, "BungeeCord" will never appear in Player#getListeningPluginChannels. This is not mentioned in the javadoc, however, nor in the documentation for Messenger, nor on docs.papermc.io.
Describe the solution you'd like.
Document that Player#getListeningPluginChannels does not return the BungeeCord channel.
Describe alternatives you've considered.
Continue to leave this information buried in the depths of B...
Stuff like this shouldn't really be intended behavior as it makes no sense, new API should be added instead. In this case there's already a PR open that adds an insert book event
There were never talks about whether it should be considered intended behavior or not.
Talks currently are at that point that several people said that the current BlockPlaceEvent should be declared as deprecated due to its inconsistency and to introduce [a new event](#paper-dev message).
I was thinking about moving the .equals around to prevent the npe but this also works, so lgtm
I think this fix is better because itโs less nullable itemstacks. Now we can also change the annotation on the getter to NotNull. The ItemStack passed into the event already was NotNull, so that doesnโt break behavior expectations.
Expected behavior
Attribute modifiers previously worked by applying that modifier to entities that are holding an item. For example giving a horse ar
mour with a +15 health modifier applied with: /give @p iron_horse_armor{AttributeModifiers:[{AttributeName:"generic.max_health",Name:"generic.max_health",Amount:15,Operation:0,UUID:[I;1449193714,-1470545029,-1967556178,-1026784851]}]} 1
 and see if that fixes it.
If it does, then this is likely an issue with one of your plugins / a custom client (if any).
yeah, it seems like it is an issue with some plugin i have, because i tried deleting all plugins and the issue disappeared
Is your feature request related to a problem?
As it currently exists, the BlockDropItemEvent is fired after the player has completed brushing a BrushableBlock. This event only controls the dropped items but occurs after the block has already changed from a 'suspicious ' to a normal block. A new event which controlled this change and controlled whether the BlockDropItemEvent would provide more customization to the brushing feature introduced in 1.20.
Describe the solution you'd like...
Are Paper comments required behind the nullability annotations?
4cdbb0c Updated Upstream (Bukkit/CraftBukkit/Spigot) - kennytv
[PaperMC/Paper] New branch created: upstream
[PaperMC/Paper] branch deleted: upstream
Adds additional overloads to the methods in the HumanEntity interface that open inventories (such as openAnvil, openWorkbench, ect.) allowing for customization of the displayed titles.
Please do not open pull requests from the master branch, create a new branch instead.
Adds additional overloads to the methods in the HumanEntity interface that open inventories (such as openAnvil, openWorkbench, ect.) allowing for customization of the displayed titles.
I already opened a PR that results in the same behaviour. See #9658
Timings or Profile link
https://timings.aikar.co/dev/?id=6e5a232e57654669a5c168e0587c04ba
Description of issue
We are having some lag spikes in our paper server that we have not been able to fix for several weeks.
The server can usually handle 30 players at the same time without issue (perhaps with some drops to 19 tps).
However, other times, even with 1 or 2 players, TPS go down, to the point of every player being disconnected. Sometimes this lag spikes end in a server reboot (I...
just use the api to send the message? using internals for this is just wrong.
I think the method Server#createProfileExact should also be updated, the method specify than having one of its parameter null is valid. However when the method will find an online player and one of its parameter is null, the constructor will throw. For example: createProfileExact(null, p.getName()), createProfileExact(p.getUniqueId(), null)
Looks like spigot was also recently shipping mangled jars from his tooling recently in regards to mappings and such
[PaperMC/Paper] New comment on issue #9777: Huge lag spikes (freezes and crashes) on sync chunk load
Thank you for your detailed report, but this is not a Paper issue.
A spawnpoint lookup is a slow process that needs to be done on the main server thread. EssentialsX seems to cause such a spawnpoint search on join, but it can also happen on respawn. Especially if the chunks are not pre-generated, which seems to be the case here (currentGenStatus=null, requestedGenStatus=minecraft:full), it will be very slow because suddenly a lot of chunks have to be generated on the main thread.
This ...
Is your feature request related to a problem?
Changing the rotation of using Entity#setRotation(float yaw, float pitch) requires a yaw and pitch.
I am currently using Player#getFacing() to get the facing of the player and wanting the entity to face the same direction but there is no method to set the entity facing using this method. I therefore have to call the alternative method I considered to convert it to a yaw then call the Entity#setRotation method.
I know some will say just ...
Expected behavior
When BlockDisplay is spawned and transformation is applied on it (for example 1 block down), display should go 1 block down in specified duration.
Observed/Actual behavior
When BlockDisplay is spawned and transformation is applied, it will be directly spawned with that transformation, this means if transformation was 1 block down, then it will be there instantly without animation.
Steps/models to reproduce
- Spawn BlockDisplay entity using `BlockDisplay dis...
resolves #9736
Not sure if the check for isSilent should be removed i am just going to leave it in for now incase any plugins are using the deprecated methods as a workaround
Thanks - I think another if needs the visual check where it is able to set fire to the world
Comments above aren't massively helpful or explicit - so to be clear it's worth being aware that WorldGuard duplicates the /locate command, which is a problem, but you can simply specify in this scenario that you want to use the minecraft version of the command and bypass the WorldGuard version: /minecraft:locate biome minecraft:savanna.
H/t here: https://github.com/EngineHub/WorldGuard/issues/2013#issuecomment-1615977690
Is it also in the LightningBolt class? Incase you are talking about the spawnFire method, that one already got a check in it.
When testing the changes it doesn't set anything on fire. Or is there something i am missing?
The BukkitMirrorTest can be disabled globally instead of per method.
Fix some nullable/deprecation annotation
Update minecraft wiki links (gamepedia one that redirect to fandom)
I want to mention that this also happens if a plugin uses Configurate with the YamlConfigurationLoader and doesn't shade in (Or I assume define as a dependency to load in) their own SnakeYaml and Configurate to use... If that is even possible on a technical level.
Source: My plugin uses Configurate and I encounter this exact error myself.
Can confirm this was an issue on build 203, this seems to have been fixed by upstream in build 205
Expected behavior
Setting the raw data should apply data such as rotation and whether the barrel is open.
Observed/Actual behavior
Upon setting the raw data for the barrel, and updating the block state, the barrel disappears from the world.
Steps/models to reproduce
- Place down a barrel block, either by code or manually
- Get the block's state
- Set the block's state's raw data equal to the raw data from getRawData()
- Update the block
- The barrel will now disappea...
Haven't get/setRawData been deprecated for many years?
CraftBukkit's API implementation doesn't update the firework's entitydata, which results in the client not being informed about the attached firework
Most likely. However, it is useful for a plugin I'm making (The alternative being devising my own byte system for storing block data), which is how I found out about this behavior.
I most likely will now need to devise my own byte system, in order to be backwards compatible, but in case someone wants to fix this bug, that would be helpful going forward.
Expected behavior
After getting the Container and the inventory, and after adding an item to the inventory, using the "BlockState#update(true,false)" method should update the blockstate, while preserving the new items in the inventory.
Observed/Actual behavior
The inventory is cleared upon forcing an update
Steps/models to reproduce
Container container = .....
container.getInventory().addItem(.....)
container.update(true,false)
This will clear the inventory of the new it...
I think you have to use getSnapshotInventory instead of getInventory. getInventory is the live inventory, so calling update after it sets it back to whatever it was when you got the block state.
Stack trace
mc-survival | Starting org.bukkit.craftbukkit.Main
mc-survival | System Info: Java 17 (OpenJDK 64-Bit Server VM 17.0.8+7-alpine-r0) Host: Linux 5.15.0-1042-oracle (aarch64)
mc-survival | Loading libraries, please wait...
mc-survival | 2023-10-02 17:35:15,842 ServerMain WARN Advanced terminal features are not available in this environment
mc-survival | [17:35:16 WARN]: [oshi.software.os.linux.LinuxOperatingSystem] Did not find udev library in operating system. Some fe...
Linked issue: #8925
As the previous pull request #9064 seems to have gone inactive I have reworked the changes, expanded the documentation and applied the requested changes from that pull request.
PDC now inherits Iterable, and adds these methods
#setIfAbsent(NamespacedKey, PersistentDataType, Object)
#computeIfAbsent(NamespacedKey, PersistentDataType, Function)
#computeIfPresent(NamespacedKey, PersistentDataType, BiFunction)
#compute(NamespacedKey, PersistentDataTyp...
The actual patch names are weird btw. I'm a fan of these methods though - you should add attribution for the previous codeowner though as a co-author in the patch description please.
The actual patch names are weird btw. I'm a fan of these methods though - you should add attribution for the previous codeowner though as a co-author in the patch description please.
Can you also look into implementing
mergepretty please?
Added previous codeowner as Co-author, renamed the patches and added the merge method
Expected behavior
Bukkit.getMap(id) should return a MapView for plugin-created maps following a reboot.
Observed/Actual behavior
Bukkit.getMap(id) returns null upon a reboot, breaking plugins that use this API tool. Example:
[...]
[00:35:24 WARN]: [ImageMaps] Map 2848 referenced but does not exist!
[00:35:24 WARN]: [ImageMaps] Map 2849 referenced but does not exist!
[00:35:24 WARN]: [ImageMaps] Map 2850 referenced but does not exist!
[00:35:24 WARN]: [ImageMaps] Map 2...
Upon some checking it looks like it's failing on this line in net.minecraft.server.level.ServerLevel#getMapData
final MapItemSavedData map = storage.readSavedData(factory.deserializer(), factory.type(), id);
readSavedData here is returning null, presumably because the file doesn't exist. This is because id needs map_ added to the beginning of it, it's attempting to load #.dat which isn't what map files look like.
There's also a logic issue where map isn't reassigned to `existin...
org.xerial.sqlite-jdbc released a breaking change for a fairly commonly used API โ used extensively in plotsquared for example. CraftBukkit initially picked up this update but it has since been rolled back (https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/40d41acc1aba91ead44adc469d715debe6f041a8#pom.x...
If i am understanding this PR correctly, you should just wait until we pull upstream again
This is an upstream merge PR, they just generally failed to entitle it as such
We generally like to do upstream updates ourselves, especially when Spigot adds new API we already have, sorry
@kennytv No problem at all. ๐ This PR is at least is here for reference, both for upgrading to the latest upstream and on the off chance someone happens to try HEAD wonders what's up with SQLite ๐
f36bb59 Fix entity data not updated for firework attach... - booky10
This is a vanilla behavior break. The vanilla visualOnly boolean is exclusively used for the skeleton trap lightning, which in vanilla, does affect lightning rods and copper blocks. To add the check for it here would change that behavior.
You can add jna to your libs if its missing.
I had the same problem and added this as dependency (i use a launcher but you can use a plugin to download):
net.java.dev.jna:jna:5.13.0 net.java.dev.jna:jna-platform:5.13.0
Is your feature request related to a problem?
Old ASM can't transform classfiles compiled on new Java. ASM used by spigot in the process of loading plugins. This efficiently prohibits usage of new java versions to every plugin developer, because no one want to write plugins that supported only on last version (only 50,5% of servers supports latest java (running 1.20.1+ now) and this number will not change in the future).
**Why this case is unique and unrelated to ideas of backporting...
I think doing an equals instead of a ref equality for the uuid check would be better to have a consistent state across the server since vanilla and spigot does that as well.
The two linked issues above seems relevant and could be fixed here (even if it's a spigot one). The method SkullMeta#setOwningPlayer didn't throw before with an offline player without a name:
stack.editMeta(SkullMeta.class, meta -> {
meta.setOwningPlayer(Bukkit.getOfflinePlayer(UUID.fromString("a8179ff3-c201-4a75-bdaa-9d14aca6f83f")));
});
At least my two cents on this.
We want the number of people running latest paper to change. Having large quantities of people run outdated versions means people have to jump through hoops to support these dead versions.
Log4J was updated because it allowed remote code execution and posed a real security risk. Given we still offered downloads to those old versions, we patched it as offering software with know vulnerabilities like this is just bad practice.
If people are planning on running o...
even if we would release updates, nobody would update their servers.
this is just a warning, right? the server starts and runs fine?
Except you could just use older versions of Java or not?
even if we would release updates, nobody would update their servers.
I think people don't update to new versions not because they are too lazy to drop new paper.jar. They think that new versions are less performant (it's true in some cases), and also to update to new version of game they should not just update server.jar, but a lot of plugins, that, for example, use NMS or works with packets. In this case of new build inside one game version you can just tell in plugin readme page to use...
no, I was saying even if we release a new build for a legacy version, which we are not going to do, nobody would download it. you could spend ages chasing your users to update to that new build.
many servers down even update when a version is still supported, they just download whatever is latest when they update to a new mc version and call it a day.
this wouldn't have the effect you want it to have and it would set a bad precedent of us supporting old versions for writing plugins for o...
we will not stop you from supporting old versions and we will try to not make is unnessasarily hard to do it, but we will not help you.
May i do pull request with it myself?
We don't stop you from writing plugins that support old versions. A pr to old versions will not be accepted.
No one is stopping you.
But i can tell you that it will be closed within 10 seconds.
Expected behavior
i think the issue become to bb1c0dd Implement tracking range y setting
Observed/Actual behavior
I noticed that monsters no longer spawn!
Steps/models to reproduce
When I updated the Paper 1.20.2 jar from build 207 to 212, I noticed that monsters no longer spawn! I haven't changed anything in my configuration; everything was working perfectly before the update. The gamerule "domobspawning" was set to true, and the world was set to difficulty hard. I tried...
Can confirm this myself even with plugins installed. Mobs that are already in the world will still be around.
Bukkit already has this consumer for spawning normal entities and dropping items, but the method for spawning falling blocks is missing it
Can confirm, starting build 211. This is caused by the default value for monster-spawn-max-light-level (paper world config) being -1, and the server now using that for Monster spawning checks. Because the minimum light level is 0, this check will always fail, causing no monsters to spawn.
As a temporary workaround, setting monster-spawn-max-light-level to 0 fixes the issue.
Of course default config settings shouldn't break vanilla behaviour like this, so this will be fixed properly...
Tested PR. Changed configs as showed in issue. Bedrock generation in new world is flat.
I would personally prefer having a setBlockData method in FallingBlock, so that its possible to just use the existing consumer-based methods with FallingBlocks.
FallingBlocks being the only entity that require a special spawning method in World is kinda weird, and the only reason for this is that they require BlockData to be spawned, which was impossible before the consumer methods existed.
Yeah, would make sense to add api for changing the blockstate.
But still, the falling block spawning method is the only one which doesn't have a consumer parameter. This seems like an inconsistency to me.
Closes #9791
The monsterSpawnMaxLightLevel is annotated with BelowZeroToEmpty, but I noticed that the belowZero method wasn't fully implemented for IntOr which meant it wasn't doing anything.
An alternative solution would be to add a migration, but with this anyone who has the old -1 default will have it changed to default in the file.
all calls to that method seem to properly prepend the id already?
5eec4ec Quick tweaks to logical flow of getMapData - electronicboy
Can you re-test this on build 213 or above?
I think, this is a WAI the barrel is a modern block that comes without legacy data (so it will fallback to air), supporting/adding legacy data to every new block entity to this system doesn't make sense. But this works fine when the block is old and has a legacy equivalent like chest (Material.LEGACY_CHEST) for example. In your case it might be better to implement this stuff yourself rather than reviving a deprecated things
as said, mojang only has this data for existing legacy blocks, it does not exist for modern blocks, as such this is pretty much a case of "the only bug here is that those methods still exist as they only return invalid data for supported setups"
02cfaa8 Fix mobs not spawning when using an older confi... - Warriorrrr
yes, if you wish to modify the snapshots inventory you need to explicitly get it, otherwise, modify the real inventory with getInventory without calling update
there is no tenable way to handle this otherwise which doesn't create its own set of issues
This has been fixed with the rewrite of some part of the collision system to adhere with more type of voxelshape: mostly here and the following fixes
Thank you for your contribution, unfortunately this PR seems to do roughly the same thing as the existing #9658, so this is being closed in favour of that one.
Any updates? This bug makes my server unable to update to 1.20.2, since we use yaml serialized itemstacks.
This should be resolved once https://github.com/PaperMC/Paper/pull/9770 is merged.
Note that storing ItemStacks with null in profile names is something that has been warned against for several years, as those profiles are considered invalid by Mojang and stuff will blow up.
Note that storing ItemStacks with null in profile names is something that has been warned against for several years
Where are things like this documented? I never had any warnings in the console and could not find anything in the javadocs.
Timings or Profile link
https://spark.lucko.me/IIftkvHeLc
Description of issue
The new Entity visibility API is causing significant performance issues since my server's upgrade from 1.19.2 to 1.20.2. We were previously able to handle around 50 online around 20tps most of the time.
Since updating to 1.20.2, we've been unable to achieve this same level of performance or anywhere close. CraftPlayer#canSee() is adding an extreme amount of tick time to the server with our entity and ...
There is a level of this API wrapped internal implementation detail and so we often never really documented such aspects, half completed, mangled, profiles have always caused varying issues within the space of craftbukkit and mojang, The behavior around this stuff has always been kinda janky in varying ways, it was just generally predictable in how it would behave so most people often just ignored that given that the API wasn't exactly as integrated as it could be to make the full extent of p...
As of build 213 it appears this particular issue has been fixed, the ImageMaps plugin now works without any patches.
I'd be interested in seeing a sample with a shorter interval, on the surface, there looks to be some issues here, the fact that hashmap is deferring to TreeNodes generally screams that the spread induced by hashCode is too small for what is going on, but, I'd wonder if you're using something that hides entities in a manner that might be causing a metric bunch in there?
@electronicboy here's my timings report as well: https://timings.aikar.co/dev/?id=213eede3faf64bc095977d70634f748c
If you've got a plugin I can load in to take some stats on the usage of the API lmk, would love to be able to provide a bit of info. I don't think we do have anything plugin-wise like that though, the closest would be CrashClaim but that uses packet-based invisible magma cubes.
Captured a VisualVM CPU profile since you wanted smthn with a shorter interval, this should be useful:
snapshot-subserver-10-4-2023-1696450310430.nps
May be worth note but we're using Essentials Vanish - that's probably(?) triggering parts of this?
During low TPS I took a dump of everything affecting that map, here's what I got: https://pastebin.com/GnssCRVK
Code used to create this: https://pastebin.com/x5Cexwp1
Profile from shortly after: https://spark.lucko.me/Inbl9KdI0T
It doesn't look like there's a massive amount of entries in the hashmap at all, seems to be more so that the methods being called an incredible amount of times per tick while players are active on the server.
Expected behavior
TAB Completion
Observed/Actual behavior
TAB Completion
Steps/models to reproduce
TAB Completion
Plugin and Datapack List
No mather, it happens without plugins.
Paper version
This server is running Paper version git-Paper-196 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: 773dd72)
You are running the latest version
Previous version: git-Paper-167 (MC: 1.20.1)
Other
I have been removing and restarting plugins. It is givi...
Provide the stacktrace/log of the "failures" you are talking about.
this is just a warning, right? the server starts and runs fine?
Yes just warning.
We don't exactly support alpine environments, but, those logs are from oshi, the library mojang uses to get information about the OS
I'll be honest, it's the first time it's happened to me with Paper and on a server-side version. I've been creating servers for 9 years and this is the first time it's happened to me, TAB Completion doesn't work with any plugin.
Either I have something wrong with the Java version or it's a bug in the .jar server.
You issue is not helpful. Can you please provide more information?
What did you observe?
What did you expect?
What plugins do you use while observing it?
The team cannot magically fix a bug with only "Tab completion" as information.
Expected behavior
All chunks should successfully upgrade
Observed/Actual behavior
Many chunks fail to load and get reset to the seed:
The following error message showing every time a chunk is corrupted:
[22:41:01 ERROR]: [ChunkLoadTask] Failed to parse chunk data for task: GenericDataLoadTask{class: io.papermc.paper.chunk.system.scheduling.ChunkLoadTask$ChunkDataLoadTask...
[PaperMC/Paper] branch deleted: profile
431e641 Fixup player profile getters and constructor to... - kennytv
The other issues are better fixed in another pr/of lesser priority
The following may be able to workaround this issue, and seems to clear up all of the corruption I was able to find:
โ ๏ธ I have no idea if this is an appropriate workaround, or if it's a kludge and turns out to silently drop mob related data. Use at your own risk and assume the worst! โ ๏ธ
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: lordpipe <lordpipe@protonmail.com>
Date: Wed, 4 Oct 2023 23:43:28 -0600
Subject: [PATCH] fix corruption bug
...
cfe311d Fix item effects conversion if no tag is present - kennytv
Confirmed that cfe311d7a51eeb9e14c526f57efab9837f30c5d0 correctly updates all of the problem chunks I encountered.
this is just a warning, right? the server starts and runs fine?
Yes just warning.
Then it should prolly be raised with oshi instead
Would creating an extra boolean and using that for the skeleton trap be an good way of fixing this? This way we can use the visualOnly boolean for the strikeLightningEffect method. This also fixes misleading variable names. Is this a good way to do it or are there better ways?
Having a second thought, maybe calling it SpawnerPlayerSearchEvent is more accurate with the event. Thoughts?
[PaperMC/Paper] New branch created: fix/run-dev
(also turned filterpatches back on)
we should fix FilterProjectDir on windows instead
[PaperMC/Paper] branch deleted: fix/run-dev
Shouldn't this happen anyway?
-tasks.withType<io.papermc.paperweight.tasks.RebuildGitPatches> {
- filterPatches.set(false)
-}
+// tasks.withType<io.papermc.paperweight.tasks.RebuildGitPatches> {
+// filterPatches.set(false)
+// }
Linked issue #9737
Applied suggested changes from @Lulu13022002 and they seem to work
ff8ca9e update paperweight to 1.5.7 & re-enable filterp... - jpenilla
[PaperMC/Paper] New branch created: pw-update
It is the armored elytra data pack. I have this on my server and I get this message. Not a paper bug
Its not. Could be Armor Statues from VanillaTweaks tho.
i only have the armored elytra pack and still get the msg. might even be both of them idk
Expected behavior
If I call the method World#setAutoSave(boolean) with false as parameter, I would expect to disable the saving of the world as a whole, but in net.minecraft.server.MinecraftServer#tickServer(BooleanSupplier) is only an if-check respecting the paper level configuration.
The AutoSave-Property is still considered in the process but only a few instructions later and only for the chunk map. Some other world data, which is still accessing the world file, will still be ...
I've replaced our Paper with a patched version of paper that replaces CraftPlayer#canSee with a simple return true;
Here are the timings from that experiment: https://spark.lucko.me/cxfJhAlvdn
It effectively accomplishes the same thing for us. Having these canSee checks execute on the main thread with the amount of calls they receive seems a bit non-ideal - even the getHandle call adds ms to the tick per entity type its iterating over. Not quite sure what the ideal solution would be sin...
Pretty sure that we align with vanilla behavior here last I checked, and if still the case, there is generally little inclination to break from this
But wouldn't it make more sense to disable all saving for the world if autosave is disabled?
Especially as it feels inconsistent here. If you set chunks.autoSaveInterval to 0 in the level config, then it prevents the saving completely. But disabling the autosave via API using World#setAutoSave(boolean) does it only prevent partial?
Both, setting the config value to 0 and calling the method translates imho to "Do not save the world automatically".
Even if you want to stick to the va...
Expected behavior
For some inexplicable reason, Paper and Spigot used to work on IBMs AIX (IBMs UNIX)
Observed/Actual behavior
Anything that uses a database breaks in comical fashion
Steps/models to reproduce
Buy a currently supported IBM PowerVM server (Power8 and newer (THAT IS NOT THE "L" SERIES))
Try to run paper
JDBC explodes violently
Plugin and Datapack List
Literally anything that uses SQL
Paper version
Current
Other
Yes I know this is the "ed...
I mean, the only jdbc related thing we have that uses natives is sqlite, and that's pretty much out of our control, they don't have a "pure java mode"; we'd need the exception to see what to say, but, unsupported platform nobody here can work with, yada yada
IBM does maintain their own JDBC builds those should contain an AIX build you might be able to patch a driver in from
Btw the error is the classic "unknown platform"
Would need the full error, JDBC itself is platform agnostic, it just provides the connector bridge to various drivers, so, I don't think we need anything specific from there
[STDERR] [org.sqlite.SQLiteJDBCLoader] Failed to load native library through System.loadLibrary
[03:02:42 WARN]: java.lang.UnsatisfiedLinkError: Can't load sqlitejdbc
[03:02:42 WARN]: at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:1805)
[03:02:42 WARN]: at java.base/java.lang.System.loadLibrary(System.java:767)
[03:02:42 WARN]: at org.sqlite.SQLiteJDBCLoader.loadNativeLibraryJdk(SQLiteJDBCLoader.java:303)
[03:02:42 WARN]: at org.sqlite.SQLite...
[03:02:42 WARN]: Caused by: java.lang.Exception: No native library found for os.name=AIX, os.arch=ppc64, paths=[/opt/freeware/jdk-17.0.8.1+1/lib/default:/opt/freeware/jdk-17.0.8.1+1/lib:/opt/freeware/jdk-17.0.8.1+1/lib/server:/opt/freeware/jdk-17.0.8.1+1/lib:/opt/freeware/jdk-17.0.8.1+1/../lib:/usr/lib64:/usr/lib]
also I am willing to give the paper team access to my current gen AIX system to fix this issue if they want to take on the challenge
DM me on discord name: tminusblastedrocket
Reposted from discord
08c0b48 [ci skip] update paperweight to 1.5.7 & re-enab... - jpenilla
[PaperMC/Paper] branch deleted: pw-update
Expected behavior
In previous versions, this returned the client brand properly
Observed/Actual behavior
Always returns null, regardless of how long I wait.
Debugger shows that the custom BrandPayload packet is received, and is assigned to this.clientBrandName in the ServerCommonPacketListenerImpl, but for some reason does not propagate to the player method.
Steps/models to reproduce
- Have a way to read out the brand of the player, for example using
@EventHan...
Known issue, we basically need to save where the brand is stored, it's been on my todo list, but, yea...
Readds a lost update to the shared mutable state in the random block ticking optimisation.
29a0209 Properly check water block when random ticking ... - lynxplay
@SecretlyJealous how do you reproduced it?
Another timings report, still an usual amount of tick time in PlayerConnectionUtils compared to 1.19.2 even with canSee patched out. Might be a larger issue?
https://spark.lucko.me/GgYLX0lnOb
Expected behavior
same as vanilla the item frame does not drop
Observed/Actual behavior
spigot same as vanilla
all of the paper fork has the problem.
when you let worldboder behand the item frame, it will drop without reason.
Steps/models to reproduce
1.put a item frame
2.move world border behand item frame
3.wait
Plugin and Datapack Lis...
Some ideas
in net.minecraft.world.entity.decoration.ItemFrame#survives
@Override
public boolean survives() {
if (this.fixed) {
return true;
} else if (!this.level().noCollision((Entity) this)) {
return false;
} else {
BlockState iblockdata = this.level().getBlockState(this.pos.relative(this.direction.getOpposite()));
return !iblockdata.isSolid() && (!this.direction.getAxis().isHorizontal() || !Diod...
repair for https://github.com/PaperMC/Paper/issues/9805
in net.minecraft.world.entity.decoration.ItemFrame#survives
@Override
public boolean survives() {
if (this.fixed) {
return true;
} else if (!this.level().noCollision((Entity) this)) {
return false;
} else {
BlockState iblockdata = this.level().getBlockState(this.pos.relative(this.direction.getOpposite()));
return !iblockdata.isSolid() && (!thi...
I wonder if we can somehow pass if the entity noCollision should use the COLLISION_FLAG_CHECK_BORDER flag or not.
The instanceOf, while presumably fine, seems kind of meh there given we know the exact spot this check would have to trigger for so we could attempt to shortcut here a bit.
My brain is absolutely friend right now tho, so I sadly cannot look deeper into that.
Expected behavior
When i piston pushes a TNT entity into a solid block, and then retracts, the TNT should not be misaligned, and a piston one block away cannot push the TNT
Observed/Actual behavior
When i piston pushes a TNT entity into a solid block, and then retracts, the TNT gets misaligned, and a piston one block away can to push the TNT
Steps/models to reproduce
Here is a video showing the Problem
Plugin and Datapack List
No Plugins...
Expected behavior
On Spigot, if a custom Brigadier command throws a CommandSyntaxException, that exception can appear in the console:
>version
[11:26:28] [Server thread/INFO]: This server is running CraftBukkit version 3908-Spigot-e0e223f-b3efca5 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT)
[11:26:28] [Server thread/INFO]: Checking version, please wait...
[11:26:29] [Thread-12/INFO]: You are running the latest version
>test @p
[11:26:31] [Server thread/INFO]:...
Closing this pr since this is hack not a fix, the proper way is to do what vanilla do instead of what the new system do. There's more issue with the world border collision. The item frame do indeed drop when near the border (<2*|boxSize|) but not when far outside of the border and that's the issue. Essentially in vanilla an entity collide with a border without collide epsilon and when the entity is near the border and inside (with a margin) but not far outside then the two voxel shape interse...
Closing this pr since this is a hack not a fix, the proper way is to do what vanilla do instead of what the new system do. There's more issue with the world border collision. The item frame do indeed drop when near the border (<2*|boxSize|) but not when far outside of the border and that's the issue. Essentially in vanilla an entity collide with a border without collide epsilon and when the entity is near the border and inside (with a margin) but not far outside then the two voxel shape int...
Yes, this might happen if the timing is right. For example if the border is slow enough that the item frame check its state (that happens each 100 ticks by default) and the condition are met.
@electronicboy I may have tracked down a large source of the lag, a lot of it being related to ChunkMap$TrackedEntity#updatePlayer(Player player) - as player count goes up, this was using drastically more and more ms to execute than it used to on 1.19. Doing some basic comparison work I found that this particular optimization was removed:
// Paper start - remove allocation of Vec3D here
// Vec3 vec3d = player.position().subtract(this.entity.position());
double vec3d_dx = playe...
Just check if the position is an instance of Location and then run those checks. A checkFinite method for Position might be good, but shouldn't be done in this PR.
Should the predicate be for BlockState instead of Block?
No, Block is perfect for this. It is just a wrapper for a world and position so it is more efficient than creating BlockState for every position checked.
Is the cast to LevelAccessor fine? The passThrough predicate is only non-null when the BlockGetter is an instance of ServerLevel.
To be safe, I would also, in addition to the null check, have an instanceof check.
I don't know whether the isProxyOnlineMode method provided the isOnlineMode check before, but I removed the unnecessary double check on my end.
Fixed the behavior break by creating an extra skeletonTrap boolean that is used for skeleton traps instead of the visualOnly boolean. This way we also avoid confusion with variable names. I hope this way of fixing it is acceptable
is this feature supposed to require plugins to have a bootstrapper even if they don't need one?
Expected behavior
I expect spiders to attack me when they see me. I also expect zombies and skeletons to catch fire during the day.
Observed/Actual behavior
They did not really try to come to attack me. In early morning, some zombies and skeletons do not catch fire even out in the sun.
Steps/models to reproduce
When I walk out in the night, I see spiders. However, they do not always come to attack me. In the morning, I usually see zombies and skeletons not catching fire.
...
Is your feature request related to a problem?
When a stronger potion effect overrides the weaker potion effect, the weaker potion effect remains, but is hidden. It returns after the stronger potion effect expires, if the weaker potion effect has a higher duration than the stronger potion effect.
However, from the API, using LivingEntity#getActivePotionEffects() doesn't return the hidden potion effects. There doesn't seem to be any way to get these hidden effects.
Describe the s...
Is your feature request related to a problem?
This is probably the only sensible way to prevent achievements from becoming meaningless on servers that use an additional creative world (besides the survival world) without bungee/waterfall.
It would also be good if you could deactivate achievements in creative mode (not only on special creative worlds, also on survival worlds in creative mode).
Describe the solution you'd like.
Make PlayerAdvancementDoneEvent cancellable or anothe...
PlayerAdvancementCriterionGrantEvent exists already and should do exactly what you are after.
[PaperMC/Paper] New comment on issue #9565: minecart stuck strangeness while running on powered_rail
Given we have yet to be able to find a proper reproduction steps for this issue, I'll be closing.
If anyone has reliable reproduction steps for this issue, feel 100% free to comment them here and we will reopen investigation into the issue, for now this simply seems not really fixable if we cannot even get it to happen on our end ๐
Expected behavior
Ability to break blocks.
Same goes for /rg toggle-bypass
Observed/Actual behavior
Hey You can't break that here.
java.lang.IllegalStateException: zip file closed after running /rg toggle-bypass
Steps/models to reproduce
Run /rg toggle-bypass in worldguard or try to break blocks in a region.
Plugin and Datapack List
Pa...
hazarding a guess, one of your busted plugins is somehow causing the command to fail
I can't tell you, advice would be to fix/remove plugins which failed to enable
Please run /paper dumpplugins and paste it here
Unable to reproduce this. In general, you'll want to try to reproduce the issue with no plugins first to rule out any issues from those, or stop by the discord and ask for help in the paper help channel.
Given the plugin linked does not appear to have any straight forward replication code and you are dealing with internals, this is pretty much unsupported land, you are on your own.
Feel free to pop by our discord where people might be able to help you with this, but this is certainly not a straight forward paper issue as neither spigot nor paper promise you to be able to create a fake player, you are just hacking with internals.
[PaperMC/Paper] New branch created: pw-158
[PaperMC/Paper] branch deleted: pw-158
Currently calling the setVelocity() has undefined behavior at best, and in addition there is no way to set a fireballs direction to anything other than a normalized vector. This PR fixes both of these problems at once by overriding the setVelocity method of fireballs to set the travel direction while bypassing the vanilla normalization, allowing for things such as freezing a fireball in-place or changing its speed.
Expected behavior
when you switch servers, your view distance should be the one in your options
Observed/Actual behavior
server sets your render distance to I think 2, you need to open options screen then close it and then it updates, I think closing options screen sends another options packet.
Steps/models to reproduce
on waterfall server, with 2 paper servers, switch from one to the other, your view distance gets set to 2 until you relog or open options menu.
Plugin an...
Expected behavior
loot table should not be null
Observed/Actual behavior
java.lang.NullPointerException: Cannot invoke "org.bukkit.loot.LootTable.getKey()" because the return value of "org.bukkit.event.world.LootGenerateEvent.getLootTable()" is null
it is marked as not null
/**
* Get the loot table used to generate loot.
*
* @return the loot table
*/
@NotNull
public LootTable getLootTable() {
return lootTable;
}
Steps/m...
Confirmed, I see the issue. will fix now
The aspect of switching servers would imply that this is not a paper issue, moving over to the waterfall tracker, but, given the nature of WF, the only real question is, have you tested with bungee?
Expected behavior
I would expect the PlayerProfile#setId method to set the UUID of the PlayerProfile.
Observed/Actual behavior
The UUID does not change.
Steps/models to reproduce
- Create a plugin and hook into the PlayerPreLoginEvent
- Attempt to modify the UUID to some arbitrary value
- Observe that the UUID does not change
Example snippet:
@EventHandler(priority = EventPriority.LOWEST)
public void onPreLogin(AsyncPlayerPreLoginEvent event) {
var exi...
Perhaps this was a typo during the commit
Yeah, this seems correct.
Should more overloads be added that take a Position instead of a Location for the pre-existing ray trace methods? Would require an additional one to call World#rayTraceEntities in World#rayTrace with a Position, and was wondering if it's necessary to add overloads for the shorter variants.
72f7945 Fix painting loosing art on face change (#9798) - Xander-de-Keijzer
At some point we will probably add some bytecode rewriting to just allow us to change those Location params to Position since Location implements Position. But that is for another time. For now, just use Position in new stuff where it is applicable.
Make sure Paper start and end comments surround areas of diff, there are quite a few missing.
This is also something which is very easily unit-testable. It could be nice to have unit tests covering the various methods to ensure they function correctly.
I don't think we have to add this either, especially since it doesn't follow Map#keySet's contract. Plus, I don't really see a ton of use for doing this which you can't already do and we don't want to encourage a ton of messing with other plugin's PDC.
This isn't a Map method and I think everything it does is covered by computeIfAbsent and Functions.constant().
Instead of taking a String, these methods can actually just take an adventure Key. That way the entire method body of get, has, remove, etc. can be moved into the private methods, and the public implementations can delegate to those private methods. It simplifies the diff dramatically. Make sure to change the toString() methods to asString() for the adventure Key tho.
69ce927 Make setVelocity method of Fireballs change the... - TrollyLoki
I agree with @Malfrador that a setBlockData method on FallingBlock is a better solution. I don't really like all the unique spawn methods for various things, Paper already has changes to make other entities work with the general spawn methods. Not sure we should be adding more.
7e5dd92 fix flat bedrock world config (#9728) - Machine-Maker
Alright, added an overload for World#rayTraceEntities, and changed the two added methods to take a Position .
Expected behavior
Either documentation or behavior regarding the position of any new advancement on the advancements screen.
Observed/Actual behavior
Any new advancement loaded via UnsafeValues#loadAdvancement is positioned in the top left (0, 0).
Steps/models to reproduce
this.getServer().getUnsafe().loadAdvancement(
NamespacedKey.minecraft("adventure/spyglass_at_pig"),
"""
{
"parent": "minecraft:adventure/spyglass_at_parrot",
"criteri...
5509610 Fix UnsafeValues#loadAdvancement (#9753) - LemonCaramel
After some thought with MM about this, I think we have to rethink a bit how we want to handle the backoff ticks.
Mostly for the following scenario:
Plugin developer A sets the backoff ticks to 20.
Plugin developer A expects the spawner to start searching again in 20 ticks.
Server owner B set a tick delay for mob spawners in the paper world config to 20 ticks.
This means that every 20 ticks the spawner will attempt to search, only decrementing the backoff ticks every 20 ticks, leading t...
The javadocs need updating, the event is called after players have been searched.
This could just be moved to the top ye ?
if the range is negative, just yield the entire list of players this iterates over/in the world/in the server.
1a4778d Fix PlayerSwapHandItemsEvent NPE when a hand se... - notTamion
Given that there is a PlayerUseUnknownEntityEvent, I think this is better left like it initially was, only called for unknown signs to not interfere with "normal" API usage.
2f5bb7e add predicate recipe choice only for potion mix... - Machine-Maker
My reasoning for doing it this way has been that while the unknown entities are known to be actually unknown because of the continually increasing entity id, there could be already a sign placed at the location where the local sign should be opened, so when he closes the sign editor the sign change handling would be passed to the real api which shoots it doen before the event is called because he wasn't allowed to do so.
This wouldn't require searching for a free space around the player to s...
Cheers for the feature request! I feel like this valid given the language of the method on the javadocs:
Returns all currently active PotionEffects on the living entity.
Although potion effects don't stack, being able to list them all, including ones of a lower level of the same type, seems handy.
Hey @imDaniX, have you had the chance to try out Machine-Marker's suggestion?
Yup, I've changed it to replicate the original getNearestPlayer function.
I think the previous author chose this name because PDC uses set() instead of put() but I'm not sure
Hey @imDaniX, have you had the chance to try out Machine-Marker's suggestion?
Yup, that's basically what I did. See here.
does the Spawner search Players? Might rename it to SpawnerSearchPlayerEvent?
I think if we are moving most of this to me as map like as possible, I think it would be best to use put here.
So should we change the set method to put then to, or add put as the adventure key method to not break api?
So:
set(NamespacedKey, ...)
put(Key, ...)
put(String, ...)?
We certainly cannot rename the method and break API.
I think it is honestly fine to leave it as put.
A "mistake" made when naming it, but certainly not remotely bad enough to warrent a rename.
But if we add new stuff, I think it is a good idea to stick to the map like naming if that is what the new methods aim to achieve.
You can't create a game profile with a null uuid
can you assign me this issue
You don't have to ask to be assigned an issue, just start working on a fix and when done create a pr that mentions this issue.
We can't assign issues to outsiders, and fwiw, this has been resolved
If the uuid argument is null, you should use Util.NIL_UUID. The GameProfile constructor does not accept null for either argument.
I don't think simulate is the correct word. It feels like it means its doing more than just checking what the collision would be. I think a better description would be the location used to calculate the collision shape, or something like that.
You can't create a game profile with a null uuid
Youre right, good catch kenny
Stack trace
11.10 16:31:55 [Server] ERROR [org.bukkit.configuration.serialization.ConfigurationSerialization] Could not call method 'public static org.bukkit.inventory.meta.ItemMeta org.bukkit.craftbukkit.v1_20_R2.inventory.CraftMetaItem$SerializableMeta.deserialize(java.util.Map) throws java.lang.Throwable' of class org.bukkit.craftbukkit.v1_20_R2.inventory.CraftMetaItem$SerializableMeta for deserialization
11.10 16:31:55 [Server] INFO java.lang.IllegalArgumentException: BlockStateTag(...
Known, to be resolved by the next upstream update.
Closes issue #8925
Accidentally closed the previous PR #9787
PDC now implements these methods
`
#put(Key, PersistentDataType, Object)
#has(Key, PersistentDataType)
#get(Key, PersistentDataType)
#remove(Key)
#has(Key)
#putIfAbsent(Key, PersistentDataType, Object)
#computeIfAbsent(Key, PersistentDataType, Function)
#computeIfPresent(Key, PersistentDataType, BiFunction)
#compute(Key, PersistentDataType, BiFunction)
#getOrThrow(Key, PersistentDataType, Supplier)
#getOrThrow(Key,...
I don't think you need the "string" methods anymore because you can just call the put(Key,...) methods from the set(NamespacedKey) method. That way none of the precondition checks are duplicated.
Same thing for this "string" method
Can you explain what you mean?
` @Override
public <T, Z> void set(NamespacedKey key, PersistentDataType<T, Z> type, Z value) {
Preconditions.checkArgument(key != null, "The NamespacedKey key cannot be null");
Preconditions.checkArgument(type != null, "The provided type cannot be null");
Preconditions.checkArgument(value != null, "The provided value cannot be null");
this.customDataTags.put(key, this.registry.wrap(type.getPrimitiveType(), type.toP...
no, just call this.put(key, type, value) from set. NamespacedKey extends Key.
Wait this is wrong, has now calls itself whoops, can I just cast it to Key to make is call the other has or how should I fix that?
Well yes, if the method name is the same, you have to cast. But for set/put its different so its not a concern.
70837e6 Updated Upstream (Bukkit/CraftBukkit/Spigot) - Machine-Maker
[PaperMC/Paper] New branch created: update-upstream
- [ ] address Paper's locateNearestBiome methods
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:
897a0a23 SPIGOT-5753: Back PotionType by a minecraft registry
255b2aa1 SPIGOT-7080: Add World#locateNearestBiome
ff984826 Remove javadoc.io doc links
CraftBukkit Changes:
71b0135cc SPIGOT-5753: Back PotionType by a minecraft regi...
Also added tests for the new PDC functions, all tests seem to pass
There are at least 2 events I know of that fire during the configuration stage before the ServerGamePacketListenerImpl has been created: PlayerClientOptionsChangeEvent and PlayerSpawnLocationEvent. In addition, there are the listeners for custom payloads that also run. This PR adds support for the functionality that is supported during the configuration phase, namely kicking players, sending custom resource packs, and sending custom payloads.
- [x] kick API
- [x] send...
Expected behavior
Bees should fly faster or lower depending on the attribute set of generic fly speed but they don't.
Observed/Actual behavior
There is a bug on the mojang bug website since 1.15 but it never got fixed.
Steps/models to reproduce
Create a bee entity, change the attribute fly speed and the bee keeps the default value.
You can test also with the command: /summon minecraft:bee ~ ~ ~ {Attributes:[{Name:"generic.flying_speed",Base:3.0}]}
Plugin and Datapa...
This patch adds a custom payload handler in ServerGamePacketListenerImpl to handle cancelled commands and cancelled chat messages from the proxy.
My current implementation wraps the cancelled packet into a plugin message, protocol changes will be handled by the updated implementation in Minecraft code and Velocity.
This is a draft and can/should be used for https://github.com/PaperMC/Velocity/pull/1100 and possible for Waterfall/BungeeCord.
for a good while, I've wanted the means to "handshake" between the proxy and the server some form of capability -esque sysem, that way the proxy and the server can see if they support this stuff, i.e. we can detect if we're able to tell the server that chat cycled rather than just having to assume it based on proto version or whatever, but, I did kinda get veto'd on this, so, idk
Yes, that's some open todo for velocity. For Paper it should be fine to listen to those plugin messages because there is no active logic that changes behavior.
Maybe we should just add it as config option to the velocity config and send that package then.
So should I scrap the current PR and implement the proposed alternative solution?
Also, should the specific spawning-methods (for spawning falling blocks/dropping items) be deprecated/marked as obsolete?
If we manage to get a FallingBlock#setBlockData (or the likes) to properly work, then yea, we could mark the special spawning method as @Obsolete and link the proper methods.
I'd keep this branch around tho, if implementing the setBlockData method seems too troublesome/runs into client restrictions down the line, we might just have to fall back onto this proposal.
Due to the fact that the block data of the FallingBlock is only sent to the client with the spawn packet, changing it at a later point would be tricky.
The entity would have to be removed for every player that is tracking it and then resent. If this is desired please let me know and I'll try to (hopefully) make it work
You should be able to call the .update() method after the block data is set, which should correctly resend the entity.
We need to verify that it looks correct on vanilla clients if you do that since it technically removes the old entity and adds a new one. It works for other entities like fireballs, paintings and item frames, but it should be verified that it looks correct.
That doesn't work. It isn't entity meta data, it is kind of an entity variant. See Spawn Entity Packet and Object Data
Feel free to add yourself as a co-author to the patches.
I don't think we need this. We don't confirm that its the correct instance in other places afaik so just a straight cast should be fine.
There are 2 other spawnFallingBlock methods and although they are already deprecated, the deprecation notice should be updated to point to the new method. We like to avoid double jumps in deprecation notices, like one deprecated method that points to another that points to the actual one.
Falling block entities have a field that can contain tile entity data. I guess that should get cleared when changing the BlockData of the entity?
Should I also add an getter / setter for that?
+ for (MobEffectInstance effect = this.hiddenEffect; effect != null; effect = effect.hiddenEffect) {
+ for (MobEffectInstance effect : handle.getHiddenEffects()) {
Idk if I am happy with the naming.
While technically correct, I think we should include the "hidden" part somehow in the name.
Given it is so close to the existing method, imo we want to make sure it is not confused easily.
Expected behavior
Tabbing commands should work no problem.
Observed/Actual behavior
When the player joins, they can use command tab completion just fine, but after a few minutes it seems to break randomly
It seems from packet logging, the client IS being sent tab completion packets, but refusing to show them:
S2C
TAB_COMPLETE
[a(int):0],
[b(com.mojang.brigadier.suggestion.Suggestions):Suggestions{range=StringRange{start=7, end=7}, suggestions=[Suggestion{range=StringRange...
Looking at MCP this behaviour makes no sense, it should be incrementing the transaction id:
public CompletableFuture<Suggestions> customSuggestion(CommandContext<?> p_212423_) {
if (this.pendingSuggestionsFuture != null) {
this.pendingSuggestionsFuture.cancel(false);
}
this.pendingSuggestionsFuture = new CompletableFuture<>();
int i = ++this.pendingSuggestionsId;
this.connection.send(new ServerboundCommandSuggestionPacket(i, p_212423_.get...
the id is reset when it gets a matching response, race condition? er ๐คท
here is footage of the problem: https://streamable.com/wcjpxc
damn, I cannot replicate the issue if I test with just the custom plugins, could a packet library be causing this?
would getAllPotionEffects be good? something like getHiddenPotionEffects is only an option if we make it not return the active ones. do you have an recommendations?
will fix in next commit
will fix in next commit
I mean, potentially ? Not being able to replicate this on a plain server does point in the direction of a plugin.
Can you please try to narrow down which plugin might be causing this, e.g. via binary search ?
Replication steps would be a requirement for us to keep this issue open ๐
Added getters and setters for the internal CompoundTag that represents the FallingBlocks placed BlockState
It is confirmed to be caused by packetevents, but I don't know how it could
be happening, it could be because I'm using both protocol lib and packet
events within the same plugin.
On Fri, 13 Oct 2023, 13:41 Bjarne Koll, @.***> wrote:
I mean, potentially ? Not being able to replicate this on a plain server
does point in the direction of a plugin.
Can you please try to narrow down which plugin might be causing this, e.g.
via binary search
<https://docs.papermc.io/pap...
Just listening in the event pipeline will have 0 implications, if those break it it's going to be down to some interactions on the packets or whatever, but, not our avenue
Implements API for getting, setting and resetting a player's idle duration.
Related to #6299, which exposed a getter for the idle time, but got closed because it went stale.
Starting in 1.20.2, when a new ServerPlayer instance is created its client options are populated with defaults using the ServerPlayer.updateOptions method.
This results in PlayerClientOptionsChangeEvent and PlayerLocaleChangeEvent being called before the server has actually received that information from the client.
This PR just makes it so the events are not called in the initialisation of ServerPlayer (i.e. on player login), consistent with behaviour before 1.20.2.
This can be merged into the patch which adds the option event.
The Paper team is made of volunteers who all have lives. We appreciate that you would like this to be merged and we thank you for your work, however bumping like this is only irritating. Please refrain from doing this in future ๐
The only "difference" to Vanilla behavior is when then experience reward will be determined, but otherwise it is left as is.
This supersedes #9762
3e9d2ac Don't call options events on login (#9834) - froobynooby
What is a potential usecase for setting the idle duration here?
Resetting I certainly get, but what would a manual setting be useful for ?
After a bit of thought, I think moving the time of computation and "ownership" of the experience value from the slot to the inventory is a tad of a dangerous game.
The experience does not exist, we move the time of computation here to a place that may potentially now be out of sync with the actual computation down the line.
Having the inventory "manage" the exp also allows plugins to magically change this value outside of any events being called if they simply keep a reference to it, l...
I was also thinking about the possibility of moving the accessors into the PrepareGrindstoreEvent.
The code in the CraftEventFactory would look a bit janky due to mutliple instanceof checks and casts but it would work.
Your opinion on that?
At this point... might as well just add a getOrDefault method that takes the adventure key too since that is the only one missing.
I think the javadocs here are somewhat misleading.
The method only computes the collision shape of the block data in the passed location without any placement like logic running.
That is fine, I can 100% see the usage of this method, but I think we need to be very detailed about what this method does.
From a) the name and b) the documentation it is not instantly obvious that this, e.g., would not have a Material.OAK_FENCE.createBlockData() return the shape a fence would be in at locati...
Any reason for the "placed" prefix here ?
I added that because the block state is not applied until the block is placed on landing.
But most blocks where that really matters aren't rendered properly, so it could be removed anyways
Yea, I mean given the fact that this method immediately changes the "block data"/looks of the falling block, I think it would be best to drop the placed prefix.
LGTM beyond the renaming issue, renaming can be resolved by the merger or author, whatever happens first.
Same here regarding the inversion of the block predicate.
The Predicate here should be inverted so as to match the Predicate the rayTraceEntities method uses. Returning true includes the block in the search.
Don't need to add this. We will change Location to Position at some point in the future.
Go ahead and at a boolean isFinite method to Position which the default implementation just checks if each component x, y, z are finite and returns true if it is. Then override that method in Location to also check the pitch and yaw. Then if its not, you can throw illegal argument exception.
This should probably live in the MCUtil patch as a utility.
e4d184f Replace bukkit Consumers with java consumers (#... - dawon
Ok, deprecated our two methods and delegated to the new ones. The newer methods are more powerful API despite not being designed correctly with the varargs parameter.
I've mainly used the get and reset method before, but when creating this PR it seemed odd to have a getter but no setter. I see no reason not to add it.
One possible use case for this would be to persist the idle duration between reconnects, but that seems like a very niche use case to me.
Well I am more concerned about the fact that, at least rn, Duration is a rather wide spectrum of numbers possible to be passed.
Passing some terribly high duration here would quickly end up with the player having an idle duration that makes 0 sense, e.g. longer than they have been online or longer than the server has been up.
Required because CraftWorld#rayTrace calls CraftWorld#rayTraceEntities with its start position. Could construct a location from the position, but that seems a bit jank.
Removing CustomModelData will change the look of the item for other players. That should not be removed like that.
852c1c2 Add additional tags to ItemMeta obfuscation fil... - Sytm
Changed. Personally, a predicate for which blocks to pass through made more sense to me, but matching the other predicate seems fine as well.
Is your feature request related to a problem?
My general problem is that players get kicked for server closed after the plugins got disabled
this causes the problem of PlayerQuitEvent/PlayerKickEvent not being called
This can lead for example to something like data not being stored or so
Describe the solution you'd like.
I'd love to see the player disconnect logic being handled before the plugins unload
Describe alternatives you've considered.
Right now when deali...
I don't really want to create a pr for this because first I want to get some input on this
maybe there is a good reason for this idk
Duplicate of #6911 and https://github.com/PaperMC/Paper/pull/9679.
Generally not something we can takle till hardfork imo, can keep discussion in the respective PR given how terribly low priority this is.
This issue has been mitigated for velocity, fwiw
Moves the methods from Zombie to Mob, as more Mobs can raise their arm(s).
I've marked the existing arms-raised API for Zombies as deprecated. Should this be deprecated, marked as obsolete or just left unchanged?
I was worried about this PR given that it had some side effects internally which where overlooked and I didn't have the means to test/look into it, finally having good hardware, finally got to testing it, and it looks fine
Expected behavior
I expect Paper not to insert any erroneous characters into the motd field of my server.properties file when using non-standard characters and starting the server.
Observed/Actual behavior
When the motd in the server.properties file contains non-standard characters, Paper inserts erroneous characters before or after them. As a side effect, each time the server is restarted, additional erroneous characters are inserted, which can eventually cause the server.properti...
Can reproduce.
Started with motd=ยงaCamms ยงbTest ยงcWorld, after restarting I got motd=รยงaCamms รยงbTest รยงcWorld. Tried again with motd=รMy MOTD and received motd=รยMy MOTD.
I mean, it is writing the properties file using UTF-8.
I presume whatever you use to edit the file saves it using something not UTF-8 which at least explains the initial "insertion" characters.
I was not able to have the server repeatedly insert these characters, are you mutating the server.properties file between server restarts somehow ?
[PaperMC/Paper] New branch created: cleanup-at
found via the new source AT applier in paperweight v2
the encoding of the file was changed to utf8 in 1.20, maybe OP just had an old file.
[PaperMC/Paper] branch deleted: restore/MC-2025-patch
I assume this incoming-packet-spam-threshold has been renamed to incoming-packet-threshold in newer versions of PaperMC now.
Actually what is the unit here, should I increase it or decrease it ?
This is peak encoding issues, using any panel/server management software? ik some loves to mess with the server.properties file which could be inducing the repeating issues, as otherwise, it's already been "converted" (read: mangled) from ascii/microsofts weird encoding over to utf8, and shouldn't go through further manglement
Expected behavior
Being able to create a GameProfile object with either the id or the name and therefore the following code working:
meta.setOwningPlayer(Bukkit.getOfflinePlayer(NOTCH_UUID)); // meta is a SkullMeta object,
See authlib v4.0.43:
public GameProfile(final UUID id, final String name) {
this.properties = new PropertyMap();
if (id == null && StringUtils.isBlank((CharSequence)name)) {
throw new IllegalArgumentException("Name and I...
I mean, it is writing the properties file using UTF-8. I presume whatever you use to edit the file saves it using something not UTF-8 which at least explains the initial "insertion" characters.
I was not able to have the server repeatedly insert these characters, are you mutating the server.properties file between server restarts somehow ?
My server.properties was already using UTF-8 when I noticed the issue and when I reproduced the issue.
This is peak encoding issues, usi...
itzg/minecraft-server does read/write the server.properties files.
https://github.com/itzg/docker-minecraft-server/issues/2433 tracks this. This is not a paper issue, I am closing this.
Is your feature request related to a problem?
since https://github.com/PaperMC/paper/commit/e57af7d01e509c747520cc1037169029256289bf
the paper jar has shrunk by 2mb, just letting you know, incase some shaded libraries may have accidentally been excluded.
Describe the solution you'd like.
N/A
Describe alternatives you've considered.
N/A
Other
No response
some unused netty dependencies in the paper have been removed.
As mentioned above, some unused dependencies were removed. Thanks for the concern though :)
it also says unknown version when i do /paper ver, why?
Stack trace
hs_err_pid78872.log
[paste your stack trace or a paste.gg link here!](https://pastebin.com/raw/DbXvgCeD)
Other hs_error_pid files
# Problematic frame:
# J 81333 c2 net.minecraft.world.entity.EntityLiving.h(Lnet/minecraft/world/phys/Vec3D;)V (1286 bytes) @ 0x00007f92d5d4a499 [0x00007f92d5d49d80+0x0000000000000719]
# Problematic frame:
# J 68260 c2 net.minecraft.server.level.ChunkProviderServer.a(Ljava/util/function/BooleanSupplier;Z)V (193 bytes) @ 0x0...
Segmentation faults are pretty much a "we tried to access a memory address that we don't own", this is generally caused by software bugs (which would be inside of native code, i.e. in this instance, the JVM), or hardware faults.
We can't really aid with this stuff on the issue tracker, the fact that it happened with more than one pice of software would generally suggest a wider issue, all I could advise is to run your own memory tests or something, not really our avenue
resolves #9736
This is an alternative to #9780
I personally find the other PR better since it also resolves confusing naming and also doesn't use isSilent of which the current behavior is unintended (and the only api that uses this boolean is deprecated)
But incase paper team thinks this is a better fix i will just open this pr
Opened an alternative pr incase you find that one better. personally i think this current pr is the better one for reasons i explained in the new pr.
This seems to be related to #9770
view latest comment and Lulus comment about the related issues
OfflinePlayer and PlayerProfile both indeed use GameProfile, which is where the breaking change is.
Expected behavior
On an older build of Paper this is what it looked like:
Raw terminal output: [0m[07:12:52 INFO]: [0;38:5:59m[[0;38:5:167m![0;38:5:59m] [0;38:5:167mUnable to find a matching player for the name: [0;38:5:231mzombachu[0;38:5:167m.
Observed/Actual behavior
On a 1.20.2 build of Paper it now looks like this:
Raw terminal output: `[0m[07:12:56 INFO]: [0;104m[[0;99m![0;104m] [0;99mUnable to find a matching player for the name: [0;102mzombachu[0;9...
The ANSI parser in Paper was recently updated, so the exact representation of certain colors may differ depending on detected terminal support. Does the old color match more closely to what it appears as in-game, or is it just different? It might help to provide a screenshot just so that it's more clear.
The old color matches what It is in game. Here's a better example, sorry about that:
<img width="995" alt="Screenshot 2023-10-16 at 11 08 02 PM" src="https://github.com/PaperMC/Paper/assets/7826590/77b72acd-2171-4f47-92b7-538748dfa6db">
<img width="466" alt="Screenshot 2023-10-16 at 11 07 59 PM" src="https://github.com/PaperMC/Paper/assets/7826590/af9682df-7e2f-4be7-8816-80a3a0e71f46">
(and in-game for the command before)
<img width="1504" alt="Screenshot 2023-10-16 at 11 11 48 PM" src=...
Is your feature request related to a problem?
There are no straightforward options for admins that want to freeze a world in an unchanging state. Specifically, to prevent world files from being written to. The best we can do is disable auto-save (in conjunction with Bukkit#unloadWorld(world, false) on disable) which is problematic because all chunk data is retained until a save which eats up RAM until the server inevitably crashes.
Side note: ChunkUnloadEvent#setSaveChunk(false) doesn...
We've been asked this a handful of times over the years, and it's just that theres never been enough of a demand for us to deal with the effort involved in such a change, especially with mojangs lack of decoupling of level state meaning that we cannot exactly assure where data comes from without wider modification, it's just a whole bunch of diff & engineering effort for such a niche use-case
What about restoring the functionality of ChunkUnloadEvent#setSaveChunk(false), or is that subject to the same level of effort required? If anything, I feel like it should be marked as deprecated or have a note added about it.
ChunkUnloadEvent#setSaveChunk(false),
This method works fine last I knew, but is highly caveated due to upstream not adopting the API to mojangs new chunk system, meaning that chunks are still saved to the disk even if they don't become to a level that bukkit considers "loaded"
In a minigame context, you should just be calling Bukkit.unloadWorld(world, false) in order to unload the world without saving. This is quick, does not save, and pretty quick. We use it in our minigames plugin's onDisable(), but you could call it whenever you needed to unload a minigame world.
In a minigame context, you can call
Bukkit.unloadWorld(world, false)in order to unload the world without saving. We use it in our minigames plugin'sonDisable(), but you could call it whenever you needed to unload a minigame world.
Yeah I suppose it's suitable for minigames. I'm doing this already, but in my case I have several large worlds that remain loaded for a while, so it just eats up way too much ram. My solution now is to have a duplicate directory of all the worlds and it...
In a minigame context, you can call
Bukkit.unloadWorld(world, false)in order to unload the world without saving. We use it in our minigames plugin'sonDisable(), but you could call it whenever you needed to unload a minigame world.Yeah I suppose it's suitable for minigames. I'm doing this already, but in my case I have several large worlds that remain loaded for a while, so it just eats up way too much ram. My solution now is to have a duplicate directory of all the worlds ...
Is your feature request related to a problem?
Mobs that do not despawn will cause lag.
Describe the solution you'd like.
Configuration that allows despawn of mobs holding items
- Blacklist/whitelist of items in hand(rotten_flesh, bone, arrow, egg, ink_sac...)
Describe alternatives you've considered.
I looked up the configuration.
Other
No response
you were a second faster....
I suppose this makes sense, general paper start and end comment things though please :)
Propper comments are missing though :)
It is very not smart to add null into that iterable.
ForwardingAudience#sendMessage for-loops over that and would promptly NPE.
also this.checkState(); is missing at the start of the line.
Should I do getOfflinePlayer instead? That would match CraftTeam#getPlayers()
Does it extend Audience?
Does it extend Audience?
nope lol i didn't say anything :p
I cannot reproduce this though.
I just used a modified version of the getPlayers defined in CraftTeam:
@Override
public @NotNull Iterable<? extends Audience> audiences() {
this.checkState();
ImmutableSet.Builder<org.bukkit.entity.Player> players = ImmutableSet.builder();
for (String playerName : this.team.getPlayers()) {
org.bukkit.entity.Player player = Bukkit.getPlayerExact(playerName);
if (player != null) {
players.add(player);
...
can you add me as co-author? xd
I am not sure but we might want to state, that it doesn't necessarily contain all members of the team as audience.
If you don't mind, I'd like to chime in. I agree with the suggestion getAllPotionEffects. To me, it indicates that the method will return all potion effects, hidden included.
I changed the method name to getAllPotionEffects since that seemed like the best option to me. i am still going to leave this open incase anyone objects
The setter already exists in RangedEntity#setChargingAttack so i wonder if the setter is still needed?
This override shouldn't be needed since internal already override this one?
The packets used to resend the entity can be moved into a bundle packet to process the packets in the same tick like the first time.
https://github.com/PaperMC/Paper/tree/master/patches/removed/1.20.2
We'll have to wait for Spottedleaf's entity tracker optimization patch.
Expected behavior
In CraftMapView#renderCache we store a map with player keys. We never remove from there. While the player instance is not to big. There might be other weak maps with player keys. Or the following scenario:
- player joins (and it put into the map)
- player switches worlds
- player quits
- second world is unloaded
- observice that there is a hard reference from the renderCache -> player -> old unloaded world
Observed/Actual behavior
We should clear the map or a...
What exactly do you mean?
I've added an override for pandas because vanilla always returns true for the internal isAggressive() if its variant is AGGRESSIVE. If I would remove this override, calling setAggressive(false) on a panda would have no effect on the return value of isAggressive().
The setChargingAttack and isChargingAttack stuff seems weird to me. isChargingAttack just checks if the entity is currently using an item (by redirecting to LivingEntity#isHandRaised), but setChargingAttack makes the entity aggressive which doesn't make the entity start/stop using an item immediately.
I'll deprecate them later today.
Don't forgot to update the DirtyCraftPersistentDataContainer class especially now there are some methods that doesn't put the dirty flag (the adventure keys one)
This new line is not needed
curvalue should be named curValue to use the same naming format (camel case)
The Paper end comment is missing
This import is not needed
Theses changes are not needed (even if it's correct it's more diff)
If you need to do something before each test you can use a @ BeforeEach method that would create an empty pdc for each test into a class field. Also you don't need to get a craft implementation, can use the api.
You can create an adventure key directly for all your cases i think
I think I would prefer some API in the EntityPickupItemEvent to control whether persistence is set for the mob or not rather than a global configuration. That way plugins could control this behavior more specifically.
Can confirm the same issue on my server: https://spark.lucko.me/GouO2WV6Ux
[04:59:54] [Server thread/ERROR]: [org.bukkit.configuration.serialization.ConfigurationSerialization] Could not call method 'public static org.bukkit.inventory.meta.ItemMeta org.bukkit.craftbukkit.v1_20_R2.inventory.CraftMetaItem$SerializableMeta.deserialize(java.util.Map) throws java.lang.Throwable' of class org.bukkit.craftbukkit.v1_20_R2.inventory.CraftMetaItem$SerializableMeta for deserialization
java.lang.IllegalArgumentException: BlockStateTag({
honey_level: "0"
}) is not a valid...
Can confirm the same issue on my server: https://spark.lucko.me/GouO2WV6Ux
This is very similar to my server spark profile.
https://github.com/PaperMC/Paper/blob/4b0bc74c90582f2d52d720c795228130545cd103/patches/removed/1.20.2/0414-Use-distance-map-to-optimise-entity-tracker.patch#L127-L145
I think just applying this patch can greatly improve performance.
@Spottedleaf Could you please check this issue?
Expected behavior
Simply get world of sculk block
Observed/Actual behavior
NullPointerException in Block#getWorld() method:
`[13:19:13 ERROR]: Could not pass event SculkBloomEvent to MyPlugin v1.0.0
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.GeneratorAccess.getMinecraftWorld()" because "this.world" is null
at org.bukkit.craftbukkit.v1_20_R2.block.CraftBlock.getWorld(CraftBlock.java:90) ~[paper-1.20.2.jar:git-Paper-241]
at com.myplug...
afaik, the patch wasn't applicable because of upstreams changes here, my understanding is that restoring that patch will help as it should reduce the number of entities it tries, but, upstreams changes to the visability API are the real performance kicker here
Cost is a property of individual enchantments, and is used by vanilla in combination with environmental aspects like tool enchantability and bookshelf count to determine the final cost of an enchantment as shown in an enchanting table.
Having access to the base cost of an enchantment using these vanilla methods can allow plugin developers to determine the "value" of an enchantment, and use it in custom logic where needed. I came across this recently when trying to assign an economic value ...
The big problem with Spark is that it is not compatible with Java OpenJ9...
I had to remove it a long time ago because we are running Java OpenJ9 for performance reasons (to fix docker issue with GC and RAM) and unfortunately Spark killed the Java machine on startup. It still the case en October 2023.
The Paper devs will abandon support for Timings to make way for Spark but if it is not OpenJ9 compatible some servers will no longer have effective profiling solutions :/
In addition, when ...
Public access is not needed in interface
The generic type <PotionEffect> is not needed in the right assignment, also in this part you skip completely the showIcon part that could be relevant on player with custom made potion.
Paper comments are not needed here you're already in a Paper comment block, same below
Feel free to add a bit of documentation here redirection only is annoying in the ide. Can say what will happen for some mob then redirect to the complete list of mobs
This diff is not needed it's better indeed but this will be part of the spigot cleanup it shouldn't be there
Missing a space between // and Paper end, also the setter is not really needed if the field is already public so you can either make the field private and use the setter or directly use the field access
You can use the java equivalent with Double.isFinite
This comment should be in lowercase
You can use the java equivalent with Float.isFinite
This doesn't seems complete, it seems spigot method has the same mistake
what exactly do you mean by the showIcon part? i assume that variable does exactly what its name suggests and i don't see how exactly that would be relevant for this API method
Closes #9855
This fix a NPE related to the block in SculkBloomEvent. I'm aware that spigot "fixed" this issue however it doesn't work because they forgot that the world of a block entity is set after its instance creation.
EntityEvent 2 was previously used to show damage effects. This is no longer used in modern clients.
+Fixes the issue of damage sounds not playing when the option is enabled.
I would also just delete the Level field that upstream adds in SculkCatalystBlockEntity$CatalystListener since it is also never updated. Best to delete it so that it isn't misused later for something else.
Or you could update that field as well, even if its not needed.
I would set the level directly via the sculkSpreader field instead of the getter. Just seems more safe that way in case the getter ever has more logic down the line or something.
I think the naming and javadocs of these methods need to make it more clear that its not the number of experience levels needed. As you briefly mention, its not the direct cost. I don't think calling it a "cost" is really correct. And the @return tag in the javadoc doesn't do anything to dispel that notion.
Maybe something like getMin/MaxModifiedCost? Since it is used when comparing it to the modified level amount on the enchant clicked.
I'm curious what this bit of diff was supposed to do originally? On the surface, it doesn't look like it has anything to do with knockback.
I did confirm that this change does change behavior back to what it was during 1.18.2.
For everyone who is able to build the server as long as this is not fixed:
In
src/main/java/net/minecraft/server/level/ChunkMap.java
replace
if (!player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) {
with
if (flag && !player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) {
That improved our servers performance a lot
And it might be worth to add it as a paper patch.
This diff was created in Paper 1.9. It's unrelated to knockback.
However, in Paper 1.8, it was actually used to disable knockback.
Paper is not OpenJ9 compatible too
I agree this concept of "cost" is a bit confusing. The original method names were mainly to match the Mojang ones, as the existing similar surrounding methods all did, but I've changed it them to be clearer. I've also updated the javadocs a bit, to hopefully try make it more obvious the cost isn't directly related to experience levels and to add a bit more context.
Paper is not OpenJ9 compatible too
I've been using Paper in OpenJ9 for years and it works perfectly.
This sounds like an issue that should be reported over at the GitHub of Spark with some logs and reproduction steps to get this incompatibility actually fixed
This sounds like an issue that should be reported over at the GitHub of Spark with some logs and reproduction steps to get this incompatibility actually fixed
Indeed you are right. I informed Luck on Spigot but he doesn't respond there...
I'll go to Github, thanks
a3e4d1a Don't check if we can see non-visible entities - Brokkonaut
I've pushed that one in your name, issue here is that the lack of that above patch means that we're apparently considering all entities for tracking, I did have a quick 2 second hit of applying it, but, it failed tragically, so going to need more effort than I can muster right now
These patches can be nicely squashed into the More Enchantment API patch that already exist for the server and the API. You can then add yourself as a co author of the patch with
Co-authored-by: Luis
I've pushed that one in your name, issue here is that the lack of that above patch means that we're apparently considering all entities for tracking, I did have a quick 2 second hit of applying it, but, it failed tragically, so going to need more effort than I can muster right now
That patch was actually done in Gale discord by me. There are a lot of areas where canSee can be skipped with more faster checks. I'll try to open a PR for that if i get some free time
For everyone who is able to build the server as long as this is not fixed: In src/main/java/net/minecraft/server/level/ChunkMap.java replace if (!player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) { with if (flag && !player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) { That improved our servers performance a lot
And it might be worth to add it as a paper patch.
This patch achieves similar MSPT performance improvements to my fork that just guts canSee enti...
See, the headache here is that it's in a stupidly hot area, and so reducing any calls will help
saving calls to that is good where possible, sadly not able to dig in too much because 0.6 eyes, but, there also looks to be a pretty severe binning issue here that we might want to see if we can look into
assuming by isTrackedChunk, you mean isChunkTracked, mojang got rid of that in .2, I did look into upgrading leafs patch but ended up with 0 entities, generally looks like a bunch of stuff wa...
Yes I meant isChunkTracked. I'd removed it at one point to try and chase down as high TPS as possible at higher playercounts but it might just be a bit of a placebo change, haven't done much analysis on it. Server seems to be running quite well though with just the simple patch currently on master.
Vanilla's visualOnly field is the skeleton trap boolean. All other uses of it for anything else should be reverted. Instead of using the vanilla field for what it originally ways, we are just changing its meaning, and adding a field to replace it. It should be the other way around. Add an "isEffect" boolean that is checked in the correct places, and remove visualOnly from anywhere it's not used in vanilla. Then make the API isEffect method return that new boolean.
Paper is not OpenJ9 compatible too
I've been using Paper on OpenJ9 for years and it works perfectly. Moreover, out of 86 plugins, all work in OpenJ9, except Spark...
I had the same problems a few months ago and was told on the Paper Discord that there was no support for OpenJ9.
But if you find out more, please let me know, ive been running on hotspot since then and the memory consumption is significantly higher. :/
https://discord.com/channels/289587909051416579/289587909051...
You can simplify this by using node.root()
It's a nbt key/field, when used to create a potion using a command or the api, the icon in the top right corner can be hidden in game (not in the inventory). By default it's set to follow the show_particles parameter but it could be different for custom effect. However in your method you ignore that, and so for those type of potions the getter (PotionEffect#hasIcon) will be wrong. It's really niche api but there's no reason to ignore it i think.
ah thanks. i used the getActivePotionEffects method as a starting point so i used the wrong overload
Expected behavior
Observed/Actual behavior
Steps/models to reproduce
- Setup a fresh paper server
- Give yourself op so you can make the worldborder small
- Run against the world border
Plugin and Datapack List
Server Plugins (0):
Paper version
This server is running Paper version git-Paper-243 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 3a5c6f8)
Other
No response
Can reproduce, this is related to the other world border collision issue, the collision of the border is completely different on Paper. And this will trigger the following check: https://github.com/PaperMC/Paper/blob/master/patches/server/0728-Optimise-collision-checking-in-player-move-packet-ha.patch#L138 even for legit player
This message when advancements are removed was added in 1.20.2. It doesn't provide anything useful and spams the console when removing advancements.
Would probably fit nicely into 0901-Improve-logging-and-errors.patch. That patch already has removal of unneeded logs.
What lynx said, this can go into the logging fixes patch.
489bff9 Temp fix for serialisable blockdata - electronicboy
90fe0d5 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#... - Machine-Maker
[PaperMC/Paper] branch deleted: update-upstream
6695245 Updated Upstream (Bukkit/CraftBukkit/Spigot) - 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:
5010ed00 PR-923: Back Particle by a minecraft registry
d47dd212 Increase clarity of errors when loading malformed plugin main classes
2c3c3337 PR-914: Make use of ApiStatus.Internal reather than deprecation
2b4c3b46 PR-922: Add keepSpawnInMemory setting to WorldCreator
CraftBukkit Changes:
75502b6dd S...
Good point. I've updated the patch.
https://github.com/PaperMC/Paper/blob/6695245f2f0809572e87e8f1e4efb23262657087/patches/server/0444-Brand-support.patch#L35-L39
Now, payload is always UnknownPayload, so I think you can remove it.
Long term, I would much rather we actually properly accommodate Mojangs mechanism around their custom types, rather than relying on yet another botch job, lest it bites us in the ass as per usual;
For those that encounter this after me, the fix is to build sqllite-jdbc for AIX (using gcc with the -maix64 flag instead of -m64) and place the resulting files in /usr/lib, this will then be autodetected on startup and allow paper to work
Expected behavior
The brush is enchantable, so MaterialTags.ENCHANTABLE.isTagged(Material.BRUSH) should return true
Observed/Actual behavior
MaterialTags.ENCHANTABLE.isTagged(Material.BRUSH) return false
Steps/models to reproduce
.
Plugin and Datapack List
.
Paper version
I am not using Paper, but I confirm that this occurred on the latest Paper
Other
No response
Paper is not OpenJ9 compatible too
I've been using Paper on OpenJ9 for years and it works perfectly. Moreover, out of 86 plugins, all work in OpenJ9, except Spark...
I had the same problems a few months ago and was told on the Paper Discord that there was no support for OpenJ9. But if you find out more, please let me know, ive been running on hotspot since then and the memory consumption is significantly higher. :/
I will close this, as its not related to paper in any way (other than that we bundle that sqlite driver I think?)
ideally you would PR natives for AIX to the driver and we can pull it in I guess? then everybody can benefit from your fix.
other than that, there is nothing we can do here.
public class MaterialTagsTest extends AbstractTestingBase {
@Test
public void testEnchantables() {
for (final Item item : BuiltInRegistries.ITEM) {
boolean hasMatch = false;
Set<EnchantmentCategory> matched = new HashSet<>();
for (final EnchantmentCategory value : EnchantmentCategory.values()) {
if (value.canEnchant(item)) {
hasMatch = true;
matched.add(value);
...
Rewrite the CustomPayload handler using Mojang mechanism
https://github.com/PaperMC/Paper/pull/9861#issuecomment-1774357124
public final class TestPlugin extends JavaPlugin implements Listener, PluginMessageListener {
@Override
public void onEnable() {
this.getServer().getPluginManager().registerEvents(this, this);
this.getServer().getMessenger().registerIncomingPluginChannel(this, "minecraft:brand", this);
}
@Override
public void on...
Fixes LivingEntity#getPotionEffect and LivingEntity#getActivePotionEffects not passing the icon flag in the PotionEffect ctor
CraftPotionUtil#toBukkit seems to also still be using the old constructor which could be added aswell here.
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
What about CraftPotionUtil#toBukkit ?
Would probably fit nicely into this PR too.
Not sure if i should have also added a variable but adding paper comments around those two lines just seemed kinda ugly. Let me know what you think
should be all now (i hope)
Now that you fixed the util you can use them (CraftPotionUtil#toBukkit, the class is already imported too), same below, above and in your other pr if this one is merged before the other
this allows for simpler checks for if an advancement would be given to a player,
and denying it (as the advancement grant event is non-cancelable)
feedback wanted:
- [ ] is
isGrantingAdvancement()actually a good function name / should i find something else and rename it? - [ ] is the constructor of events "api"? should i keep the old constructor, or ditch it?
- [ ] is it ok to rename the patch from just
PlayerAdvancementCriterionGrantEvent?
not sure if i did this correctly that modifying was confusing. Could you look over that?
Please wait until #9864 is merged since i can then rebase and use CraftPotionUtil
c1ac983 Fix log level of advancement debug message (#9860) - jpenilla
Is your feature request related to a problem?
When the online mode is set to false, the user must connect to the server first, and then be manually saved to the whitelist. After that, the user's UUID is saved to the JSON file automatically.
To ensure the user's UUID is added to the whitelist before they connect, an automatic process is good
Describe the solution you'd like.
I modified a news UUID in the client launcher and saved it to the server whitelist. when connecting to Pap...
offline mode is not supported.
The /whitelist add command works perfectly fine with online-mode set to false.
Provide accurate steps to reproduce an actual issue or what's the feature you're requesting.
UUIDs are calculated by the server during login for offline mode players, as part of mojangs code, so, this is purely WAI
So, any news about the issue? Almost a month we have terrible perfomance without any ability to have more than 40 players online on 1.20.2 without drops to 10 tps
Still generally waiting on leaf, I tried porting the patch in my death but but it failed, needs deeper attention
@StKillReal are you on the latest Paper? One of the recent patches significantly improved performance for me and brought it up almost exactly to what I was able to get with my own changes. Can handle 50+ people on with a solid 20 TPS, albeit on my fairly well optimized server
@codeHusky yep, I've updated build. I suppose u mean build 242 about "Don't check if we can see non-visible entities". Now it looks better, but still works really worse than 1.20.1. Even now with 20 players online I have +-40 MSPT
Can confirm the same issue on my server: https://spark.lucko.me/GouO2WV6Ux
This is very similar to my server spark profile.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 28c6ec04750daca3d77a0cee2b9f17f2508662cc..994b07...
Yea, some blobs of that are applicable as-is, I just need to look into why I wasn't getting any entities at all after I'd tried to update the patch entirely
The docs for the EntityEquipment drop chance-related methods all say
A drop chance of 1.0F will always drop
which is misleading/false. Setting the chance to 1.0F will make it always drop if a player is responsible for killing the entity. Setting it to 1.00001F (or anything above 1) will make it so that it will drop when killed by anything, not just a player. This either needs to be documented or API added to set guaranteed drops.
Resolves: #9794
I'm not sure what to do about the patch number, don't know if it's fine as-is, or if it should be changed, so I just left it and let rebuildPatches handle it.
Tested it, and it seems to be working just fine!
Should i create a new paper patch instead of a fixup?
This looks like its a new patch.
For now, don't use imports, but FQN instead.
This looks like its a new patch. For now, don't use imports, but FQN instead.
Ah sorry now that you mention it males total since as it would be annoying when resolving upstream conflicts
Paper is not OpenJ9 compatible too
I've been using Paper on OpenJ9 for years and it works perfectly. Moreover, out of 86 plugins, all work in OpenJ9, except Spark...
I had the same problems a few months ago and was told on the Paper Discord that there was no support for OpenJ9. But if you find out more, please let me know, ive been running on hotspot since then and the memory consumption is significantly higher. :/
[discord.com/channels/289...
This issue is for planning and discussing Spark's future integration into Paper, not HotSpot's ability to run on docker or OpenJ9's performance metrics.
This issue is for planning and discussing Spark's future integration into Paper, not HotSpot's ability to run on docker or OpenJ9's performance metrics.
Except that many servers run on OpenJ9 because OpenJDK has a significant memory leak due to docker, especially among hosts using Ptero. So if Spark does not run on J9, by making the decision to integrate Spark instead of timings, you will put all these servers in difficulty.
Ignoring this and brushing it aside is irrelevant, especially...
I've not heard of a memory leak inside of OpenJDK, just a general misunderstanding of how javas memory model works (and the odd once in a blue moon native leak nobody has ever managed to figure out), and its application of such when running in a resource-constrained environment.
But, even if there was a leak, that generally does not change the fact that we do not support non-hotspot JVMs. You are more than welcome to use them, many dozen people run paper inside of Graal or OpenJ9, however,...
I would like to point out that the servers experiencing this problem have nothing to do with it, they depend on the choices of their server hosts and for ordinary people, it is impossible to know in advance if this or that host will have an environment incompatible :/
It's not our role to go out of our way to cater towards hosts enforcing unsupported environments onto people, especially ones which are commonly known within the java community to come with their own host of headaches and potential caveats/issues.
timings is no longer a small inconsequential % of the servers mspt and is slowly becoming less and less useful over the years due to mojangs complexity meaning that we'd need to drastically increase timings coverage for it to remain to be useful,...
Spark killed the Java machine on startup. It still the case en October 2023
I should mention that I am able to start and run a server running OpenJ9 with Spark installed just fine, use the profiler and everything, so there seems to be some other external environmental issues at play than just "it crashes on startup".
I removed the word placed and replaced it with calculated as I did in the parameter description. Also added another line clarifying that the result may differ from what would actually result if the block was actually placed.
same problem in the 1.20.2 :( until today it has not been corrected
This fix would be great, I'm waiting
+ this.sendEquipmentChange(entity, java.util.Collections.singletonMap(slot, item)); // Paper - replace Map.of to allow null values
maybe a bit more explicit?
maybe change the patch title to into allow null items for ...
Expected behavior
Location location = ...
Location above = location.add(0, 1, 0);
Location below = location.subtract(0, 1, 0);
is the code that I have. For some reason, location, above and below all return the same values.
Observed/Actual behavior
Results of a Logger.info
Location=Location{world=CraftWorld{name=world},x=-3.0,y=-59.0,z=0.0,pitch=0.0,yaw=0.0}
above=Location{world=CraftWorld{name=world},x=-3.0,y=-59.0,z=0.0,pitch=0.0,yaw=0.0}...
check the javadocs, add modifies and returns the same location, the result you are seeing is expected.
try logging location before and after add and you will see the change.
gson returns null when given an empty string/file, this PR adds a null check so that an empty version history file doesn't crash the server
Locations are mutable as mini said, if you clone the location before adding/subtracting it'll work.
acc6d01 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#... - Machine-Maker
[PaperMC/Paper] branch deleted: update-upstream
Hello hello! I'm a java junior dev and I'd be interested in helping out. Could I be assigned to this?
We generally don't assign issues, you are free to open a PR however to resolve this!
As cat said, we might want to look into creating tests for this to prevent us from missing stuff in the future, however I think it would be fine to merge a PR only fixing this specific issue too if you don't feel comfortable in creating test cases.
We can always open a new issue to create test cases later.
I'll have a look then! Thank you very much.
Should we be checking both customBlockData and customTileEntity to not be null here?
Right now it is a pretty implicit contract to pass either both null or both not null.
If a deserialized block does not have an associated tile entity, the passed customTileEntity will be null but customBlockData will not be. I am essentially using the non-null status of customBlockData as a flag to indicate that it should use the customTileEntity be it null or non-null instead of getting the tile entity from the world.
Would it be better to have a separate boolean argument specifying which block data and tile entity should be used?
Hmmm, no I think this is fine then. Would probably update the comment above the method talking about this to be a bit more specific then.
I'll go through a deeper review this weekend (tomorrow hopefully), but yea, should be fine then.
Expected behavior
GUI to open
Observed/Actual behavior
Player falls through void and is completely glitched
Steps/models to reproduce
Open a custom GUI from a plugin
Plugin and Datapack List
Paper version
This server is running Paper version git-Paper-249 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 996d529)
You are running the latest version
Pr...
Notes
I get the same error when I try to manually send a ClientboundSetEquipment Packet with an Skull_Item ItemStack containing the skin profile of a player to a target Armorstand Head Item Slot.
Expected behavior
The Armorstand shows the item fine like on other spigot 1.20.2 versions.
Observed/Actual behavior
The client crashes and disconnects from the server.
Paper version
Observed the same in git-Paper-249 and git-Paper-248. The log below is from 248....
The plugin is using reflections to set a profile incorrectlly.
Spigot should be spamming you with a warning that a plugin is messing up.
Paper has yet to pull the "fix" spigot added for this, in reality the plugin is simply incorrectly using internals.
If you want to set the profile in a CraftMetaSkull, make sure to also update serializedProfile manually or by using setProfile instead.
Expected behavior
A given PlayerProfile should be set to a SkullMeta.
Observed/Actual behavior
I get the following error:
java.lang.NullPointerException: Cannot invoke "org.bukkit.profile.PlayerProfile.getTextures()" because "ownerProfile" is null
at org.bukkit.craftbukkit.v1_20_R2.inventory.CraftMetaSkull.applyToItem(CraftMetaSkull.java:148) ~[paper-1.20.2.jar:git-Paper-249]
at org.bukkit.craftbukkit.v1_20_R2.inventory.CraftItemStack.setItemMeta(CraftItemStack.java:659) ...
Player profiles without a name are not really a thing anymore in 1.20.2.
We mitigate it somewhat by making the name an empty string, but this seems to break with spigots logic.
For now, add a name to the profile creation.
Expected behavior
Clean start-up and plugin usage, as occurred with Paper build 246 and prior
Observed/Actual behavior
Errors reported on plugin enable or usage (depending on the plugin) for a number of plugins, including AdminVault and DeluxeMenus, similar in character to the following
[12:55:18] [Server thread/INFO]: [AdminVault] Enabling AdminVault v1.0.1
[12:55:18] [Server thread/ERROR]: [org.bukkit.configuration.serialization.ConfigurationSerialization] Could not call m...
Ok, so the issue here, is a profile is trying to be deserialized that doesn't have a name.
The various plugins haven't changed their usage. Only Paper has been updated.
The various plugins haven't changed their usage. Only Paper has been updated
Yeah, I get that. This is all just caused by mojang making a name and uuid required for a gameprofile in 1.20.2 whereas previously it was a name or uuid.
a8d02a7 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:
19830133 PR-925: Add hit entity/block to events extending ProjectileHitEvent
CraftBukkit Changes:
5a72c3c04 SPIGOT-7510: Try to fix broken reflection usage of plugins
6fa69f235 PR-1281: Add hit entity/block to events extending ProjectileHitEvent
224f733ac Fix NPE introduced in f4d977e
Closes...
Is your feature request related to a problem?
getPromptText(ConversationContext) requires a return type of string, which is too old for me. I only create message handlers that only convert message to net.kyori.adventure.text.Component. I don't want to make another string converter.
Describe the solution you'd like.
- Change getPromptText(ConversationContext)'s return type to net.kyori.adventure.text.Component.
- Or create another basic prompt class to use net.kyori.adventure.tex...
There was a similar issue to this opened in the past. In general, we are more set on deprecating this api.
I tried it and it works well.
if you need any assitance just join #paper-dev on our discord (https://discord.gg/papermc) and I am sure people will be happy to help :)
Is your feature request related to a problem?
I think you should be able to stop players messages from being logged to the console without using a plugin. There is also a flag to keep commands executed by players from be logged to console in spigot.yml so i don't see a reason why not to add one for player messages aswell
Describe the solution you'd like.
Prevent the ConsoleSender from being added to the audience when a message is sent and also add a check in MinecraftServer#logChat...
Stack trace
The server has stopped responding!
Please report this to PaperSpigot directly!
Be sure to include ALL relevant console errors and Minecraft crash reports
PaperSpigot version: git-PaperSpigot-445 (MC: 1.8.8)
------------------------------
Server thread dump (Look for plugins here before reporting to PaperSpigot!):
16.57.36
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.Sch...
I think this should do the trick. I also want to add some tests but I need some more familiarity with the structure of paper so might need some help there.
For starting the PR is good handle the main issue, also i recommed you try to edit the original patch where this Tags was added. you can check here https://github.com/PaperMC/Paper/blob/master/CONTRIBUTING.md#modifying-patches for know how to edit a patch.
My original comment generally showcased that there was a bunch of stuff missing from the enchantables set which should also be added
Expected behavior
Able to get client brand name
Observed/Actual behavior
Client brand name is null
Steps/models to reproduce
Run paper server with
- player.getClientBrand() will return what client player use
When run paper server behind velocity - player.getClientBrand() will return null
When use the plugin to run on Velocity - player.getClientBrand() will return what client player use
plugin is just
@EventHandler
public void onJoin(PlayerJoinEvent event) {...
That would scream that this is a velocity issue
8cf2503 Updated Upstream (Bukkit/CraftBukkit) (#9876) - Machine-Maker
[PaperMC/Paper] branch deleted: update-upstream
2935067 Fix null item in sendEquipmentChange (#9869) - SplotyCode
b3cac04 Fix crash when version_history.json is empty (#... - Warriorrrr
b1faa5d Fix PotionAPI ignores icon flag (#9864) - notTamion
52849f6 Cleanup disable explosion knockback patch (#9858) - LemonCaramel
Oh I feel very silly, I felt like I was missing something obvious. I will have a look at these things tomorrow.
8b1ac39 Fix warden spawn reason from DEFAULT to NATURAL... - Kenuux
Expected behavior
I think the solution is to change how the "natural" mobs are tracked. Just having a NATURAL spawn reason shouldn't be good enough. Instead, some other flag on "non-natural" mobs should be set, and only mobs without that flag should be counted.
For context:
https://github.com/PaperMC/Paper/issues/8283
Observed/Actual behavior
Steps/models to reproduce
Plugin and Datapack List
Paper version
Other
No response
c6fac38 fix UnsafeValues#loadAdvancement doesn't recalc... - LemonCaramel
I don't think that we need to move the handling stuff over is needed, just moreso the fact that it retains the OG buffer and then we can pass that through, but, I generally have nothing against this, it just doesn't retain the buffer as was desired, as then that can be passed to stuff
post that, we can generally look into the state of the plugin messaging API
Header might want a quick change
a81a384 Implement Velocity VarInt optimizations (#8418) - Gerrygames
415d708 [ci skip] Fix author in last patch - electronicboy
Please squash this into the add missing entity API patch
Issue can be reproduced by cancelling all PlayerStartSpectatingEntity events and sneaking after trying to start spectating an entity.
(btw 415d7081d2cdddba83b91a68cf2397ce95ac115b broke patching, I think the submodule-update wasn't intentional)
I apparently had some random branch checked out before I pushed that commit, should be fixed now, derp
5bb30ce Fix entity camera not being reset when cancelli... - booky10
This fixes players (which can't view the collector) seeing item pickups with themselves as the target, as the client defaults to themselves if the target entity can't be found.
Issue is reproducible by testing with 2 accounts and hiding one from the other.
Without fix: https://github.com/PaperMC/Paper/assets/53302036/c24e9000-b893-48e9-9288-39f4a5b4fc84
With fix: https://github.com/PaperMC/Paper/assets/53302036/ff6bf87a-e089-4e60-8236-1d45df0190ad
Please squash this into the add missing entity API patch
Rebased on master and merged patches
Upstream's commit here failed to account for the level not being set on the ServerPlayer if it doesn't point to a valid world. This adds a null check on the ServerLevel before getting the level key.
The various plugins haven't changed their usage. Only Paper has been updated
Yeah, I get that. This is all just caused by mojang making a name and uuid required for a gameprofile in 1.20.2 whereas previously it was a name or uuid.
Would an empty name be valid or we have to provide one, like Steve? This is what we did and it worked: (I'm not sure what version of paper was used for testing)
// Before
GameProfile profile = new GameProfile(UUID.randomUUID(), nul...
Would an empty name be valid or we have to provide one, like
Steve? This is what we did to fix DeluxeMenus on 1.20.2 and it worked: (I'm not sure what version of paper was used for testing)// Before GameProfile profile = new GameProfile(UUID.randomUUID(), null); // After GameProfile profile = new GameProfile(UUID.randomUUID(), "");
Well it just can't be Null. What you provide as name doesn't matter. Paper also just uses an Empty string afaik.
I'm asking because @SlimeDog said the error was produced with a dev version of DeluxeMenus that contains the fix https://ci.extendedclip.com/job/deluxemenus/167/
Fixed 1.20.2 basehead issues - GameProfile requires NonNull Name (#204) (commit: ee6b833) (details / [githubweb](https://github.com/extendedc...
Why this regression again? Are custom skulls allowed or not? This is causing issues when bukkit tries to load itemstacks from yaml in player vaults, player heads with a gameprofile containing no name but with textures in their gameprofile or have been valid since the beginning of time and widely used by plugins, please do not drop support for this as it results in corruption.
This is not bukkit's fault. Mojang doesn't allow name OR uuid anymore.
This is not bukkit's fault. Mojang doesn't allow name OR uuid anymore.
can we not just set a null name to an empty string and call it a day, i heard there was a nag about "inconsistant skulls" added, seems kinda silly IMO.
null name is the problem. A fix already sets it to an Empty string if name is null.
can we not just set a null name to an empty string and call it a day
Yes, however we are not going to modify mojangs auth lib to hack around plugins messing with unsupported internals
i heard there was a nag about "inconsistant skulls" added, seems kinda silly IMO.
Reflecting into skull meta to deal with profile related stuff has been broken in varying capacities for the past few years, as for why spigot doesn't just remove the applicable field that plugins reflect into and brea...
can we not just set a null name to an empty string and call it a day
Yes, however we are not going to modify mojangs auth lib to hack around plugins messing with unsupported internals
i heard there was a nag about "inconsistant skulls" added, seems kinda silly IMO.
Reflecting into skull meta to deal with profile related stuff has been broken in varying capacities for the past few years, as for why spigot doesn't just remove the applicable field that plugins reflect ...
So, part of the thing here is that spigot sets the default world to the overworld earlier if a world isn't loaded/found, which is likely what they're relying on here
Given that the OG issue that fixes is probably still a thing, this is probably the best fix as I don't think that we've had reports of the issue spigot is trying to fix?
Is there anything we (plugin devs) can do about this warning?
[16:53:28 WARN]: Found inconsistent skull meta, this should normally not happen and is not a Bukkit / Spigot issue, but one from a plugin you are using.
Bukkit will attempt to fix it this time for you, but may not be able to do this every time.
If you see this message after typing a command from a plugin, please report this to the plugin developer, they should use the api instead of relying on reflection (and doing it the w...
Yes, use the API properly
if you REALLY must use internals, then you'll need to make sure that you actually populate what iirc is the serialised profile field, see the internals for what goes on there, generally
1865625 Fix NPE when no valid world is found on legacy ... - Machine-Maker
Is this going to be merged anytime soon?
Expected behavior
In Vanilla, we can set the Duration of an area effect cloud to the integer max value (2,147,483,647) using the following comand :
summon area_effect_cloud ~ ~ ~ {Duration:2147483647}
This allow the area effect cloud to exists for 3.4 years, wich is "forever" in most uses. So, with Paper, the following code should be equivalent to the command :
world.spawnEntity(
location,
EntityType.AREA_EFFECT_CLOUD,
CreatureSpawnEvent.SpawnReason....
This is because of the waitTime as well. They are combined into an integer for a time. The waitTime defaults to 20, so there is where that difference comes from. This is WAI as far as I can tell. When you summon the entity, you don't specify a wait time. Try spawning one with max int duration and a WaitTime of 20.
Why are you overriding this? The nms call overrides the method anyways.
Actually, i have read the above comment. I am not sure why tho we still need this. Since this is a deviation of vanilla behavior. I am not sure if we should make this distinction here.
It didn't make sense to me as setting aggressive to false and then checking it would still return true. Still, like you said, it also doesn't align with vanilla.
Either way, I'll add a note to the javadoc for this.
This behavior is mostly expected id see. Cause even so, itโs just manually editing the flag, and so as long as docs properly say that this may sometimes have undefined behavior in relation to get/set aggressive, I think thatโs fine.
If a playerdata doesn't contain a valid, loaded world, reset to the main world spawn point.
This also squashes 2 very related patches
Supersedes https://github.com/PaperMC/Paper/pull/9116 but doesn't close the linked issue to that PR because I do think adding an event to control the target world is useful, but that will be in a PR after this one.
I think an event for this is a good idea, and once https://github.com/PaperMC/Paper/pull/9887 is merged, an event will be easy to add on top of it.
Sorry for opening a new pull request instead of using the previous one. I added the material tags I overlooked and instead of creating a new patch, edited a previous one. What do you think? I would still like to add some tests but might have to think about the implementation.
Is your feature request related to a problem?
There isn't a way to set biomes to be per-player
Describe the solution you'd like.
In the PlayerChunkLoadEvent or a new superevent of that, there should be a way to change the biome data sent to the client in order for each player to be able to get a different set of biomes.
I think this has to be a new superevent of PlayerChunkLoadEvent because biomes can change independent of chunks being sent to the client with the new fillbiome...
you missed the - between the authored and by :) maybe you can add it to the line above too? But another person should confirm this.
doh! but should not be too big a deal.
I'll wait for a second confirmation first.
I'll wait for a second confirmation first.
With the patches on my paper fork I'm getting pretty solid TPS with ~70 players
https://spark.lucko.me/r4qVDV3H0r
Here's my current patches: HuskyPaper-TPSFixes Patches
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+ private static final HandlerList HANDLER_LIST = new HandlerList();
I think method should marked with @Deprecated and @DoNotUse to catch any future uses of it since they should all use the method with a reason.
I dont really have a strong opinion on this. In our CraftLlama we could also remove some casts and for plugin devs it is always tedious to use ((X) ((CraftX) x).getHandle()).methodCall()
<img width="1682" alt="image" src="https://github.com/PaperMC/Paper/assets/31861387/ef3949a0-4a4e-4e4b-83c9-f9b295c72d8a">
We can also use casts but even with var it looks quite ugly using the fqn. Do you have fears of merge conflicts with upstream?
Putting BlockFace#getDirection into atan2 should give similar results and will work on NORTH_EAST, EAST_SOUTH_EAST etc. You mide need to invert the result because minecraft rotation is wired
While updating #9838 I've noticed that it wasn't possible to get the combined gene of a Panda using the API. This PR adds API to do this. I'm not too sure about the name of the method, vanilla just calls it "variant".
This AT is not needed anymore
The current test will fail (and it will throw) if the size is not increased by the proper number (75 here it seems)
Gotcha! I will make the appropriate changes this evening then. Thanks for the feedback.
What is the correct way to implement this for Paper servers? I need to despawn my entities in a chunk when it gets unloaded so that they do not get invalidated instead.
Expected behavior
After creating an anvil inventory with the Bukkit.createInventory() method, PrepareAnvilEvent must be called when controlled after it is opened to the player.
Observed/Actual behavior
However, PrepareAnvilEvent is not actually called and the inventory behaves as if the InventoryClickEvent was cancelled, and the item disappears on SHIFT+LEFT click control.
Steps/models to reproduce
The code is like this:
 are now converted to an adventure component by serializing to json and deserializing from json again.
Test plugin diff
Index: test-plugin/s...
You probably want to use this "family" of methods instead because it opens real inventories
Expected behavior
I expected just connect to my server like a player.
Observed/Actual behavior
When I tried to start my server crashed
Steps/models to reproduce
I tried to use the Iris plugin but I had to downgrade server version, and so I did, but when it fired up it just crashed!
Then i created another server same plugins an all those things and that server just disconnects player on join.
Plugin and Datapack List
BountyPlus-1.0-SNAPSHOT.jar
Citizens.jar
CustomScor...
1.19.2 is no longer supported.
Additionally, if you can replicate this on latest paper, please provide the entire server log instead of a small video of what looks to be a console.
I'll be closing this issue as unsupported till then.
You can also simply ask in our discord as I doubt this is really a paper issue more an issue in figuring out what kills your server, which github is not a nice place to investiage.
not sure if this is really needed since you can already get the bukkit AdvancementProgress using CraftPlayer#getAdvancementProgess(Advancement). Though i think adding a getAdvancementProgress method could still be a nice quality of life feature. But only returning a boolean seems not very useful to me when you could also return way more information