This is just a quick mockup of what I had in mind. Ignore the API, it is just quicker to make it not an interface+record. I didn't exhaustively test it, but the test in the test-plugin work so far.
#paper
1 messages ยท Page 5 of 1
Makes more sense i agree
This is just a quick mockup of what I had in mind. Ignore the API, it is just quicker to make it not an interface+record. I didn't exhaustively test it, but the test in the test plugin work so far.
Looks good to me! :) My PR was more of a proof of concept. I am fine with your implementation.
I think it depends on the actual implementation of itemPredicate. Maybe it would be better if the interface provided a cloning method as well.
You can go ahead and fixup yours
You can go ahead and fixup yours
Allright
You can go ahead and fix up yours
I created two new patches. Your implementation heavily inspires them. It is way cleaner to use the logic when a predicate is used.
Even fewer code changes than before. I tested things myself, and it works like a charm :)
Since we know that the extra map logic works, we use working code and add more item contents to its storage. In this case, the items that match any predicate choice.
It is a simple solution that brings many new possibilities to th...
Great work, will be very helpful! Do you plan on deprecating Bukkit command aliases? Or still support it officially
For add a related bug if in survival worlds the portal generate in the border of worldborder the player is stuck in the portal and the worldborder like the video.
resolves #8729
i decided to store the entities in a set since its not like there is one entity pushing another it just depends on which entity gets ticked first and then pushes both entities in opposite directions.
Perhaps use Set.of(entity1, entity2) instead to create an immutable set, because being able to change it does not really make sense for this implementation
Should be called cancelled
Add ApiStatus.Internal annotation to the constructor
HANDLER_LIST. Best to use the standards for naming static finals (no matter that upstream doesn't do that)
Isn't this naming style is used only for constants? HandlerList is changing when (un)registering listeners, so it should not be considered a constant.
convention within bukkit is to call it HANDLER_LIST
Expected behavior
Hi. I have a plugin that blocks wearing netherite armor. When I uploaded this plugin to my Velocity proxy and spam to wear netherite armor , the plugin suddenly stop working without any error and I can wear armor (Actually plugin works if I try to wear it with right click while holding it or shift+click in inventory. It only doesnt work When I drag to armor bar and spam). here is my velocity.toml (https://pastebin.com/S90Nmb4T). Do you have any sugestion for me to find ...
spam to wear
This is generally due to not handling the inventory drag event, velocity doesn't touch anything relating to this so is likely irrelevant. This is likely not a paper bug, at the very least, there is nothing reproducable to go off.
Is your feature request related to a problem?
Congrats on 10k issues/prs! Huge fan.
Describe the solution you'd like.
mooooooreeeeeeeeeeee
Describe alternatives you've considered.
less, but that's not an option
Other
No response
Congrats, you will be the owner of a deleted spam issue ๐
Added a new implementation to the branch.
[PaperMC/Paper] New branch created: dev/1.20.3
d85e6a7 add owner aware events - Machine-Maker
### Tasks
- [ ] Temporarily yoink [ComponentSerialization mixin](https://github.com/KyoriPowered/adventure-platform-fabric/compare/mc/1.20...snapshots/1.20.3)
cc78c7f fix serializing TextColor with name - Machine-Maker
iirc this method is strict about all lowercase, is that the desired behavior?
6c4efc9 fix mismatched bracket in game packet listener - Machine-Maker
0dee538 Upstream blocked Player#remove so our patch nee... - Machine-Maker
removes the shitty "version check" which basically just checks if the build is more than 21 days old.
I put the new check right after the git information is printed, which is probably where it fits the nicest without having to change anything about how the PaperVersionFetcher and the methods it calls work.
Unsure if this should be merged into the Implement PaperVersionFetcher patch
9227a96 Clean up username validation logic - Owen1212055
<img width="498" alt="Screenshot 2023-12-06 at 8 30 41โฏPM" src="https://github.com/PaperMC/Paper/assets/23108066/4161ac85-f322-4c2b-ab52-3b2c7f7e7aff">
For this there is alot of other missing disconnect wraps... why are we not wrapping everything in a task runnable? Confused here.
Expected behavior
Channel names can be allowed to be longer than 64 characters. Plugins channels are for interop with client mods, if modded frameworks such as NeoForge or Fabric don't enforce a limit, Paper shouldn't either.
Observed/Actual behavior
I got this bug report about my mod unable to connect to a Paper server on a Velocity server. I was told to report this as this network channel name limit is quite odd and very short.
https://github.com/TelepathicGrunt/Bumblezone/issu...
Hello. My problem was solved in a simple way. I wanted to have several servers on the same IP, united in one network. Go to the hub and from there already choose through the NPC on which server to go. One of them was a server with fabric modpack. Velocity kicked when trying to connect to the hub with modpack client and with this error. Because the hub server was on paper. I set up a redirection that the players who have the modpack client go straight to the fabric server. The rest of the pla...
No, this is still a valid issue (assuming paper has not yet removed this limit).
Expected behavior
No error is reported, and the mobs drop items normally.
Observed/Actual behavior
[17:45:52 ERROR]: Failed to handle packet net.minecraft.network.protocol.game.PacketPlayInUseEntity@59517911, suppressing error
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.Entity$DefaultDrop.stack()" because "drop" is null
at org.bukkit.craftbukkit.v1_20_R2.event.CraftEventFactory.callEntityDeathEvent(CraftEventFactory.java:975) ~[paper-1.2...
You put a null entry into the drops list, don't do that; idk if we'll protect against this
You put a null entry into the drops list, don't do that; idk if we'll protect against this
Itemstack nullability kinda needs to be standardized because in inventories itemstacks are null sometimes and in other places they are air, its a bit of a mess
This is purpur territory, not paper
You can use HandlerList.getHandlerLists() to get the handler lists of all events. You can then use this to either analyze all registered event handlers for all events, or register your own event handler(s) for each event.
You could for example register a handler at each event priority in each handler list and use that to monitor at which point the events got cancelled. And you can get all the registered event handlers of all other plugins and their event priorities, and then use this comb...
Remove viabackwards/viaversion and try again. Also use paste.gg for pasting logs
Remove viabackwards/viaversion and try again. Also use paste.gg for pasting logs
Expected behavior
When a player dies and their items drop, the dropped items do not despawn when the chunks are unloaded.
Observed/Actual behavior
When a player dies and their items drop, the dropped items despawn when the chunks are unloaded. If another player is nearby to keep the chunks loaded then the dropped itemd will not despawn.
Steps/models to reproduce
- Die with items when there are not any other players nearby
- Respawn somewhere else so that the chunks containin...
Not able to reproduce this issue on the latest version, did you touch the configs at all (i.e. item despawn rate)?
We have an open PR (https://github.com/PaperMC/Paper/pull/9024) that provides for more indepths logging for events. Tracking each handler and the state of each event before and after each handler is run. I think that would probably cover this.
This is purpur territory, not paper
Why not?
Well, paper isn't really there to make gameplay changes. It mainly tries to optimize the vanilla server and provide API for plugin devs. But im not the one to decide that. Its just what I think.
According to Plugin Message packet the channel itself does not have a limit, but Identifier has a limit. If we look up here we can see that Identifier can hold text of length 32767 bytes. So the max possible channel size is that 32767 bytes.
I wonder why spigot left there so small channel size limit. Maybe it's because minecraft used to have a limit set on the channel name but now it doesn't.
Also I removed the pr...
My mistake, you are correct, default server config solves the problem I will figure it out thanks for the help
2f92d4e Updated Upstream (Bukkit/CraftBukkit) - Machine-Maker
8d8eb3b optimise explosion damage further - Lulu13022002
Alright I've made a "fix" for this that simply ignores players when checking worldborder collision. I'm not sure if I should pr it since it's a rather suboptimal solution considering it allows people with cheats to just ignore the worldborder, but that is possible in vanilla/spigot too so idk.
If anyone wants the fix it's here: https://github.com/LaserSlime/Paper/tree/fix/world-border-collision Just make sure that your anticheat prevents people from bypassing the world border if it matters ...
7606e6d fixup tests and add missing API detected by tho... - Machine-Maker
For this there is alot of other missing disconnect wraps... why are we not wrapping everything in a task runnable? Confused here.
we actually do have something... or well cb does. Right before the kick event is fired, it checks if its not the primary thread and then moves to the primary thread. But I think this has been around for a while so idk why our fix is needed at all.
This new event call without a cause in the event is really an problem. Now it is not possible to allow plugin based teleports while disabling natural teleports without doing a stack walk..
Fixes incorrect array nullability annotations. For reference for anyone not reading this, arrays require 2 annotations (1 if the element type is primitive). Like
void someMethod(@NotNull String @Nullable [] array);
means that you can pass null or an array with no null elements.
adding the mob goals can be done via a plugin and papers mob goal api
[PaperMC/Paper] New comment on pull request #10007: fix more incorrect array nullability annotations
Not sure I like that amount of diff over what's effectively a cosmetic change, I think that should be left for later
unused uuid argument
- this.getHandle().connection.send(new ClientboundResourcePackPushPacket(UUID.randomUUID(), url, hash, required, promptComponent));
+ this.getHandle().connection.send(new ClientboundResourcePackPushPacket(uuid, url, hash, required, promptComponent));
Not to be merged, just for tracking purposes
[PaperMC/Paper] branch deleted: dev/1.20.3
Expected behavior
The block states / data sent to the client to match the values passed into the method, no matter which one i use.
Initial world state:
Successful block changes sent with player.sendBlockChange() or player.sendBlockChanges():
Successful reverting the block changes sen...
can you reproduce this using pure paper API code without other plugins installed?
[PaperMC/Paper] New tag created: 1.20.2
Paper 1.20.4 now uses a ReferenceOpenHashSet instead of a ObjectOpenCustomHashSet for the toRemove list, I still need to benchmark if this patch is still needed but after a brief smol benchmark that I've made, I think this patch still provides a performance improvement.
Stack trace
org.spongepowered.configurate.serialize.SerializationException: [anticheat, anti-xray, hidden-blocks, 21] of type java.util.List: Missing value in Registry[ResourceKey[minecraft:root / minecraft:block] (Stable)] with key minecraft:netherrite_block
at io.papermc.paper.configuration.serializer.registry.RegistryValueSerializer.convertFromResourceKey(RegistryValueSerializer.java:26)
at io.papermc.paper.configuration.serializer.registry.RegistryEntrySerializer.deserialize(Regi...
You have a spelling issue in your antixray config, it is
- minecraft:netherrite_block
+ minecraft:netherite_block
Yea after a quick look, this failed quietly in previous versions and now properly breaks.
Closing this as works as intended.
I've rewritten this PR for 1.20.3/1.20.4. This now translates translatable components when encoding using the serialization codec. I don't have much experience in working with Codecs, so I don't know if there is a more optiomal spot for converting and translating the components.
Adds the last 2 missing things, legacy deserialization handling for hover events and nbt components.
could probably use some unit tests
Updates key gen. Adds keys for Structure to demo the auto experimental detection. Also fixes some incorrect javadocs in RegistryKey
Almost everywhere EntityTeleportEvent (or a subclass) was used, the nullability of getTo was never checked despite it being marked as nullable (as well as setTo). This is really dumb, as what is null supposed to do? So I just made it act as being cancelled.
Also in one spot, the firing of the event for /teleport, the to location wasn't even respected if you called setTo.
So while I think the changes work... I would rather not use a ThreadLocal for this I think. Since this CODEC is global, it runs the risk of causing a problem. Lets say in someone's custom Translator, they do something that causes that CODEC to be used, since its on the same thread it will cause the rendering to take effect. I would rather there be a separate "rendering" codec that can be created with a locale. Could be a global map of them with the locale as the key, created as needed. Then t...
7f8ae7b Update and clean up api dependencies - Machine-Maker
[PaperMC/Paper] New branch created: dependency-cleanup
I removed the compileOnly dep on com.google.code.findbugs:jsr305:1.3.9, not sure what it was used for. API compiles just fine without it.
Fixes a bug where clicking on the SOUTH, EAST, or UP face of a block returns an incorrect block position.
This bug was introduced in #9211.
I'd keep the system property in case someone wants to lower it
Why not just cancel the event if passed null if the param should stay nullable?
Or honestly, just make it notnull if it's broken anyways lol
I'd keep the system property in case someone wants to lower it for whatever reason
Alright
166761f Update and clean up api dependencies (#10018) - Machine-Maker
[PaperMC/Paper] branch deleted: dependency-cleanup
3434a6f Update key gen for 1.20.4 (#10015) - Machine-Maker
dd16335 fix NPE when iterating over default drops (#10017) - Machine-Maker
Or honestly, just make it notnull if it's broken anyways lol
I considered that, but I would also have to change it for all the subclasses of EntityTeleportEvent which have constructors that are marked with @Nullable. Specifically for the EntityPortalEvent which has always respected null getTo.
[Paper] Branch feature/lifecycle-event-system was force-pushed to `61151ff`
I've now removed the ThreadLocal now and added a map with the translating codecs. I'm not quite sure how storing the direct codec would work, as I think children of components wouldn't be translated because its a recursive codec and we would only translate the component if the parent is also translatable.
What you ended up doing is fine, it is probably just possible to not have to recreate the whole codec each time, and still retain the recursive nature of it. But idk how big a deal that is, not like its gonna be creating a zillion codecs anyways.
This causes the world random to scream due to multi-thread acces
Do we also need catchers for the adventure sound methods? Should be added to the adventure patch if so.
Stack trace
[18:09:34] [Server thread/ERROR]: Failed to handle packet net.minecraft.network.protocol.game.PacketPlayInFlying$PacketPlayInPosition@1526a9be, suppressing error
java.lang.IllegalArgumentException: Cannot get property BlockStateEnum{name=sculk_sensor_phase, clazz=class net.minecraft.world.level.block.state.properties.SculkSensorPhase, values=[inactive, active, cooldown]} as it does not exist in Block{minecraft:sculk_catalyst}
at net.minecraft.world.level.block.state.S...
Extended the API around the decorated pot to encounter the new inventory in 1.20.3.
I wasn't sure where the best place was to add the DecoratedPotInventory interface / implementation.
There is a case to be made, if it would be better to put them in a Bukkits folder since it would future proof if upstream implement the same API. However, in that case these two patches should removed anyway.
Expected behavior
Entity being succesfully teleported as by tp command.
Observed/Actual behavior
Teleport fails when Item Display entity rides teleported entity.
Steps/models to reproduce
In my case, I create Slime mob like that:
`hitbox_ = loc.getWorld().spawn(loc, Slime.class, slime -> {
slime.setSize(3);
slime.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(5);
slime.addPotionEffect(PotionEffectType.HEAL.createEffect(1, 20));
// slime.addPotionEffec...
This has always been the case, teleportation of entities that are currently vehicles has not been allowed via the API for an eternity.
Teleport the entity with the retain passenger flag.
<details>
<summary>ComponentSerialization Diff</summary>
Index: src/main/java/net/minecraft/network/chat/ComponentSerialization.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/main/java/net/minecraft/network/chat/ComponentSerialization.java b/src/main/java/net/minecraft/network/chat/ComponentSerialization.java
--- a/src/main/java/net/minecraft...
The main necessary change was to send:
new ClientboundGameEventPacket(ClientboundGameEventPacket.LEVEL_CHUNKS_LOAD_START, 0.0F)
to do this I call sendLevelInfo, which is called by respawn and dimenstion teleport and has also this side-effect.
I also made the respawn packet code smaller.
Please do not open pull requests from the master branch, create a new branch instead.
The main necessary change was to send:
new ClientboundGameEventPacket(ClientboundGameEventPacket.LEVEL_CHUNKS_LOAD_START, 0.0F)
to do this I call sendLevelInfo, which is called by respawn and dimenstion teleport and has also this side-effect.
I also made the respawn packet code smaller.
Now it also resends the right permission level set in ops.json for the few people that actually use that "feature".
Expected behavior
When using this method on Spigot, you are able to send more than 1 resource pack to the client
Observed/Actual behavior
Paper added a patch (Server patch 1052) which removes all previous packs before sending new ones.
I noticed this in the code itself:
@Override
public void setResourcePack(UUID id, String url, byte[] hash, String prompt, boolean force) {
Preconditions.checkArgument(url != null, "Resource pack URL cannot be null");
if (has...
just use a ConcurrentHashMap instead
ComponentSerialization Diff
TestPlugin DiffWith these changes, Components are now no longer translated recursively (as expected):  is a possible bug.
If there are no tasks in the queue and therefor head.next() returns null, it will keep the head.
Therefor, it will keep holding the runnable and all objects that it references (including players) leading to potential memory leaks and unwanted consequences.
Details:
It seems like in the above case, both for-loops are not executed once as the conditions a...
I think this needs a null check, falling back to the AdventureCodecs.COMPONENT_CODEC
I think once we convert to adventure all we need to do is pass the result into the relevant adventure Codec, like is done above. Then we don't need to make #translated public either.
Maybe we should just modify the #localizedCodec methods to check for null before using the Map and return the base/non-localized Codec instead
Stack trace
debug=true in server.properties
[paste your stack trace or a paste.gg link here!](https://paste.gg/p/anonymous/3cd5449ad3d64a72807490e5c40faf39)
Plugin and Datapack List
No plugins.
Actions to reproduce (if known)
BOTH SERVER INSTANCES MUST BE USING THE MOJMAP VERSION OF PAPER
Setup a waterfall proxy.
Setup two servers in the proxy, a default server that the player is sent to when they connect, and another that will be connected to through /se...
So while I think the changes work... I would rather not use a ThreadLocal for this I think. Since this CODEC is global, it runs the risk of causing a problem. Lets say in someone's custom Translator, they do something that causes that CODEC to be used, since its on the same thread it will cause the rendering to take effect. I would rather there be a separate "rendering" codec that can be created with a locale. Could be a global map of them with the locale as the key, created as needed. Then t...
I think this misses some cases where ComponentSerialization.CODEC is used directly instead of passing the self codec, like show_text hover events. Solving that is more complicated though, so I think it's fine to leave for later and not block this improvement.
This misses some cases where ComponentSerialization.CODEC is used directly instead of passing the self codec, like show_text hover events. Solving that is more complicated though, so I think it's fine to leave for later and not block this improvement.
Solving this properly would probably require to re-create every codec requiring the Component codec for every locale. A quick workaround for this would be to just pass everything (which has show_text hover events, etc.) through the adventur...
Yeah, both options there are not very pretty, which is why I think we should just leave it for when/if someone finds a use case that justifies it. The only thing I can think of would be translating datapack messages with a plugin, but that feels really niche, and if someone needs that to work they can open an issue.
dc3ef2a Fix vanilla components not being translated (#9... - booky10
7e15d97 Remove no longer needed diff from adventure patch - jpenilla
94dfb25 Run round-trip adventure codec tests with JSON,... - jpenilla
[PaperMC/Paper] New branch created: javaops
Not sure whether we care to split the test additions and switch over to using JavaOps for conversions into separate PRs. For now, they are both in this one.
Should probably put that test util stuff into the test changes patch
f3cafba add single helper method for registering simple... - Machine-Maker
with a public field, no need for a getter
You should just be able to check the id returned by registerExact if it is -1, it's already been added to the exactChoice map.
This should be an interface that is backed by a package-private record implementation with static methods to create instances of it.
This type shouldn't exist
Do you plan on deprecating Bukkit command aliases?
I don't think we have to, its pretty barebones as-is, and just won't get updates (like it hasn't gotten updates in years anyways).
It is valid in vanilla to have a blockentitytag for an itemstack that does not have an id key specifying the type of block entity. This doesn't matter when placing the block because the block type determines the tile entity type, not the ID read from the nbt tag compound. Previously, CraftMetaBlockState expected the id tag except for 2 or 3 exceptions where it was manually added. Not sure why those were singled out, but now this adds a type override based on the specific material.
You ...
Happens frequently on my server too, coreprotect sees a placed shulker, player logs off, logs back in, the shulker is gone, he tries placing dirt to see if it was a visual bug, but it wasn't
<img width="422" alt="image" src="https://github.com/PaperMC/Paper/assets/25549272/301b2547-474c-4044-ac1b-0515ea29b9bb">
@bergerkiller reported that on Paper specifically, smooth sounds were getting messed up and I think this is the culprit. He'll test and confirm. Paper's network optimizations include a bit that makes packets dispatched async transfer to the main thread with the reasoning that 3rd party packet listeners like from protocollib mutate world state in those listeners and this makes that safer.
I'm curious if people think we should continue to do that? Packet listeners should understand that some...
This fixes the problem for me
Could this be, dunno, toggleable? I can see lots of reasons why we'd want packets to stay async the entire time without gumming up the MT.
that dispatching thing was generally done because we kinda got fed up of plugins killing the server doing stupid stuff in packet listeners; I do semi still agree with running them there, people seem to assume that they can still touch stuff because the server has some areas where mojang, in limited and isolationionary contexts, where they do
Ideally we'd ensure that both can be faciliated, but, that is moreso on plugin devs, we just wanna generally ensure that there is a safe way to do tha...
Any reason why there can't be some API that protocollib itself can talk to to tell paper that a particular packet should be sync? So, as soon as someone listens for sound packets sync, it runs it on the main thread? Cant see why it cant be dynamic...
Happens to me as well, and it's a big issue for my minigames network. Considering going back to 1.20.1 just because of this one issue.
Alright I've made a "fix" for this that simply ignores players when checking worldborder collision. I'm not sure if I should pr it since it's a rather suboptimal solution considering it allows people with cheats to just ignore the worldborder, but that is possible in vanilla/spigot too so idk. If anyone wants the fix it's here: https://github.com/LaserSlime/Paper/tree/fix/world-border-collision Just make sure that your anticheat prevents people from bypassing the world border if it's import...
fd6afbc 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:
b7a2ed41 SPIGOT-7530, PR-947: Add Player#removeResourcePack
9dd56255 SPIGOT-7527, PR-944: Add WindCharge#explode()
994a6163 Attempt upgrade of resolver libraries
CraftBukkit Changes:
c00438b39 SPIGOT-7530, PR-1313: Add Player#removeResourcePack
492dd80ce SPIGOT-7527, PR-1310: Add WindCharge#explode()
...
I could be wrong, but I believe theres also a sound packet to play a (registry) sound for an entity. To make a cow moo. I think the benefit was that the sound moves with the entity, unlike the normal sound packet.
Maybe that one should be included too.
This PR introduces an easily accessible number format API (using adventure styles and components) for scoreboard objectives for a feature introduced in 1.20.3.
Setting a number format can be as easy as this:
//Remove numbers
objective.setNumberFormat(BlankFormat.blank());
//Style numbers
objective.setNumberFormat(new StyledFormat(Style.style().color(NamedTextColor.GREEN).decorate(TextDecoration.BOLD).build()));
//Replace numbers
objective.setNumberFormat(new FixedFormat...
Please do not open pull requests from the master branch, create a new branch instead.
This PR introduces an easily accessible number format API (using adventure styles and components) for scoreboard objectives for a feature introduced in 1.20.3.
Setting a number format can be as easy as this:
//Remove numbers
objective.setNumberFormat(BlankFormat.blank());
//Style numbers
objective.setNumberFormat(new StyledFormat(Style.style().color(NamedTextColor.GREEN).decorate(TextDecoration.BOLD).build()));
//Replace numbers
objective.setNumberFormat(new FixedFormat...
Like that. Yes, we're sealed know. ๐ฅณ
In vanilla, you can set it per each score holder, right? How is that done here?
Hello guys ! Having the same issue. I fix this by rollback spigot.yml cactus modifier to 100. This bug appear when i have my cactus modifier to 150
In vanilla, you can set it per each score holder, right? How is that done here?
Unless I'm misunderstanding what the "objective" is
I totally missed that that's possible in vanilla. You can set it for the entire objective (e.g. your entire sidebar) or apparently per entry as well (which I missed)
I will add that asap
That's implemented now. With the latest commit, you can change the formatting of individual scores or the whole objective
Maybe up this and PR we waiting since 2 years lol
+ * @param format the number format to set, pass null to reset format to default
+ * Sets the number format for this objective's entries (scores)
Added in the newest commit
should use our codecs for conversions, not json, see the minecraft round trip style test in AdventureCodecsTest for an example.
All there records should be package-private and not exposed to the API. Instead, have interfaces with a method for each record parameter. The field for the blank format can be on the NumberFormat interface.
As jpenilla said, use the style codec from AdventureCodec to convert between the two.
Use Access Transformers (ATs) to make the field public instead of adding a getter.
Should use our codecs for conversions, not the GsonComponentSerializer, see the minecraft round trip style test in AdventureCodecsTest for an example. Also put the conversion methods at PaperAdventure.asVanilla/asMinecraft to be consistent.
So just we are on the same path: I should add a asVanilla method for the style conversion to PaperAdventure? Or do you mean the entire number formatting? (Probably not, but just making sure)
Aaaand should I update the adventure patch? Because a...
All there records should be package-private and not exposed to the API. Instead, have interfaces with a method for each record parameter. The field for the blank format can be on the NumberFormat interface.
Sorry, but I don't think I really get what you are asking me to do. ๐
As far as I can tell, you want me to either:
Package private the entire number format implementations and add static methods to the base interface for creation. But that would be an issue for accessing the numbe...
Aaaand should I update the adventure patch? Because as far as I can tell, everything inside that class comes from that patch and if I would put it in this one it could break multiple patches if this one would be removed (e.g. temporarily while upgrading), right?
Yeah, you can make asVanilla/asAdventure methods inside PaperAdventure that use the codec's and they should be in the adventure patch.
Or you want me to:
Create interfaces for every type and make the implementations private...
After some thoughts I probably would be against the nullability in the setter and just add a Reset record that is also sealed.
What do you think of @Machine-Maker, @jpenilla, @MenschenToaster ?
If we didn't want to have nullability in the setter, I would prefer a clear method instead. I don't think adding a type for resetting is a good idea.
no need for blank format, should just use an equality check to know that
Internally it makes sense, but for accessibility when querying the current format it can get confusing and just more difficult to check, right?
If somebody wants to know if it's a blank format, they would have to do:
if(!(format instanceof StyledFormat) && !(format instanceof FixedFormat)) return;
to know if it's a blank format or not. And if there would be a new format in the future, their code would be broken
By "equality check" I meant you can do
if (NumberFormat.blank().equals(format)) {}
By "equality check" I meant you can do
if (NumberFormat.blank().equals(format)) {}
That makes way more sense. Sure, then I'll do that
I could be wrong, but I believe theres also a sound packet to play a (registry) sound for an entity.
I included that one already. the sound entity packet.
name it component so you don't have to add a method to the record.
I think we should make these static methods that return these constants that can then be declared inside the package private record. similar to the blank instance.
Each of these should have @throws IllegalStateException if this objective has been unregsitered.
Looking into the logic further... This seems not ideal. What do we expect setNumberFormat to do on a score that doesn't exist? Is it right that it creates a score for this entry? I'm not sure it is. One possible solution is to throw an exception on these setters/getters if the score isn't set, can link to Score#isScoreSet to check that first or something.
Curious for opinions.
Following up on https://github.com/PaperMC/Paper/pull/10036 (which adds API for the new number format stuff), this adds API for per-score display names and trigger locking as well as per-objective auto updating display names.
This also fixes several critical issues with the scoreboard API caused by the 1.20.3/4 update. The new ScoreHolder type threw off logic expectations in the craft-impls.
I'm not confident in a few of the method names, the display auto updating and entry custom name ones.
I'm also not confident in the approach currently implemented for handling setting locked or custom name state on a score if the score doesn't exist. Right now it prevents creating an empty score, but that's not what vanilla commands do. The vanilla scoreboard commands will just create a blank one if you set a custom name or number format without first setting a score value.
Is your feature request related to a problem?
This is not really a problem, rather an inconvenience to deal with...
I am using docker to containerize my servers and always face the same issues when updating plugins, operators, whitelist, bans...
Due to the nature of docker volumes, it is not possible to save single files to a volume which are not inside a folder.
When updating plugins, I have to update the volume and the image.
Describe the solution you'd like.
So my proposal is...
I am pretty sure you can configure the settings.world-container in the bukkit.yml to move your "data" from the rest of your server data ?
What specifically are you looking to move into its own volume.
I already use the world container option, this is not my problem.
I want to move the other data away from the "persistent" files: plugin data, whitelist, operators, (ip-)bans
Missing annotation on the parameter
Missing annotation on the return type and parameter
I'm kind of against that. Having it like that shows the implementation directly to the devs that use this api.
Although these constants might change in order to stay consistent with Mojangs implementation, I don't think they ever will. So I'd prefer people to see what it actually does
They can still see them if they goto the source file. Package-private api source is still visible in the IDE or whatever, there isn't an issue with visibility. I think it is just cleaner if its in the impl instead of the interface.
Incidentally that's another reason for the interface+record pattern is keeping the interface as straightforward as possible.
Well, you're right, but I just think it's a bit easier to follow along when it's in the interface itself
I think throwing an exception is the best solution. Since that happens when the objective is unregistered as well
So my one thing against that is that the /scoreboard command does create an empty score if one doesn't exist if you only change the number format.
Sooo we should just leave it like I have it here? How about querying? Do we make that only accessible if there is a score?
de04cbc Updated Upstream (Bukkit/CraftBukkit) (#10034) - Machine-Maker
[PaperMC/Paper] branch deleted: update-upstream
If those values ever end up depending on internals, it is a lot easier for us to change things around if the values are exposed via methods vs fields.
Grabbing a different method result (via e.g. ServiceProvider) is a lot nicer than redefining these fields to a result of a ServiceProvider provided instance's method (e.g. ServiceProvider.get(ScoreboardStyles.class).blablabla() )
Might be worth to comment the current default of this value (just the number) in the javadocs.
Might need more comments on the @Nullable vs @NotNull given we expose NO_STYLE in the API now.
Ok, so I think the best solution is as follows...
Setters on Score should add the score if it doesn't exist. If we don't do that, we introduce behavior where calling the same methods in different orders behaves differently (setScore, setNumberFormat vs setNumberFormat, setScore).
Getters on Score should not add the score, but return some default value, null, false, 0, the default values for that type.
And this behavior can be documented in the javadocs
I think we are better off sticking to fluent naming here.
While spigot has not released their API yet, potentially clashing with them seems like a thing we might want to avoid.
Given there is no inherit value in this information and administrators that want to "skip" the current "out-of-date" message can just use the property, I am closing this PR.
I see the technical usage of it, but I don't think the extra web call to either downloads/github API are useful for anyone,
Merger pls use java.lang.Short.MAX_VALUE
Expected behavior
Look at the bug in that picture
Observed/Actual behavior
Watch This Video
https://www.mediafire.com/file/8ab8yx8n3zrvvs1/Minecraft__1.20.2_-_Multiplayer_%25283rd-party_Server%2529_2023-12-17_12-39-21.mp4/file
Steps/models to reproduce
Server Minecraft 1.20.4 / Server LifeSteal SMP Aternos
Plugin and Datapack ...
Expected behavior
Monsters in powder snow take freeze damage
Observed/Actual behavior
They sometimes don't hurt
https://youtu.be/7Kb0lKcQ7Ac
Steps/models to reproduce
1ใjust like in the video, build a testing site
2ใset nerf-spawner-mobs: true in spigot.yml (Just to keep them from jumping around)
3ใwait and see
Plugin and Datapack List
blank server
Paper version
This server is running Paper version git-Paper-330 (MC: 1.20.4) (Implementing API version 1.20.4-R...
The name is a bit weird, what about just displayName or customName to also stay consistent with other api?
Expected behavior
In 1.20.1, all lines was sent to the player if he tries to connect using old game version.
Observed/Actual behavior
Now, only Line 1 is sent.
Steps/models to reproduce
- Download experimental server build from https://papermc.io/downloads/paper
- Run it, accept the EULA, run it again and stop
- Change
messages.outdated-clientinspigot.ymlto somethi...
Do the rest of spigot yml message need changing too?
Please reproduce this with no plugins first as it's likely a plugin issue, just entering a portal like in your video is not enough to reproduce the issue.
It's the general, we want to do something about this, but,
- plugin authors have generally not uniformly been good at programming stuff in a good manner here, i.e. hardcoding their plugin data folder vs using the getDataFolder() method
- any time we've talked about cleaning up the folder structure, we've generally had many people against it, which while there seems to be more for than against this stuff, it creates the headaches over motivation for this sort of work
Stack trace
Plugin and Datapack List
Datapacks
- Terralith_1.20_v2.4.6
- Structory_1.20_v1.3.3
- Nullscape_1.20_v1.2.3
- Incendium_1.20_v5.3.2
Plugins - Custom Plugin I made (No issues)
- PhatLoots
Actions to reproduce (if known)
No response
Paper version
git-Paper-330 (MC: 1.20.4)
Other
No response
The problem is in datapacks themslefs
Missing a new line between the description and the parameter/return explanation, same for others
Missing a space between // and Paper, applies for other comments as well
Missing a space between if and (, same for other conditions
We should use adventure's legacy serializer instead of CraftChatMessage. Change the field type/name to adventure component, then wrap the component in PaperAdventure.asVanilla.
I see your point, but going the step and making it optional would probably encourage developer to adapt to the new possibilities in the future
Issue still occurs when border is changing in size
Issue still occurs when border is changing in size
Could you perhaps show a video?
Issue still occurs when border is changing in size
Could you perhaps show a video?
It needs to use the legacySection serializer
[Paper] Branch feature/registry-modification was force-pushed to `2c627bc`
e3140fb hotfix spawning item/xp in wrong spot - Machine-Maker
Rebased for 1.20.4. Tested by @Lulu13022002
I wonder if we should just send the packet itself then, instead of relying on that logic. Like what if we put an event call inside removeCooldown?
Expected behavior
PlayerDropItemEvent is only fired when a player actively drops an item
Observed/Actual behavior
PlayerDropItemEvent does fire when a player actively drops, but ALSO fired when a player dies
Steps/models to reproduce
- Put an item in your inventory
- Die
- Event is fired.
Plugin and Datapack List
No plugins, No datapacks.
Paper version
This server is running Paper version git-Paper-318 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPS...
9909fe3 work on updating to adventure 4.15 - Machine-Maker
[PaperMC/Paper] New branch created: feature/adventure-4.15
- [x] removeResourcePacks(UUID, UUID...)
- [x] clearResourcePacks
- [x] sendResourcePacks(ResourcePackRequest)
- [ ] request callbacks
- [ ] Translator#hasAnyTranslations (improve perf for rendering translatables)
- [ ] mark other send methods on Player as Obsolete/Deprecated?
- [ ] bundle packet
So we need to decide what happens if someone registers a callback for a UUID that already has one registered, and when exactly those callbacks are fired.
I slept on it... and I think I want to just revert the event being fired. There already is a way to get all the drops, via the death event.
I think we are better off sticking to fluent naming here. While spigot has not released their API yet, potentially clashing with them seems like a thing we might want to avoid.
With fluent naming, you mean numberFormat() as a getter and numberFormat(param) as a setter, like in the adventure APIs?
Jup, that is fluent naming.
So basically leave it like I already had it? I implemented a fix (pushing shortly) because it would throw a npe if the score had not been registered, but other than that, what you're suggesting is what it's already like?
Should I add these methods to the StyledFormat interface, or would you guys prefer to have that in the number format interface along the other methods?
Just noting that I can't replicate this in 1.20.4 Vanilla. Works fine: https://streamable.com/6jm35e
Ok, I think I handled suggestions with spaces correctly now. I had to build a custom parser to make sure words were created correctly and not separated purely on spaces.
There are a couple caveats that can probably be addressed. Querying completion while not at the end of the command probably doesn't work 100%, but I'm less concerned about that.
Ok, I think I handled suggestions with spaces correctly now. I had to build a custom parser to make sure words were created correctly and not separated purely on spaces.
There are a couple caveats that can probably be addressed. Querying completion while not at the end of the command probably doesn't work 100%, but I'm less concerned about that.
in progress.
I have also added a fromIndex method to Rotation, lmk if i should revert it / split it into another PR or smth.
since this is my first time delving into itemmeta, please tell me if I'm doing something wrong / miss anything
there are still TODO comments littered around for me to fix, but I might as well create the PR now for feedback
I wanted to put the CraftMetas in a paper package, but the need to extend the package private base class
is it possible to use inheritan...
0b95298 Make worldborder collisions consistent with Van... - Spottedleaf
Expected behavior
PlayerInteractEvent will only be fired once
Observed/Actual behavior
PlayerInteractEvent will be fired twice simultaneously
Use the following plugins for testing
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerInteract(final @NotNull PlayerInteractEvent e) {
e.getPlayer().sendMessage(e.getHand() + " " + Bukkit.getCurrentTick());
}
In survival mode

This makes advancements like "How did we get here?" impossible
Steps/models to reproduce
Eat a suspicious stew with t...
Confirmed. ItemMeta strikes again!
Fixes https://github.com/PaperMC/Paper/issues/10049
The default effect duration is 160, and if it is 160, vanilla does not store it in the NBT, but itemmeta doesn't know this so it gets changed to 0 when read and applied.
If you wait a few minutes @NoahHHN a link will appear at the top of this PR where you can download a paperclip jar to test if the issue is fixed. I did test it and it seems to fix the issue. Please not that its a 1.20.4 version, so don't put the jar in your server if you don't want to update to 1.20.4.
im sorry for not seing that one. Should i delete this issue?
Lol, no this issue is great. That linked is a pull request I just opened to fix the issue after you opened this issue.
Expected behavior
the player should pass through the worldborder and enter the allowed area
Observed/Actual behavior
after exiting the worldborder, when you try to re-enter, it will cause your character to freeze and glitch momentarily (denying access back inside)
Steps/models to reproduce
set worldborder to something like 20, go outside the world border, and try to go back in
Plugin and Datapack List
FastAsyncWorldEdit, Multiverse-Core, SkBee, Skript, spark
Vanilla da...
Oh, it also bugs when running against the worldborder, also freezing the player
This does not happen on vanilla / singleplayer.
Expected behavior
The maximum stack is 64(16 or 1 for some items)
Observed/Actual behavior
The maximum stack is 1
Steps/models to reproduce
It's quite difficult... (to explain the way that I used to enable experimental 1.21)
the easiest way (without editing level.dat in the world folder):
- Create a single-player world with experimental feature 1.21
- transfer the world to the server
- put a crafter
- try to put more than 1 item
Plugin and Datapack List
Plugins: no...
Merge this please, this long loading screen is so annoying
This is caused by CraftBukkit using a max stack size of 1:
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/nms-patches/net/minecraft/world/level/block/entity/CrafterBlockEntity.patch#22
This has been mitigated by https://github.com/PaperMC/Paper/commit/0b952981e6e96157d2cea8322c04c0f69965f2bf. The border edge now exists on Paper however there's still some issues especially with the collide of the edge. The item frame should not drop if placed at the border block (horizontally) with a border of size 10 and then shrinking to 9. And the player is rollback when the half size of the border is not an integer. This is essentially because there's no voxelshape intersection like in v...
That's odd, I just installed from https://papermc.io/downloads/paper a few days ago. Hmm
The collision at the edge is done using the voxelshape of the worldborder which is rounded. Since Paper doesn't use the voxelshape of the border some issues happens when the half size is not an integer.
Closes #9859 #9805
i love you so much Lulu
Timings or Profile link
n/a
Description of issue
Hi, I noticed that the code for updating players in the mob spawn map in the Optimise-chunk-tick-iteration patch was duplicated in b8f95587450deae4fde52cbee2a8aa12ff5f9225 while updating to 1.20.3/4. This looks like a mistake and isn't present in 1.20.2 0cdce89d595a2c1c097c9e2a5ff96687977b3b25 and could cause the PlayerNaturallySpawnCreaturesEvent event to be called twice.
Plugin and Datapack List
None
Server config file...
[PaperMC/Paper] New branch created: test-result-actions
A separate workflow is needed for this to work on PRs. The workflow complete trigger used won't work until it's on the default branch (merged).
See https://github.com/jpenilla/Paper/runs/19801456027 for an example of a test failure.
I think during 1.20.3/4 update, code adding players to the playerMobSpawnMob was duplicated and added outside the runsNormally (tick speed) check and inside. This removes that
8c007d9 properly read and store sus effect duration (#1... - Machine-Maker
Rebased and updated for 1.20.4.
Renamed type to MenuProperty
Added crafter options
Expected behavior
When a boat breaks a hanging entity, it should fire HangingBreakByEntityEvent
Observed/Actual behavior
When a boat breaks hanging entity, it fires HangingBreakEvent with PHYSICS cause, in thus not firing HangingBreakByEntityEvent
Steps/models to reproduce
Just ram into itemframe with a boat
Plugin and Datapack List
[02:07:12 INFO]: Bukkit Plugins: (78):
[02:07:13 INFO]: - AdvancedPets, *AdvancedReplay, AdventCalendar, *AwesomeSnow, BetterVote, ChestS...
https://pastebin.com/0axXD6uv
Adding this for more information
I'm not sure we are planning on expanding item metas more over owen's upcoming item property API which will replace the concept of item meta.
Correct, this is meant to be covered by a sort of โentityโ property api.
ok, should i stop work on this then?
ik there are no etas, but it seems a little while off, so some api might be better than none,
esp since from what i read here it doesnt replace itemmeta
I think these should def be displayed. It is invalid and just leaving or ignoring invalid input isn't a good thing here.
I don't think this is a concern anymore. You will not travel to or create portals above the bedrock roof if the void damage is enabled, even if the portal existed before that option was enabled.
5385b21 [ci skip] Make test results viewable in-browser... - jpenilla
[PaperMC/Paper] branch deleted: test-result-actions
Was just perusing the issues and noticed this one. I haven't had this happen to me in a long time, like many minecraft versions since the last time. It's possible its fixed. Unless someone chimes in that they've had it recently on a newer version, I'll close this in about a week.
Thanks for creating this feature request but we're going to reject & close this, @NeumimTo. @wordandahalf's comment above has some useful information should you still be looking for a solution!
The original issue has been mitigated. In older versions (like 1.18) there was the opportunity for stuff to be added to registries from the resources during runtime. That doesn't happen anymore. Regsitries are frozen before the server even starts after loading everything from datapacks/vanilla.
Hey @ItsVaidas, just a few things, you're running PurPur (this is Paper), and a very outdated build at that. Can you please reproduce this on the latest version of Paper? Cheers!
There definitely is something inconsistent with this. Left is Vanilla (1.20.4), and right is the latest stable version of Paper. For the purpose of consistency I didn't enable nerf-spawner-mobs. The Magma Cube's take a lot longer to actually take damage in the Paper world (if at all).
I've noticed:
- They always take the same amount of time to start shaking from the powdered snow effect.
- The damage doesn't start straight away like it does in Vanilla.
- The damage isn't consistent...
[Paper] Branch feature/bytecode-modification was force-pushed to `d8098d6`
[Paper] Branch feature/bytecode-modification was force-pushed to `5b7402f`
Groundwork for a better-designed bytecode modification framework for the larger structural changes we need to do. The utilities currently implemented are what was needed to split Position out of Location and manage return types and param types.
This framework includes generated classes with generated static methods and it's done all auto-magically. It is also versioned. It changes the api-version field for paper plugins to be specific to a minor version and won't run modifications not a...
c1d0691 Split Position from Location type hierarchy - Machine-Maker
[PaperMC/Paper] New branch created: feature/position-split
This is how the bytecode modification framework from https://github.com/PaperMC/Paper/pull/10060 is used to replace some parameter types with Position and make Location not implement Position anymore. The test plugin is setup to compile against current paper api and show that there are no compat breaks.
We are also experiencing this issue
77e70ba refactor mainly MethodMatcher - Machine-Maker
fff2bd6 Improve Registry - Machine-Maker
[PaperMC/Paper] New branch created: feature/improve-Registry
This is a key step to improving Registries and enabling better and more accurate API in the future. We cannot require all type parameters for Registry to implement Keyed because we need to be able to create instances of things like TrimMaterial and TrimPattern without a key as they can exist like that in the server.
Supersedes https://github.com/PaperMC/Paper/pull/9009
[PaperMC/Paper] branch deleted: feature/adventure-key
no asm expert, but why 1.8 and not 17?
all the param names should be adjusted too, or did you skip them to minimize diff (since you need to touch javadocs too)
also, some of them are paper methods, is it worth folding that back to the OG patch? or do we wait till softspoon?
I just chose some random methods to demo this for. =
We could start by just doing all methods that paper adds, but we really want to do it in large chunks so that there isn't a point where half the codebase is using one and not the other. That gets annoying real quick.
I just copied that from our ASMEventExecutorGenerator when I was still figuring out how to generate classes. We can change it if we want. Idk if it matters or not.
Hey @Leoparking, there's a few things:
[21:31:07 WARN]: Failed to parse resource pack prompt 'ไฝ ้่ฆไธ้จ็่ตๆบๅ '
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
This has to be JSON. You can use tools online to generate it for you.
SkinsRestorer
Offline mode isn't supported
*** Warning, you've not updated in a while! ***
...
Ok, I think I handled suggestions with spaces correctly now. I had to build a custom parser to make sure words were created correctly and not separated purely on spaces.
I tested it myself, and it does all seem to work as I expect. setblock's location argument, tp's entity selector argument, and the CommandAPI's MapArgument all look like they match up with the client's suggestions. I wouldn't say I understand the need for a custom parser since I thought Brigadier could handle all t...
This keeps crashing my server when an user tries to reconnect on this location
from a 2 second glance, I fail to see how this could occur unless something on the server induced an illegal world state, vanilla had logic to try to detect such issues last I knew, so, on the surface, all I can guess is to try without plugins, otherwise, we'd need some actual useful reproduction info
I believe that both players that caused this on my server where using an elytra while flying over an ancient city, then, disconnected (im not sure if it was due to a crash, or due to a network issue, restart, etc); and when trying to reconnect mid-flight, on an ancient city this happened.
I don't really know if it is an illegal world state, as we run 4 separate servers, and 2 of them ran into the issue; not saying it couldn't be, but its just weird that two of them are experiencing the iss...
I'll also share my plugin list here, and maybe @YuanYuanOwO can share theirs so we can compare and maybe find some matches.
AFKPlus, Analyse, antiRedstoneClock, ArmorStandEditor, BetterRTP, ChatFeelings, ChestSort, Chunky, CoreProtect, CrazyCrates, DelayedCommand, Essentials, ExtraContexts, FastAsyncWorldEdit, FastWelcome, Feed, Gemmy, GSit, HeadsPlus, HorseTpWithMe, ImageFrame, InventoryRollbackPlus, InvisibleItemFrames, Lands, LightWorlds, Lootin, LuckPerms, ModMenu, NetherRoof, Newbie, ...
@quiquelhappy what build of ProtocolLib are you running when receiving this error?
340a97b more refactoring and renaming - Machine-Maker
Is your feature request related to a problem?
I want to be able to copy all pixels of a map for each layer/MapRenderer to be able to store it.
I would like this feature so that players can view world maps across multiple servers by storing the layers in a db.
Describe the solution you'd like.
Perhaps a method like: Map getCanvases(MapRenderer renderer);
To retrieve the player to canvas map that is stored in CraftMapView.
Could simply be implemented by using `return new HashM...
We really have little care about windows, it's well known that file Io is much slower on that platform, and unless something shows that the issue is elsewhere, there's little we can do other than advising to maybe try to toy with the number of Io workers.
Outside of that, we'd need a trace showing all server threads when that occurs, which I'm pretty sure across the GitHub and discord, I've asked enough times that I no longer care with how much my head is spinning.
Sorry to bother...
This may not help in your particular case but the way we handled this on Loka was a fork of Paper where we could relocate the common data storage folder in order to use a singular directory that all of our survival servers referenced for mapmaking.
https://github.com/Cryptite/Slice/blob/master/patches/server/0030-Shared-Data-Storage.patch
With symlinking this may be helpful too but I can also see the desire for being able to use a db for this.
Is your feature request related to a problem?
i have a server with a moving border & it includes pvp. players can go outside the border which makes them invincible.
this is also kinda a bug since entities outside the worldborder can also attack players, it's just the players which cannot attack anything
Describe the solution you'd like.
the ability for players to attack entities outside the worldborder
Describe alternatives you've considered.
none
Other
No response
Rebased and updated for 1.20.4.
I refactored the API types into interfaces backed by server impls. Much more future proof doing that.
I actully have no idea about reproduce the issue(100%)
in the ancient city,when i was near the Warden,and try to walking or flying,I'll just disconnect from the server.(maybe near the schulk shrieker,i also have a probability of disconnecting when the sound starts playing)
It's not a plugin issue,try without plugin,same issue
[15:56:37 ERROR]: Failed to handle packet net.minecraft.network.protocol.game.PacketPlayInFlying$PacketPlayInLook@d8ab24a, suppressing error
java.lang.Ill...
Expected behavior
Changes done in the event to the item stack associated with the event should be reflected on the actual picked up item.
Observed/Actual behavior
The changes are not reflected and are ignored.
Steps/models to reproduce
Example code: https://code.lewds.de/BQ7OpU
Output showing that even though the item was changed it didnt end up in the inventory
The whole ...
While upstream passes the itementity, which intern is used for the event, the item stack passed to the method is used instead of the "updated" one from the item entity.
The method also receives a copy of the item entities itemstack, so we don't magically update it with a craft mirror rn either.
It's a really cool idea to have a shared directory for this! A simple api method would probably be easiest for most people though, as i really would like to store the bytes in a db for other uses.
@YuanYuanOwO is that on a fresh world? I've been walking/running/flying around like a headless chook near wardens on a fresh 1.20.4 world and still cannot receive that error or disconnect.
Hey cam, nice to see you. I am using the latest available paper 1.20.2 personally. I'll report on the protocollib version im using tomorrow, but it probably one of this week dev builds from Monday or so, as I tried updating it to see if the issue went away (it didn't)
@YuanYuanOwO is that on a fresh world? I've been walking/running/flying around like a headless chook near wardens on a fresh 1.20.4 world and still cannot receive that error or disconnect.
It was generated about 20 days ago, and I have not reproduced the issue in 1.20.4, which seems to be quite issue
Hey cam, nice to see you. I am using the latest available paper 1.20.2 personally. I'll report on the protocollib version im using tomorrow, but it probably one of this week dev builds from Monday or so, as I tried updating it to see if the issue went away (it didn't)
try without plugin
still same issue for me
if it's not induced by a plugin modifying the world, the only guess would be bad chunk generation, ik that there used to be a bug where the server would basically improperly generate a block entity into the world, I thought that that was no longer realy an issue, but, god knows
45e01a2 Use correct max stack size in crafter (#10057) - Machine-Maker
d11a588 Remove duplicate code in chunk tick iteration (... - Machine-Maker
The EntityPickupItemEvent is just wrong right now. It is incorrect to pass the Item (entity) as the thing being picked up because in vanilla, the stack actually being kept by the mob isn't always the full stack in the entity. Piglins, for example, can pickup 1 item at a time from an item entity and the event doesn't give you that context.
I think the solution here, is to add an ItemStack field to that event, deprecate getItem() (just to rename it to getSourceItem) and tell people to check ...
Hey @Symmettry, thanks for your feature request but this really goes outside the scope of Paper. This would certainly need to be done via your own fork of Paper or a plugin.
idk if this would break if you use records or whatever
who are they? :D
maybe a link to the OG source could be useful here?
Some types that have registries support existing without being in a registry and therefore have no key. This is part one of supporting that, adding a Registry#getKey(Object) method to be able to get the key for an object so we can remove Keyed from such objects.
This also deprecates Keyed#getKey on TrimMaterial and TrimPattern as these are the 2 offending types currently in the api.
since I thought Brigadier could handle all the parsing, but if it works, it works.
Brig still does do the parsing, but jline was doing its own parsing as well. And its parsing treated all spaces (not in quotes) as word separators and that messed up how it tried to replace the last word with the suggestion text. If the suggestion was ~ ~ ~ after typing in ~ ~, it would replace the last word with that suggestion. Which only replaces the single ~ instead of both ~ ~ since jline just...
Should probably clarify here that getting null would be the exception, and give an example
b4c9e7e add missing Experimental annotations (#10012) - Machine-Maker
I'm also thinking there might be a use for a getKeyOrThrow method? Sometimes I hate nullable methods when I know it exists.
it appears this seems to be more of a minecraft bug. players don't even send attack packets outside the worldborder.
it appears this seems to be more of a minecraft bug. players don't even send attack packets outside the worldborder. likely out of scope of a plugin unfortunately
Yeah, I believe that's just intended behaviour, though. You can still attack them with projectiles ((cross)bow & arrows), even though that's a confirmed bug. But you're right that you can't left click attack them.
Ah, I'm not familiar with jline, but that makes sense. It's too bad you can't just plonk the suggestion down where Brigadier's Suggestion object says it should go.
So I did a bit more converting methods and as you can see the diff has grown quite a bit. I'm starting to get hesitant to do this for more than methods with Location that we add.
One downside of not doing it all at once is it makes it slightly more annoying to work with the API before its all converted since its 2 different types.
After some further testing using reflection, it appears that CraftMapView#canvases and CraftMapView#renderCache is empty for world maps, so i will assume that these fields are used for "virtual" maps?
CraftMapView#worldMap.colors does contain data, assuming that this is the original map pixel data.
If this is correct (please correct me) i propose 3 new methods:
Map<Player, MapCanvas> getVirtualCanvases(MapRenderer renderer);impl -> `return new HashMap<>(CraftMapView#canvase...
Should I add these methods to the StyledFormat interface, or would you guys prefer to have that in the number format interface along the other methods?
@Machine-Maker
I think we should have an API to keep the player in config for a while as well while e.g. the resource pack is loading. Especially because of this issue right here https://github.com/PaperMC/Velocity/issues/1164.
+ public static final BlankFormatImpl INSTANCE = new BlankFormatImpl();
Might be worth to comment the current default of this value (just the number) in the javadocs.
Well in server terms there is no default value as far as I can tell. That is fully up to the client what to style that like. It would be hard to describe how it would look like in game, since objectives and their scores can be more than just the scoreboard sidebar...
I would suggest a wording like that maybe?
For score (getter):
`The number format might be null if the score has not been se...
I mean, there was no "bug" here, the fix is to define a valid value, use discord/forums for support
I added them to the styled format interface for now. Let me know if I should change it
Timings or Profile link
N/A
Description of issue
When running a fresh version of Paper (no plugins) on either 1.20.2 or even 1.20.4 I get an error regarding hw.cpufrequency.
Plugin and Datapack List
N/A - Fresh Install
Server config files
N/A - Fresh Install
Paper version
ver
[14:55:47 INFO]: Checking version, please wait...
[14:55:47 INFO]: This server is running Paper version git-Paper-318 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: ...
nothing we can do, and this is only cosmetic, right? (as in server still starts?)
please report it to oshi, maybe the maintainer can provide a hint on what data they need to resolve this
4afd50f revert later, initial softspoon setup - MiniDigger
[PaperMC/Paper] New branch created: softspoon
nothing we can do, and this is only cosmetic, right? (as in server still starts?) please report it to oshi, maybe the maintainer can provide a hint on what data they need to resolve this
edit: or maybe you can create a minimal repro, mojang only includes oshi 6.4.5, latest is 6.4.9, maybe its already fixed? something simple like
fun main() = println(oshi.SystemInfo().hardware.processor)should trigger it https://github.com/oshi/oshi
Hey buddy,
Thanks for the quick reply! Yup ...
preeeeeetttty sure mojang only uses oshi for crash report info
but yeah, the maintainer will appreciate it, I will close this issue then
The game uses 0.95d now
I think we stick with nullable getter/setter. I don't think we wanna make the assumption that noStyle StyledFormat will always be the same as the default format because @MenschenToaster is right, that is a client implementation detail.
change to smth like
`@return this score's number format, or null if not set or the score doesn't exist
This logic is wrong and is actually a bug fixed in another PR. Specifically the part about doing a contains check on getTrackedPlayers. Just use the null returned by getPlayerScoreInfo as a way of knowing if the score exists.
Add ..
Generally the main block of javadoc should be proper english with the param/return/throws tags allowing phrases
That is outside the scope of this PR. This is just intending to support already-existing API that is valid for use during the configuration phase. Don't interpret this as saying such API shouldn't exist however.
Is your feature request related to a problem?
Yes, https://bugs.mojang.com/browse/MC-218156
Describe the solution you'd like.
Temporarily change
treasure-maps:
enabled: true
find-already-discovered:
- loot-tables: 'default'
+ loot-tables: 'false'
villager-trade: false
Describe alternatives you've considered.
Wait for https://bugs.mojang.com/browse/MC-218156 to fix itself
Other
Here is what happens on my server (as far as I ...
ae3378a revert later, initial softspoon setup - MiniDigger
I don't think we should change the default behavior because some servers go through the process of pregenerating the terrain. Pre-gen isn't a vanilla or paper thing, its a third-party thing.
We already provide an option to change the setting as you've demonstrated. Is there a reason that people who pregen can't just change that setting themselves?
No there isn't, it just isn't obviously the problem, and isn't documented - although I don't know where the appropriate spot for it would be. Alternatively, there should be some form of error message sent to the user and a verbose error in the console.
It's been two years, and it's still unresolved - and I don't know if it's going to be fixed any time soon.
In general, Ctrl+F "which" and replace it with "that" in all doc comments. "Which" is for nonessential subordinate clauses, which I don't think were used here
+ * Implemented by types that are considered owners
+ * of registered handlers for lifecycle events. Generally,
+ * the types that implement this interface also provide
+ * a {@link LifecycleEventManager} where you can register
+ * event handlers.
+ * to observe changes from previously run handlers.
+ * {@link LifecycleEvent} which is the actual event object, whereas
Moving this out as ReloadableRegistrarEvent would make its use more intuitive I think
I dont think the others need marking, they stand fine as convenience methods for now. The callbacks should be called before bukkit events
Introducing a modification to PlayerShearEntityEvent that allows customization of drops from sheared entities.
Please do not open pull requests from the master branch, create a new branch instead.
Introducing a modification to PlayerShearEntityEvent that allows customization of drops from sheared entities.
Thank you for your contribution, unfortunately this is a duplicate of the already existing PR #5678, so I'm going to have to close this in favour of that one.
I wouldn't be against some log message when the server tries to generate a map but fails to find one. We can check the state of that config message and log out a suggestion to toggle that setting. But I don't think we should change the default for the setting.
please report it to oshi, maybe the maintainer can provide a hint on what data they need to resolve this
OSHI maintainer here. Would love someone with an M3 to help provide some info form their ioregistry at the issue in the above comment. I have a guess at a fix.
please report it to oshi, maybe the maintainer can provide a hint on what data they need to resolve this
OSHI maintainer here. Would love someone with an M3 to help provide some info form their ioregistry at the issue in the above comment. I have a guess at a fix.
Happy to help! Iโve got an M3 Max, what do I need to run?
Mojang doesn't seem to be that fast at patching things..
That is quite the understatement lmao. 2 years is nothing. I'm still waiting for a bug to be fixed that will soon get it's 10-year anniversary. (MC-53602).
Being a Mojang dev must be literally the easiest job in the world.
Ok, removed all the TODO comments added and left comments explaining those decisions. Should be all ready.
[Paper] Branch feature/bytecode-modification was force-pushed to `b9544bf`
[Paper] Branch feature/bytecode-modification was force-pushed to `f545498`
[Paper] Branch feature/lifecycle-event-system was force-pushed to `1e29f73`
Ok, addressed most of your comments in 1e29f73 (#9629).
So you think Monitorable and Prioritizable?
fe70e22 more javadoc fixes - Machine-Maker
Expected behavior
With this setup tnt should always be able to be affected through the powdered snow and the sand entity should remain untouched.
Observed/Actual behavior
The tnt entity is not affected by the explosion when it is inside the sand entity.
Steps/models to reproduce
Plugin and Datapack List
None
Paper version
[21:40:26 INFO]: Checking version, please wai...
Expected behavior
Click on any part of the door and with no permission nothing should happen. The door should keep closed.
Observed/Actual behavior
Clicking on top of the doors is really opening them as a Bedrock player.
Steps/models to reproduce
Clicking doors on others plots at the lower block is working like it should. But clicking the upper block of the door allows Geyser players to open and close any doors. This is not just an optical issues. All players can go physical ...
Closing, see: https://github.com/GeyserMC/Geyser/issues/4358#issuecomment-1868390951
Pretty confident this is not a paper issue.
[Paper] Branch feature/lifecycle-event-system was force-pushed to `1756cc0`
Would it be an option to extend the API with a method that outputs a permitted EntityType[] and Material[] for the corresponding feature-flag?
This could be helpful e.g. for tab-completions in which only the enabled blocks are to be displayed. Otherwise, you have to check all game objects individually each time.
oshi 6.4.5, latest is 6.4.9, maybe its already fixed?
To close the loop if anyone else finds this issue in search, this was fixed in OSHI 6.4.10, released a few minutes ago.
(where is the link to jar file? o: I want to test it, but I can't)
Oh yeah, ok. The events won't run if the branch has conflicts. That is a github thing. So when kenny added the label yesterday, it didn't build a jar
I'd maybe add a config option for it since it goes beyond just a dupe, and have the fix enabled by default
The option is optional, and six months have passed, Can it be merged
Yeah, not sure if there's better alternatives
Expected behavior
In vanilla minecraft 1.12.2, snowballs cause the "damage" effect and knockback. Knockback is also caused to entities like fireballs.
Observed/Actual behavior
Snowballs do not cause knockback when using PaperMC 1.12.2.
Steps/models to reproduce
Summon any entity and throw a snowball at it in PaperMC 1.12.2.
Plugin and Datapack List
[13:20:25 INFO]: Plugins (0):
Paper version
[13:17:47 INFO]: This server is running Paper version git-Paper-1620 (MC:...
Note that this breaks a lot of mechanics from pre-1.13 command block maps.
I doubt anything will be done about this if this can't be reproduced in the latest version of Paper (either 1.20.4 experimental builds or the latest 1.20.2 build).
1.12.2 is extremely outdated and probably won't receive any updates.
If this is still reproducible on the latest version feel free to open a new issue, but as was already mentioned 1.12 is very old and also unsupported.
Expected behavior
Some farmland blocks arenโt getting fertilised even if they are directly touching water
Observed/Actual behavior
On my server, there is an area of farmland that doesnt get fertilised when water is nearby. Its a 5x6 wheat farm on the ocean, so the bottom of the block is always touching water. Im reporting that because i had this problem for 3 years and didnt think anything of it and I never had the problem on the vanilla server software
Steps/models to repro...
Yeah, I don't see the point in this. And in general, this API will need to be reworked for the whole proper damagecause system.
@lynxplay Seeing as thou you may have reimplemented this stuff, is there a reason why return is being done here? (Also applies above)
The more I worked on this, the sillier it became. So this is a draft for now.
The point of this PR is to fix MC-111729 (and a remap issue, doesn't affect the pr so is removable).
Did some testing, works when creating the objective with the scoreboard command and with a plugin.
The reason this is a draft is I really don't know how to deal with fake players created by plugins, or just big servers with a lot of players. I think having the comman...
Expected behavior
Hit cobblestone with diamond pickaxe, feel like I'm breaking it pretty fast
Observed/Actual behavior
Hit cobblestone with diamond pickaxe, feel like I'm hitting it with my hand instead
Steps/models to reproduce
Join my server, get diamond pickaxe, hit cobblestone, feel weird.
Plugin and Datapack List
Custom
Paper version
318 (current latest 1.20.2 stable)
Other
I'm on paper 318 (current latest 1.20.2 stable), and some of the blocks, when yo...
Yeah, I don't see the point in this. And in general, this API will need to be reworked for the whole proper damagecause system.
If there were a DamageCause class object, rather than just an enum, that would be a nice place to put something like this.
The pickaxe works just fine for me. Reproduce the issue without plugins otherwise there's nothing for us to fix.
Issue with viaversion. Update to latest should fix it
Both Paper and vanilla don't water the block if the block is not at the same level as the water.
It would be great if you could provide us with the world that this happens on; unless I misunderstood what you mean by "the bottom of the block is always touching water"?
[PaperMC/Paper] branch deleted: feature/adventure-4.15
ff7b9b0 Increase default custom payload channel size li... - EpicPlayerA10
Iโm from bedrock edition now, but the problem is still the same. The farmland is at the same level as the water and nearby farmland is getting fertilised.
(I installed geyser mc to play on bedrock)
[image0.png][image1.jpeg][image2.png]
On 25 Dec 2023, at 1:22โฏAM, Oliwier Miodun @.***> wrote:
Both Paper and vanilla don't water the block if the block is not at the same level as the water.
It would be great if you could provide us with the world that this happens on; unless I...
Expected behavior
Strider should not be damaged if they come out of lava
Observed/Actual behavior
Strider came out of the lava and was damaged
Steps/models to reproduce
you just need to summon strider in any dimension
Plugin and Datapack List
nothing
Paper version
[00:51:21 INFO]: Checking version, please wait...
[00:51:22 INFO]: This server is running Paper version git-Paper-344 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: ff7b9b0)
You are...
So it needs a rebase? Or what someone need to do?
(currently this issue prevents us from updating our server to 1.20.4 because we have an Easter egg consisting of several lines in outdated client message :c)
61768e0 [ci skip] Remove no longer needed mappings change - kennytv
Expected behavior
Launch projectile arrow should work:
Arrow arrow = skeleton.launchProjectile(Arrow.class);
this worked in 1.20.2
Observed/Actual behavior
It throws this error:
java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_20_R3.entity.CraftArrow cannot be cast to class org.bukkit.entity.Arrow (org.bukkit.craftbukkit.v1_20_R3.entity.CraftArrow and org.bukkit.entity.Arrow are in unnamed module of loader java.net.URLClassLoader @6e2c634b)
Steps/models t...
Kenny, you forgot to change the variable to "y" instead of z here, and the "hotfix generating item/xp in wrong location" patch may be deleted because CB fixed it
Expected behavior
Breaking a block that drops XP on mining with /setblock x y z air destroy does drop XP or has the chance to drop XP. Same behavior like mining with a diamond pickaxe.
Observed/Actual behavior
Breaking a block with named command does not drop any XP
Steps/models to reproduce
Create a fresh paper server, place or find any block that drops XP on mining and enter the setblock command with destroy property.
[YouTube Video Comparison](https://youtu.be/qgmaTx...
[Paper] Branch feature/lifecycle-event-system was force-pushed to `9cd5eca`
4fdda9e Keep newlines in outdated client/server message... - Warriorrrr
Yeah so, we are most likely going to close this here. In general, we really want to prevent adding onto the item meta system due to what was specified above, but also because it's tricky because introducing new types introduces some serialization differences between spigot/paper that we don't want to run into now.
Thank you for your PR regardless. ๐
We don't provide support for Bedrock Edition and Bedrock's behavior is not something we work to achieve.
If you have an inconsistency between Java Edition and Paper please send your images again through GitHub as replying to the e-mail didn't seem to attach those.
f483b38 fix NPE on EntityTeleportEvent getTo (#10016) - Machine-Maker
This is still valid, but will be implemented with the Registry Modification API found in #8920
Looks good. This was expanded to catch any use of World#playSound off the main thread as none of the 3 methods are thread-safe. It does more specific checks for Server#playSound methods as there are some cases where the use is thread-safe.
dc62150 Catch async usage of playsound (#10021) - Owen1212055
Expected behavior
When a command block is powered by a redstone signal with either of the following commands, it should send of whisper message to the nearby player.
Commands used :
/tell @p TEST or /execute at @p run msg @p Test
Player get a whisper message from the server.
Observed/Actual behavior
When a command block is powered by a redstone signal with either of the following commands, it failed.
/tell @p TEST
/execute at @p run msg @p Test
`[14:11:30 ERROR]: Thread ...
In my opinion this is a bad idea, .playSound is just sending a packet, same as .spawnParticle people will use it async. If the world random is screaming use the multithreaded random, why does world random even matter when playing a sound
.playSound is just sending a packet
Very much not true on World and Server. On Player, playSound is as simple as sending a packet. But not on those other types. They either iterate over a thread-unsafe list of players in a world or use the vanilla packet broadcasting system based on location which contains thread-unsafe logic.
The "world random" aspect is just one part of this. If a sound isn't provided a seed, a seed must be generated from the world's random instance which is a th...
Fixes https://github.com/PaperMC/Paper/issues/10081 (again)
Was improperly updated to 1.20.3/4
[PaperMC/Paper] New comment on issue #9239: ExperienceOrb stacking results in XP loss on item repair
Hey there,
Sorry to interrupt,
Will this PR be pushed through Folia too? Not sure how many code is shared by Paper and Folia.
Thanks
[PaperMC/Paper] New comment on issue #9239: ExperienceOrb stacking results in XP loss on item repair
Yes, folia is a maintained fork of paper.
If the PR is merged into paper, folia will pull the changes a bit afterwards.
Hi, please don't change this behavior. It actually has some uses, for example as a method to check if a block is "interactable" in that right clicking it will perform some sort of action. I suggested it to be used in kernitus' OldCombatMechanics plugin](https://github.com/kernitus/BukkitOldCombatMechanics/issues/623). This behavior has been present for multiple years and fixing this would break backwards compatibility for at least that plugin, I don't know if there are other plugins that use ...
.playSound is just sending a packet
Very much not true on World and Server. On
Player, playSound is as simple as sending a packet. But not on those other types. They either iterate over a thread-unsafe list of players in a world or use the vanilla packet broadcasting system based on location which contains thread-unsafe logic.The "world random" aspect is just one part of this. If a sound isn't provided a seed, a seed must be generated from the world's random instance whic...
It appears the line
lighning.isSilent = isSilent
was removed, I could be mistaken though.
That's correct. That line was removed. But not as a part of this PR. That is just part of an existing patch that removes that line.
<img width="848" alt="image" src="https://github.com/PaperMC/Paper/assets/15055071/f64b6e30-ca80-4902-b78c-ad4ea7f62f36">
These 3 spots are the lines in that patch that changed as a result of this PR.
Expected behavior
I'd expected that this would never occur. It is on 5 server with different plugins tested, even all plugins removed it reverted to online mode.
Observed/Actual behavior
After updating 5 servers from paper-1.20.4-344 to paper-1.20.4-349 I suddenly found that it was impossible to connect, It simply said it was in online mode. Now we use 5 servers together via Bungee, and NEVER EVER did a controlsystem change this settings in the server properties.
I already restar...
Getting back to discord, someone pointed out the stasrtup option -o as in "java.exe" -Xmx1024M -Xms1024M -jar paper-1.20.4-344.jar -o true nogui
I removed the -o TRUE in the startup line, and now it is working fine. Maybe put this reminder for those who are not on top of updates and social media, like me. So, this issue is resolved, thanks to the discord community of PaperMC.
Thanks to all. Happy New Year!!!!
Expected behavior
hey what is this ?????
i want solve this very much
Observed/Actual behavior

at net.minecraft.server.network.ServerLoginPacketListenerImpl$LoginHan...
I really don't think that anything in the game is designed with IPC in mind
what is your usecase and why can't you just use tcp?
I really don't think that anything in the game is designed with IPC in mind what is your usecase and why can't you just use tcp?
use this https://github.com/Coloryr/Velocity/tree/dev%2F3.0.0
It change the api, but retained original support
server-ip=unix\:/tmp/paperserver.sock
[servers]
# Configure your servers here. Each key represents the server's name, and the value
# represents the IP address of the server to connect to.
lobby = ...
Please do not open pull requests from the master branch, create a new branch instead.
full support for UnixDomainSocketAddress
It change the api, but retained original support
server-ip=unix\:/tmp/paperserver.sock
[servers]
# Configure your servers here. Each key represents the server's name, and the value
# represents the IP addr...
Note this will need to be updated after we merge upstream due to https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/53ebb05e3951a1a05e4efb8a739d9bf31d21385e#src%2Fmain%2Fjava%2Forg%2Fbukkit%2Fcraftbukkit%2Fblock%2FCraftDecoratedPot.java
I will update once #10085 was merged.
Stack trace
This isn't a crash or bug, but on restart (or maybe crash?) sometimes there seems to be a code path that accesses the poi chunk off the main thread, which your async handlers detect. Which I think you may want to know about.
If its not an issue then you can close this.
[14:38:44 INFO]: [Votifier] Disabling Votifier v2.7.3
[14:38:44 ERROR]: [ChunkTaskScheduler] Chunk system error at chunk (1112,-1021), holder: NewChunkHolder{world=cool_world, chunkX=1112, chunkZ=-102...
except it doesn't retain original support, it just means that that stuff will blow up, and so, this cannot be merged until a major
also, patches generally should not modify earlier patches
I changed it now, but I also incorporated the other possible reasons for it being null, like @lynxplay mentioned in his review before. Let me know if this is good or if I need to make changes
Fixes an issue in ClientboundLoginDisconnectPacket where Adventure translate components are not rendered
and Serialized components having a maximum length of 32767.
TestPlugin.java
public final class TestPlugin extends JavaPlugin implements Listener {
@Override
public void onEnable() {
final GlobalTranslator translator = GlobalTranslator.translator();
final TranslationRegistry registry = TranslationRegistry.create(Key.key("paper", "test-plugin"));...
I would generally like to note that afaict, that locale field will always be null
TestPlugin.java
public final class TestPlugin extends JavaPlugin implements Listener {
@Override
public void onEnable() {
this.getServer().getPluginManager().registerEvents(this, this);
this.getServer().getAsyncScheduler().runAtFixedRate(this, task -> {
this.getLogger().info("Hello");
}, 0L, 1L, TimeUnit.SECONDS);
this.getServer().getScheduler().runTask(this, () -> {
this.getServer().getPluginManager().dis...
is that still the case with the config phase being added? I dont have an overview anymore at what point that event is fired
Is there a known way to completely mitigate the loading screen like pre 1.20.4 behaviour?
In the login phase locale field is always null, but rendered with the default locale.
Would it be better to change the locale argument to null? (since the result will be the same anyway)
is that still the case with the config phase being added?
Yes, because this packet only exists within login
I was earlier thinking that i'd be somewhat inclined to explictly pass null and leave a note as to why, headache comes into the expectations of events and such using this, maybe be inclined to add a javadoc there, but ๐คท
The javadoc comment applies to the other modified javadocs from the API
This also needs to render non-adventure components. We started doing that elsewhere and I think its probably good to cover all the bases.
See ComponentSerialization#LOCALIZED_CODECS and just use the Locale.US one from there.
The longer description should be in the main body of the javadoc.
Also it should be,
When this event is fired, the player's locale is not
available. Therefore, any translatable component will be
rendered with the default locale, {@link java.util.Locale#US}.
<p>
Consider rendering any translatable yourself with {@link GlobalTranslator#render}
if the client's language is known.
3c0d6aa Updated Upstream (Bukkit/CraftBukkit/Spigot) (#... - Machine-Maker
Rebased this once more.
I have dropped the extends for the item cooldown event.
In general, issue with that even being a child of item cooldown event is that plugins listening for the cooldown event itself might cancel a shield disable, leading to the extra "effect" of a disabled shield damage event, (no stopUse item call and no game event) which might not be intended.
Is your feature request related to a problem?
from javadocs
Contains fast approximations of some Math operations.
By default, Math methods will be used by all other JOML classes. In order to use the approximations in this class, start the JVM with the parameter -Djoml.fastmath.
There are two algorithms for approximating sin/cos:
arithmetic polynomial approximation contributed by roquendm
theagentd's linear interpolation variant of Riven's algorithm from http://www.java-gaming...
I think that choice should probably be left to the server administrators ?
For plugins that use a lot of trig functions, them shading in a minimal library to create these lookup tables for them seems easy enough ?
Would love the opinion of other people tho ๐ I have not looked through joml's fastmath approximations, I presume sin/cos/atan might have changes, the approximation range of those and potential limitations of input values.
Given joml is exposed to the API, messing around there...
Tested to ensure serialization works with the new hidden effect. Also tested that the conversion properly works by giving myself stacked effects.
This seems like something that the server owner can easily enable, iโm not sure why would Paper enable it by default?
I see several problems with this approach
- Some hosts do not allow you mengle with jvm flags.
- Server admins do not know nor care what math does paper and plugins use.
- Apparently not even papermc contributors, let alone plugin developers, are aware that sin lookup tables are opt in feature
- The feature is not even documented on joml website https://github.com/JOML-CI/JOML, only place to find this out is either by reading javadocs or decompiling the library. Distributing this knowle...
I think this may be better suited to a docs page, with some actual graphs of how this will affect performance and whatnot, rather than forcing this. If it is possible to enable it by programmatically setting the property, this could be a configuration option.
Yea I don't think getting server owners to flag this is the best approach.
IMO the plugin should be responsible for providing their own lookup table.
Again, to enable this, we'd need to ensure that none of the fastmath approximations fail to cover all cases the normal methods would as JOML is exposed to plugins via API.
From a quick glance their approximations are just that, approximations. Good ones sure, fast ones as well.
Their atan2 implementation e.g. does not handle 0/0 as an ar...
except it doesn't retain original support, it just means that that stuff will blow up, and so, this cannot be merged until a major
also, patches generally should not modify earlier patches
No, if UDS is not used, the original API is supported
And I need to delete the patch before the modification?
Seems to dupe ? #9086
The modified content is the same, but the modification method and API processing are different
My modification is for the group server
e4ab50d Properly disallow async Player#chat (#8123) - Machine-Maker
5e978d3 Fix Folia scheduler tasks not canceling when pl... - LemonCaramel
Expected behavior
something broke since 5~ commits ago:
Think this is culprit: https://github.com/PaperMC/Paper/pull/5678/files
Observed/Actual behavior
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because "originals" is null
at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftItemStack.asNMSCopy(CraftItemStack.java:67)
caused by https://github.com/PaperMC/Paper/pull/5678
Steps/models to reproduce
org.bukkit.craftbukkit.v1_20_R3...
full stack trace?
Ahh its an incompatability with packet events, basically, you added override to asNMSCopy for list of itemstacks, but packet events is expecting single null pass in. Not really a paper issue just imcompat
Phew, well glad our testing wasn't for nothing.
Glad you were able to figure this out so quickly.
Yeah sorry for blaming paper, packet events should really be checking parameter types.
There was a TODO left there regarding the translated death message being used by plugins to identify the cause of death. This should be mitigated now because the LegacyComponentSerializer default implemenation uses our custom flattener which renders vanilla translatable components to their English representation.
Delays the entity_die game event until after the PlayerDeathEvent has been fired and its cancel state checked.
The game event is already in the correct spot for EntityDeathEvent, so I believe just this is affected.
It's worth trying to remove this filter and see what happens.
I don't fully recall, but I think I filtered out inner classes because they weren't named on spigot mappings so we couldn't generate a proper key, that limitation isn't a thing anymore so we should be able to generate more keys
Imo you should merge the patch in 596
Imo you should merge the patch in 596
API or Sevrer?
Imo you should merge the patch in 596
API or Sevrer?
I don't know if there's a patch for Unix support in the API module but on server there's one so you should merge into it (IMO)
I don't know if there's a patch for Unix support in the API module but on server there's one so you should merge into it (IMO)
So what do you mean is to modify that patch instead of creating a new one?
Stack trace
[10:17:02] [HikariPool-1 housekeeper/WARN]: [com.zaxxer.hikari.pool.HikariPool] HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=46s290ms303ยตs537ns).
[10:17:02] [Paper Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-196 (MC: 1.20.1) ---
[10:17:02] [Paper Watchdog Thread/ERROR]: The server has not responded for 38 seconds! Creating thread dump
[10:17:02] [Paper Watchdog Thread/ERROR]: -------...
Your server is heavily overloaded.
This is not a bug, please ask for help on our discord. However, we no longer support 1.20.1 as 1.20.2 and respectively 1.20.4 are stable.
[Paper] Branch feature/lifecycle-event-system was force-pushed to `be7b287`
early continues or &&
I dont think this should be nonnull, even if vanilla will have a default one set
Confused, why here? Where would we return null then?
d17c396 update test plugin - Machine-Maker
But any positioned-based commands will still execute at 0,0,0... right? So the location isn't null tho... plus I don't understand how we would be able to distinguish between literal 0,0,0 or default 0,0,0
It just doesnt make sense for the console to have a location (unless specified), it is not bound to any world or location. Just because vanilla has or needs one doesn't mean we do in our api. Distuingishing it is easy by just going to where it is initially created for the console with the default value
Resolved in call, decided to go with an isConsole() check on sender instead.
ArgumentTypes or CommandArgumentTypes since it's kinda obvious these are the default ones provided by the server. + add a link to where you can register/implement your own in docs
argument, resolvedArgument, just get, or something else that's shorter than that full thing
I made this distinction in the case that other plugins would want to provide their own argument types, but if people disagree with that I can rename this.
We don't do this with anything else that is registerable as well, so this just breaks conistency
But to note, the only place that this is done IIRC is the mob goal api.
Oh yeah yuck, time to fire mini
I think we can reduce the generic issues by making all of these have the same type, just a SelectorArgumentResolver essentially. That would have methods to getSingleEntity getSinglePlayer, getEntities, getPlayers. I don't think that significantly reduces the "niceness" of having these generics but I think getting rid of as many generics as possible is best.
e56e53f Fix some component bugs in login disconnect pac... - LemonCaramel
3484ae9 Call entity_die game event after event cancel c... - Machine-Maker
Stack trace
[15:04:00 INFO]: Booting up Velocity 3.3.0-SNAPSHOT (git-00ef92bc-b312)...
[15:04:00 INFO]: Loading localizations...
[15:04:00 INFO]: Connections will use NIO channels, Java compression, Java ciphers
[15:04:00 INFO]: Loading plugins...
[15:04:00 INFO]: Loaded 0 plugins
[15:04:01 INFO]: Listening on /[0:0:0:0:0:0:0:0]:25555
[15:04:01 INFO]: Done (0.68s)!
[15:04:12 INFO]: [connected player] Borox1 (/127.0.0.1:55366) has connected
[15:04:12 INFO]: [server connection...
This seems more like a configuration issue than anything else.
Please checkout https://docs.papermc.io/velocity/player-information-forwarding. Any further questions are best asked in our discord.
add @Override and remove that paper comment which was probably just copied from somewhere
Requires testing and javadoc addition regarding the creation of the score on the numberFormat setter, otherwise LGTM.
Given upstream has yet to release even a PR for this, I think it is fine to move forwards with this sooner than later ๐
[PaperMC/Paper] Issue opened: #10099 Add option to skip light calculations in Chunk#getChunkSnapshot
Is your feature request related to a problem?
If you're capturing chunk snapshots and only want to get block data from them (which seems like it would be fairly common) then having each snapshot perform light calculations every snapshot leaves performance on the table.
Describe the solution you'd like.
A performLightCalculations/doLightCalculations/etc boolean to the end of the existing `public ChunkSnapshot getChunkSnapshot(boolean includeMaxBlockY, boolean includeBiome, boole...
[PaperMC/Paper] New comment on issue #10099: Add option to skip light data in Chunk#getChunkSnapshot
It's more the copying of light data than recalculating, but the idea still stands.
Cleans up the loot table API and replenish patches to better support vanilla's new randomizable container and entity stuff.
Also adds such support to the Crafter. https://github.com/PaperMC/Paper/pull/10023 does so for Decorated Pot. That can be merged before or after this, doesn't matter.
Fixes https://github.com/PaperMC/Paper/issues/9917 (part of the issue started again)
Turns out the client does still maintain a reference to the old tag, even if you leave the server and join back. The protocol just doesn't support removing tags. It's possible its worth fixing it just on the server as at least the server-side functionality which might depend on that tag.
Unsure tho.
A bunch of random useless diff was added/changed in updating this patch. This reverts that.
Rebased for 1.20.4
Something that probably needs to be worked out is when exactly BlockDispenseEvent should be fired for a "failed dispense". A lot of items fallback to just being spit out if their "special action" fails, like glowstone being dispensed but the block in front isn't a respawn anchor. In this situation, dispenser with glowstone inside pointing at a non-respawn anchor block, the glowstone will be spat out. But if the block in front is a full respawn anchor, the dispense will "...
gave this a look over as much as I can with my level of sleep and sight, overall looks fine of what I've seen
Rebased for 1.20.4, still blocked for damage source API
Expected behavior
same string nbt data
Observed/Actual behavior
items created from 1.20.4 look like this
{"text":"","extra":[{"text":"Soul","obfuscated":false,"italic":false,"underlined":false,"strikethrough":false,"color":"light_purple","bold":true}]}
items created from 1.20.2 look like this
{"extra":[{"bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"light_purple","text":"Soul"}],"text":""}
this difference has made a l...
The lack of information on how it was given a custom name is exactly why I said that there was nothing to create an issue from here
Using the default minecraft:give command, sorry i forgot to write it.
I fail to understand how that would cause the order to change unless whatever you're putting into the command changed
Its true the issue is not with the server, i will figure out where it lies.
See comments listed above. In general, there is no probable reason why Paper should be manually enabling this, and because this again causes issues in itself due to now causing these joml operations to now be approximations, which is breaking behavior.. this will be closed.
Thank you ๐
See above. In general, there is no way to handle this interaction event nicely. Naturally, Minecraft has changed their interaction packet logic ages ago, so this event has to do a lot of "guestimating" which causes a lot of problems.
And if plugins DO use this behavior, not sure if this is even worth fixing?
So with this given info, closing as wont fix.
I think this will cause xp to drop twice when a player breaks a block. This is because spawnAfterBreak is called with a true parameter via Block#playerDestroy -> Block#dropResources
Should mention/link the #playEffect() as controlling if the effect plays at all and
to disable effect, use #setPlayEffect()
I don't see this actually being used for the effect. You need to change the BlockState that goes into the levelEvent call
spawnAfterBreak doesn't drop any experience, as per craftbukkit change.
It does if dropExperience is true, which it is in the call chain from ServerPlayerGameMode#destroyBlock -> Block#playerDestroy -> BLock#popResource -> Block#spawnAfterBreak
Expected behavior
Spigot-like behaviour where when fetching a block or location with a negative Y coordinate it works like any other block or location object.
Observed/Actual behavior
`[16:37:51 WARN]: java.lang.IllegalArgumentException: y out of range (expected 0-256, got -32)
[16:37:51 WARN]: at com.google.common.base.Preconditions.checkArgument(Preconditions.java:463)
[16:37:51 WARN]: at org.bukkit.craftbukkit.v1_20_R3.CraftChunk.validateChunkCoordinates(CraftChu...
The min/max values for that check is not hardcoded, it's taken directly from the world's min build height and max build height.
Can you replicate this on a new world?
The min/max values for that check is not hardcoded, it's taken directly from the world's min build height and max build height.
Can you replicate this on a new world?
Yes, this is done on a new world. I can go into negative coordinates and build no problem. If I use the same code and same world on spigot equivalent version it has no problems. I originally assumed it was a problem with spigot when 1.17 came out and reported it to md5 and he told me it was a paper bug and he is corr...
It works fine for me on a new world.
All I had was this in a plugin, no other plugins.
@Override
public void onEnable() {
this.getServer().getPluginManager().registerEvents(this, this);
final WorldCreator worldCreator = new WorldCreator(new NamespacedKey(this, "test_world"));
worldCreator.environment(World.Environment.NORMAL);
final World world = worldCreator.createWorld();
}
@EventHandler
public void onEvent(Ch...
1281f4f Make region/lock shift accessors per world - Spottedleaf
I am able to replicate the error with this code:
@EventHandler
public void onEvent(ChunkLoadEvent e) {
e.getChunk().getBlock(0, -32, 0).getBiome();
}
With the error (on startup):
[18:55:22] [Server thread/ERROR]: Could not pass event ChunkLoadEvent to Test v1.0
java.lang.IllegalArgumentException: y out of range (expected 0-256, got -32)
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:463) ~[guava-32.1.2-jre.jar:?]
at org.bukkit.cra...
@TonytheMacaroni can you provide your worlds level.dat file ?
In updating to a fresh 1.20.4 world, I realized that the errors were purely coming from chunks in the nether and end, which do follow a 0-256 Y range. As such, I did not replicate the original issue, if there is one.
In updating to a fresh 1.20.4 world, I realized that the errors were purely coming from chunks in the nether and end, which do follow a 0-256 Y range. As such, I did not replicate the original issue, if there is one.
Smh, I didn't realize this until now but you are right. Paper must be pre-loading the chunks from the end and nether which spigot does not do and this led me to believe that the error was being thrown from me being in the server and the chunks around me loading. I wish the e...
I found at least one case of double xp dropping still. CraftBlock#breakNaturally calls popResources and that has a true for dropping xp but it also handles xp drops later itself.
seems to be accidentally removed
Call EntityChangeBlockEvent for eating cakes or adding a candle to the cake
Expected behavior
Player.teleport should send the player immediately to the specified coordinates in the world.
Observed/Actual behavior
it seems to send the player to the specified coordinates of their current world for a split second (visible chunks load) then to the coordinates in the intended world, this behaviour I expect is not intentional.
Steps/models to reproduce
player.teleport(new Location(Bukkit.getWorld("world that isnt current world"), -20000 + random.nextInt(4...
Should this also include calls for CandleCakeBlock being ignited and extinguished ?
Link to stacktrace:
https://hastebin.com/share/ixuwoyexos.php
Cords that started all of this:
-2515 -40 2761
Seeds:
minecraft:sculk_patch_ancient_city: -4755398315285006202
minecraft:sculk_patch_deep_dark: 1247478299647611546
minecraft:sculk_vein: 1755271082032438584
world seed: 4945930993236416567
Plugins:
Bukkit Plugins:
- Advanced-eHideTags, AntiPopup, ArmorStandEditor, AuxProtect, AxGraves, BanAnnouncer, BookOnline, Brewery, ChatStyles, Check, Citize...
I am unable to reproduce with the given seeds/ coords.
I can't seem to reproduce this, teleporting the player I do not see any visible "flash".
[14:30:09 INFO]: Location{world=CraftWorld{name=world},x=-10227.0,y=118.0,z=-8749.0,pitch=0.0,yaw=0.0}
[14:30:10 INFO]: Location{world=CraftWorld{name=world_nether},x=-12129.0,y=118.0,z=7047.0,pitch=0.0,yaw=0.0}
[14:30:12 INFO]: Location{world=CraftWorld{name=world},x=-16924.0,y=118.0,z=3809.0,pitch=0.0,yaw=0.0}
Switching worlds with teleportation and then printing to console each tick the...
Do we need the fluid legacy check even if the block isn't waterloggable?
We do that in other cases so it's consistent since that is what removeBlock/destroyBlock does.
This concept should not be introduced in the API. It doesn't make sense to have MutablePropertyView properties which can set any random key on them.
Need a static create method; record impl should be in the API (package-private)
The server implementation of the properties feels needlessly complex. There doesn't have to be separate classes for every type that needs to be converted, like 90% of them are just calling 2 methods anyway.
I'm also not following the need for "accesses".
For getting via an item property: An item property key be attached to some adapter/converter/whatever which takes has a method which takes in a CompoundTag and the key, goes to the path that key has, be in display.Lore, CanPlaceOn, wha...
I would hold off on exposing this, the type for this will be some EntityPropertyHolder or whatever for entities.
This should not have a property. Instead, the specific parts of display should have their own properties which point to display.Name, display.Lore, etc.
Expected behavior
The event will be called in any case, including if event.getPlayer() will untrack event.getEntity() (other Player), as before in Paper 1.20.1
Observed/Actual behavior
The event is called only if event.getEntity() (other Player) was untracked due to movement/teleport far away from event.getPlayer() but they are both in the same world.
Steps/models to reproduce
Join the game from two accounts (or ask a friend to help) and place both players in ...