#paper
1 messages ยท Page 4 of 1
Subject: [PATCH] Add PlayerAdvancementCriterionGrantEvent
Renaming this isn't really required but if you would like to go through with it then i think you should make it start with an uppercase letter since 99 % of patches start with one
#9862 just so people looking at the issue know there is a pr for it
I would clarify that this is the advancement progress with the criteron granted. This event kinda breaks the norm by having the change happen, then fire the event and undo the change if it was cancelled. Maybe that should be changed, but that can be for another time.
I wonder if it's worth hooking into vanilla's serialization logic (gson in this version, codecs in the next version) and render the translatable components when serializing to json. That would avoid the double conversion.
How would that work with adventure's translator? The adventure translator only accepts adventure components, not vanilla components or json.
I think better wording would be something like: Called after a player is granted a criterion in an advancement. If cancelled the criteria will be revoked.
I think a better way would be something like this: Gets the AdvancementProgress with the involved criterion marked as granted. Would love to hear feedback on these suggestions though
Well technically there is Translator's MessageFormat translate(final @NotNull String key, final @NotNull Locale locale);
that could be used, however that was recently expanded to also have a method that takes a TranslatableComponent.
I was thinking along the lines of... if, while serializing a vanilla component, it encounters a translatable, it can only convert that component to adventure, render it, and then serialize it to json. That way, most components, or chunks of components avoid the double serialization
MC-181190 was fixed in vanilla with 23w31a and the paper patch doesn't fix anything anymore.
I don't think we have to increment the config version and create a custom transformation to remove the old config. We have a big file full of config settings to remove. See RemovedConfigurations and add the correct path for the setting to that instead.
So, month has passed, still waiting๐ค
There is a linked pull request which restores the patch for this, feel free
to test it; I'm inclined to pull it soon however, I don't wanna hit the
merge button and not be around for any issues as in currently having health
issues
On Wed, 1 Nov 2023, 00:16 StKillReal, @.***> wrote:
So, month has passed, still waiting๐ค
โ
Reply to this email directly, view it on GitHub
https://github.com/PaperMC/Paper/issues/9794#issuecomment-1788206667,
or unsubscribe
<http...
I think I've now implemented your suggested solution to this problem. I've used a ThreadLocal to store the adventure locale, as the static gson serializer doesn't contain (or support) any context as far as I know. I'm open to suggestions on alternatives to store the locale.
I don't think we have to increment the config version and create a custom transformation to remove the old config. We have a big file full of config settings to remove. See
RemovedConfigurationsand add the correct path for the setting to that instead.
Changed, I didn't knew RemovedConfiguations existed :+1:
I`d this problem again!
I have the same problem, also with Untamed Wilds. Firstly had the problem on my server, which froze up instantly after this message got displayed and even crashes a short time after. This also gets my singleplayer worlds to freeze up, but not crash.
Hope anyone finds a solution for this.
Untamed mods has nothing to do with paper; and the general fix for this stuff is to stick within the bounds of the world-gen region that mojang provides, it would be on the mod to fix that.
Isn't it more a PlayerInitializeMapEvent?
Creating is basically crafting for me.
Well, using "initialize' for that event might be confusing seeing as the map loading by the server on startup is called that too and describes a completely different behaviour.
"Create" sounds correct for me as a new map (as in the MapView, not as in an ItemStack with the kinda arbitrary type "map") is created on the server. Don't see it getting confused with crafting either, seeing as it would just use "CraftEvent" like the others if that was what the event refers too.
Expected behavior
I am using latest build #260.
zombie-villager-infection-chance should be working but it is not
Observed/Actual behavior
I have zombie-villager-infection-chance set to 10.0 but it is not working, villagers get infected 100% of a time (hard difficulty).
Before I updated the server from 1.20.1 it worked correctly.
Steps/models to reproduce
set zombie-villager-infection-chance to 10.0
Spawn a villager and a zombie.
The villager always gets infected instead o...
If you want to have an infection rate of 10% you would need to use 0.1, not 10, because the range of possible values is from 0 to 1 (atleast on 1.20.2 where I can look at the source code).
The docs are outdated which can be seen that it uses -1.0 as default and not default
This is a small pull request adding an event that gets called whenever a player brushes a block.
Closes #9774
To clarify: even though I did not change this function, Paper didn't compile due to being another variable within the same scope in there. Thats why I had to make this change...
resolves #9260
decided to deprecate the spigot method since it doesn't check if the player is gliding while papers already does that check for you.
spigots method name is also kinda misleading since you could think it also gives you some kind of a boost on the ground. i mean they state in jdocs that its only going to work if the player is using the elytra but meh.
Decompile fixes can go into the mc dev fixes patch
Welcome to paper :wave: thank you for your first PR!
I am a tad unsure if your current implementation does actually fix the related issue.
Right now, this mostly looks like an event that is pretty much just a duplicate of the PlayerInteractEvent.
If I interpret the issue correctly, the event should be called when the player is basically done brushing the block instead of the start of the brushing process.
Welcome to paper ๐ thank you for your first PR!
Thanks, but this isn't my first PR, have some old ones I have to clean up some day
If I interpret the issue correctly, the event should be called when the player is basically done brushing the block instead of the start of the brushing process.
Yeah, my bad, sorry, the event will no longer be cancel-able though, however, then, I can expose the dropped itemstack
I made it 0.1 instead of 10.0 and now it seems to working correctly! Thank you and sorry :)
Ah sorry, just saw "first time contributor" :sweat:
I mean, plugins can infer a not cancelled "PlayerBrushBlockEvent" that is called exactly how the issue describes it (cancellable, does not expose item drops) and the following BlockDropItem event stuff.
As a follow up, warrior suggested internally that maybe an event called each time the block is "partially" brushed in the BrushItem useOnTick method would be useful.
Would work both as a "player starts brushing" and a progress event to do stuff with.
As a follow up, warrior suggested internally that maybe an event called each time the block is "partially" brushed in the BrushItem useOnTick method would be useful.
What would be the use of that? The server cannot stop the client from showing the animation to my knowledge
We are using this patch on our servers for a few days now and I could not find any issues. And the performance is much better.
I'm sorry for this force push mess, had quite some trouble reverting my changes to the decompile-fixes patch... I'll squash the PR a final time soon
I'm currently dead, but, if this can be rebased I'll slap the button
No worries, we squash on merge xD Go wild with the commits.
I mean, I guess the "per brush tick" event is not really needed if brush would properly call events when it converts the block types to the "more brushed" state
@Camillo82 that is actually the wrong behavior, and will break when the fix for this is added. So make sure to change it back when this issue gets closed.
0b21890 Fix villager infection chance not being handled... - Sytm
I think it can be even better. Can't we first check if the translation key exists in adventure's global translator? If it doesn't, do we need to bother running it through adventure's renderer? Maybe @kashike can weigh in on this if I'm missing some functionality of adventure's translation system.
I think it can be even better. Can't we first check if the translation key exists in adventure's global translator? If it doesn't, do we need to bother running it through adventure's renderer? Maybe @kashike can weigh in on this if I'm missing some functionality of adventure's translation system.
I'm not sure this is possible. The adventure Translator interface accepts TranslatableComponents or translation keys, but doesn't provide API for listing registered translation keys. A `Transl...
Hmm yeah... I guess there isn't a way to know if it can be converted.
This might be as good as it gets then for now.
Is your feature request related to a problem?
Now its hardcoded to 15 seconds, please add configuration to change it
As addition also provide configuration for the ability to change the coefficient of the arithmetic mean:
Describe the solution you'd like.
Configuration for KeepAlive interval (and/or coefficient of the arithmetic mean) for via System properties or paper config
Describe alternatives you've considered.
Fork paper and changes by myself
Other
_No re...
resolves #9363
This allows to completely change if the AreaEffectCloud gets created, not only force it getting created
not sure if how i implemented this is good i am hoping for some feedback. i think the method names and jdocs are gonna need some work so i am definitely also waiting on feedback for that.
Due to the maybeโข upcoming enum eradication I went ahead and removed the internal usage of the Material enum and use the blocks directly
[Paper] Branch feature/lifecycle-event-system was force-pushed to `13f1d88`
68497a0 Bump tiny-remapper for Java 21 support - jpenilla
[PaperMC/Paper] New branch created: update-tiny-remapper
Expected behavior
Smooth gameplay over the LAN.
Observed/Actual behavior
On paper-1.20.1-196, I experience intermittent freezes (1-2 per hour), lasting for 5-10 seconds each.
Steps/models to reproduce
Running with 3 players over a gigabit LAN, on a quad-core Xeon with 16GB of RAM. Did not experience this nearly as often with paper-1.20.1-176.
Plugin and Datapack List
No plugins or datapacks.
Paper version
paper-1.20.1-196
Other
No response
Adding a config option for something that can very easily completely break client connections completely and that potentially will have some conflicts with vanilla changes in the future just to fix a 15 second visual issue seems a bit much to me. The client relies on a certain order of things happening on login, allowing for changes here seems dangerous.
Additionally the ping on login will be very unreliable due to the large amount of data sent anyways.
Unless there is something else this...
Unsupported version, this is also more generally a support topic, rather than a bug report, which would generally be better discussed on discord
The reason why the keepalive is delayed for 15 seconds is because otherwise the keepalive would be sent during the client being spammed with login stuff which was creating overly inflated ping values, or just leading to outright kicks from it
Should be rebased (first time doing a rebase, so let's hope it worked)
I'm not in 1.20.2 yet but FWIW I have changed this to 5s locally in my 1.20.1 fork and have never experienced any issues that i'm aware of
The issue wasn't the extra keepalive packets, the issue was generally the keepalive packets would end up on the tail end of the flood of packets from login + initial chunks, which the client would effectively stall out
The configuration phase and the chunk limiting stuff in paper (and now vanilla) should mostly aleviate the need for my patches to revert back keepalive behavior, it was just generally a sense of "we're not kicking clients during login all the time for this now so imma no tou...
487109f Readd 0414 use distance map to optimise entity ... - AverageGithub
Expected behavior
Client brand packets should contain their brand.
Observed/Actual behavior
After recently updating paper, it seems like somehow brand packets are deserialized wrongly to have unknown brand payloads instead of net.minecraft.network.protocol.common.custom.BrandPayload, the result is that the .data() is an empty string instead of the client brand.
Steps/models to reproduce
Listen for payload packets
Plugin and Datapack List
Protocollib (for listening to th...
Yeah, upstream just decided to remove the custom handling and handle everything as unknown.
Yeah, upstream just decided to remove the custom handling and handle everything as unknown.
Damn, what can be done to fix this?
There is #9863 as a possible approach to solve this issue
oh yeah, isn't the entire on plugin message received thing broken?
"technically" a breaking API change but those fields were added by paper and shouldn't be used by a plugin anyways so I think its find to just remove them.
There are 3 uses of the move event, I only replaced 2 of them with the server impl of the event. The 3rd is for droppers and doesn't make use of the extra booleans Paper adds.
Updated for 1.20.2. I removed the addition to the paper-mojangapi and just left a comment that we should expose the ParseResults of the function once mojang's brigadier is exposed in the API.
I am replying so I am subscribed to this bug report; sorry for the useless post.
/ rush order for fix <3 /
Is your feature request related to a problem?
Hi,
When typing /help [any command], I do not get any kind of helpful usage summary. It seems like all usage information is missing or the help message is truncated. An example:
[12:10:28 INFO]: --------- Help: /whitelist ----------------------
[12:10:28 INFO]: Description: A Mojang provided command.
[12:10:28 INFO]: Usage: whitelist
In the official server one could get something useful out, though it is not prettily forma...
9/10 times the class name will be in the stacktrace when this happens, but I figured it would be useful to also include it in the error message itself, as it currently only mentions the packet's id
The drown damage is already dealt in another method even for unaware mobs, i guess previously it was dealt in that same method causing the return to break that.
This fix an issue with the egg throw sound being played twice (slightly noticeable with the volume of the sound compared to other projectile) and the enderpearl that didn't reset its cooldown clientside when the PlayerLaunchProjectileEvent is cancelled.
230682d Add raw iron & raw copper blocks to anti xray d... - Warriorrrr
This is basically intended behavior in a sense, craftbukkit replaces the entire help system built into vanilla, which made a lot more sense when they also modified the command itself as they could also add the missing syntax information in a more traditional manner. outside of stripping that out, this is probably a "won't fix/WAI"
I am replying so I am subscribed to this bug report; sorry for the useless post.
/ rush order for fix <3 /
There's a notifications section on this page where you can hit subscribe/unsubscribe
When using Bukkit.getOfflinePlayer("Notch") instead of Bukkit.getOfflinePlayer(NOTCH_UUID), it seems that there's no issue, so that's a decent workaround, but it would be nice if this also worked with the uuid, since that's the recommended way to get an offline player.
To clarify, this is actually the damage that water sensitive mobs take when exposed to water. So its not caused by "drowning" despite what the damage cause is. It's for like blazes and snow golems.
44057da Remove duplicate water-sensitivity damage for u... - Lulu13022002
f78d7ce Remove "fix-curing-zombie-villager-discount" ex... - booky10
In all the cases where the launch projectile event is fired... shouldn't we uncomment the user.awardStat(Stats.ITEM_USED.get(this)); line at the bottom and remove the one wee add? It still would be correct and less vanilla diff. The only thing we would need to handle above was the itemstack shrink. You could also just leave that at the bottom if you added a new boolean at the top that determined if the stack should shrink. I think that is cleaner.
Also, for EggItem specifically, we can...
I moved the change into the patch that adds the ObfHelper so its not completely out-of-order.
aa6c4c1 Include packet class name in packet encoding er... - Warriorrrr
6592fed Use a server impl for hopper event to track get... - Machine-Maker
Subsequent calls to this will blow up as readBytes modifies the reader index
I generally want some comments on what best to do here, 32kb of data is pretty small by default and so I did maybe envision that we'd add way to allow plugins to register their own channels AND override this limit, having this this thing before, it's a PITA as the network I was doing stuff for really didn't wanna pick up additional infra, for ex
43c3432 Add entity API for getting the combined gene of... - booky10
15a0de2 Make Team extend ForwardingAudience (#9852) - powercasgamer
If this blows up, I blame Lynx
0cdce89 Fix a bunch of stuff with player spawn location... - Machine-Maker
8a3980c Add API to get the collision shape of a block b... - TrollyLoki
I hope the method name i fine
23860da Add predicate for block when raytracing (#9691) - TonytheMacaroni
Perhaps this could be locked under a config option?
I mean, that would allow it to be merged I guess, can't really get feedback on this otherwise
75d04e9 Broadcast take item packets with collector as s... - booky10
I agree that this is better wording.
Owen is going to add the test cat wrote in the issue to this, and then its good.
eb0693f Fix EntityDeathEvent cancellation (#9323) - Lulu13022002
f8cfdd4 Fix SmithingInventory helper slot methods for 1... - Machine-Maker
de19eb8 fix incorrectly updated move vector checking pa... - Machine-Maker
87dfff4 Implement BossBarViewer on Player (#9332) - lynxplay
2d09115 Use net.kyori.ansi for console logging (#9313) - rymiel
2553f30 fix secure profile with proxy online mode (#9700) - NonSwag
e289acc Add more API to LingeringPotionSplashEvent (#9901) - notTamion
8cafc07 Added missing enchantables to material tags (#9... - LaylaSilbernberg
It might be nice to add an ItemStack parameter to setInLove to pass the copy through, DoNotUse could then be added to the old signature in case of updates.
Yeah, I like this. Implemented.
274e54b Bump tiny-remapper for Java 21 support (#9902) - jpenilla
[PaperMC/Paper] branch deleted: update-tiny-remapper
supersedes #9831
This implements the HiddenPotionEffect API that Machine proposed on Discord voice chat. This didn't seem like it would fit any existing patch so i created new ones
Expected behavior
Returns the nearest stronghold based on player's location.
Observed/Actual behavior
Returned the same stronghold when I'm anywhere.
No useful log in console.
I tested vanilla server with the same world, everything works fine.
Steps/models to reproduce
I discovered this problem when I updated my server from 1.20 to 1.20.1.
At the same time, the Residence plugin cannot find the location when I create a new residence. https://github.com/Zrips/Re...
I can't reproduce this on a freshly generated 1.20.2 world. Can you give your world seed and the version of minecraft the world was generated in?
Expected behavior
No errors.
Observed/Actual behavior
Errors in console - and general issues with NPCs.
Steps/models to reproduce
I will go over this in the "other" section.
Plugin and Datapack List
Plugins
[15:55:27 INFO]: Server Plugins (1):
[15:55:27 INFO]: Bukkit Plugins:
[15:55:27 INFO]: - Citizens
Datapacks
[15:55:01 INFO]: There are 2 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)]
[15:55:01 INFO]: There are no more data pac...
2nd error is likely a side-effect of the first, looks like the logic there is busted and will just add in an illegal entry there
As for 1st, all we can generally see is that an entity is being added twice, I have no idea what citizens is doing here to induce this
4675152 Don't leave the NearbyPlayers tracker in an ent... - electronicboy
Is this related to recent exploit to abuse containers to lag server?
If yes, then should've fixed this instead:
Crash report causing excessive cpu usage
Comments on commits are probably the worst place to put any form of feedback, please refrain from doing so in the future.
Crash reports are obviously expensive as they have to collect a lot of system data for a potential analysis of a crash.
They should not happen in the first place.
Please either open an issue or, preferably, take this to our discord if you have any more feedback.
f9e3686 Override more PrintStream methods in SysoutCatcher - jpenilla
[PaperMC/Paper] New branch created: improve-sysoutcatcher
Stack trace
[21:23:42] [Yggdrasil Key Fetcher/ERROR]: Failed to request yggdrasil public key
com.mojang.authlib.exceptions.MinecraftClientException: Failed to read from https://api.minecraftservices.com/publickeys due to Connection reset by peer
at com.mojang.authlib.minecraft.client.MinecraftClient.readInputStream(MinecraftClient.java:108) ~[authlib-5.0.47.jar:?]
at com.mojang.authlib.minecraft.client.MinecraftClient.get(MinecraftClient.java:57) ~[authlib-5.0.47....
can you try curling the endpoint from the log? I assume either the service was down (it is frequently down) or you have connection issues to the api, nothing we can really influence.
fwiw I also cant repro.
You can use instanceof cast, that would simplify the code and make it more readable:
if (component instanceof AdventureComponent aComp) {
// don't convert to json and back if already backed by an adventure Component
return aComp.adventure;
}
Expected behavior
When bundles have items inside them, and you right click drag to empty the bundle, after dragging your cursor away from the slot that was right clicked and then releasing RMB, the newest item added to the bundle's inventory will be placed. This is the behaviour using the vanilla Minecraft Server Jar.
Observed/Actual behavior
Holding right click and dragging your cursor while emptying a bundle causes the bundle itself to be dropped into a slot.
This makes emptying...
2nd error has been patched by us, here: https://github.com/PaperMC/Paper/commit/4675152f4908431e0f944a7bf9fa3b2181a2dfd6
1st error appears to have been patched by citizens
This error lines up with another report elsewhere which along with discussions with server owners suggests that mojangs service had a hiccup
spigot could probably make some changes to the help system to actually respect the new help info and provide it somehow, but IMO probably better implemented via plugin developers if anything. would be helpful to have an API to expose the vanilla command's help info though
I seem to have the same problem with vehicles (invisible armorstands) they bugg when despawned in unloaded chunks and using this would be a nice way to always despawn vehicles in unloaded chunks which also helps on restarts and to just spawn then back on chunkload event (if player or admin didn't despawn the vehicle in the meantime but since this method also doesn't work I am running a little out of options
Confirmed. This is a result of craftbukkit's mangling of the quickcraft/drag system. Basically it treats any mouse movement as a full drag, whereas in vanilla, its not a drag unless more than one slot was included in the drag. With the bundle, there is only 1 slot involved no matter how far you drag.
The key problem here is that there's no way to place command blocks and other gamemaster blocks without being fully opped. Right now my jank workaround is to listen for interact events, get all the block state data from the held item, and place a command block approximately where you clicked. This could all be saved if there was a way to place command blocks and gamemaster blocks without OP!
This setting will help limit the tick rate of OneShot entity tasks because "tick-rate.behaviour" does not limit OneShot tasks.
I did this because players were creating villager farms and the existing settings were not helping me at all:
I think using Locale.ENGLISH is better here? We don't want it changing across systems which I think ROOT might?
To quote the Javadocs of the root locale:
This is regarded as the base locale of all locales, and is used as the language/country neutral locale for the locale sensitive operations.
I copied this from that commit. Are you sure I need to change it to ENGLISH?
https://github.com/PaperMC/Paper/commit/12942dc94ba42043461a4d5b5c049a6e53f7c2ee#diff-3e8d15a07d2e1a33d90f0ab38c54c0457d715330c7e478cb55e1ac794d8526a5R134
Ok, sounds like I was under the wrong impression of what it was. ROOT is fine.
Ok, looking at the impl here, I don't really like using the toString() method here. Just call the getKey() method on BuiltInRegistries.MEMORY_MODULE_TYPE directly. Best to toString the ResourceLocation directly as that has less chance of changing in the future.
Expected behavior
No errors will be reported and the correct value will be returned
Observed/Actual behavior
`java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.World.n()" because "this.o" is null
at net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity.unpackLootTable(RandomizableContainerBlockEntity.java:73) ~[?:?]
at net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity.isEmpty(RandomizableContainerBlock...
Confirmed. The underlying cause is that tile entities fail to check if they are actually in the world when they unpack the loot table. That root issue was fixed in 22w43a. Until then, I'll write up a fix for paper.
Expected behavior
Cancel EntityShootBowEvent or PlayerReadyArrowEvent, the number of arrows in the player's inventory will not be reduced
Observed/Actual behavior
The number of arrows will decrease until you click on the arrow in the inventory to synchronize
Steps/models to reproduce
@EventHandler
public void onEntityShootBow(final @NotNull EntityShootBowEvent e) {
e.setCancelled(true); // or e.setConsumeItem(false);
}
@EventHandler
...
Expected behavior
Same as 1.20.1
Observed/Actual behavior
Now at 1.20.2
Steps/models to reproduce
@EventHandler
public void onPlayerInteract(final @NotNull PlayerInteractEvent e) {
e.getPlayer().setAbsorpt...
Since it seems unclear in this PR, has tripwire duping been patched? If so, is there a configuration option to opt into allowing it as discussed in #9542?
Some variation of tripwire duping remains, this should patch them, however, it has wider behavioral changes for the solution, and so, this specific variant has a configuration option
Do note that we generally do not add configuration options for bug fixes
Since it seems unclear in this PR, has tripwire duping been patched? If so, is there a configuration option to opt into allowing it as discussed in #9542?
I can't seem to find in the docs, so I'm guessing this PR was abandoned and superseded by something else perhaps (since certain users report being unable to make use of this duplication glitch even though this PR might not have been merged).`allow-shears...
Absorption is now an attribute, so it needs to be changed using getAttribute.
The setAbsorptionAmount API methods should likely be deprecated and/or redirected to the attribute, similarly to how it happened with setMaxHealth when an Attribute for that was added years ago.
Some variation of tripwire duping remains, this should patch them, however, it has wider behavioral changes for the solution, and so, this specific variant has a configuration option Do note that we generally do not add configuration options for bug fixes
Why should only one variation of tripwire duping include a configuration option over the other kinds?
Chunk Statuses are a wily thing, but it is nice to know when the state of one changes for concept like lazy-loading, etc.
I'm not sure this event should ever be anything other than read-only but this basic version has worked well for me for awhile.
Cant we use Chunk$LoadLevel?
kinda, but they messed up the order of them so it breaks the nice ordinal thing
This is wrong the method works as intended. However the upper bound is now limited by the max_absorption attribute. So you have first to increase this limit (set to 0 by default) to behave like before. But you still need to update the absorption hearts like you do after that. I guess for compatibility this method could either set the attribute before or ignore that limit but this is a feature.
Yeah, was nice for the isUpgrade() method
wrong package. you are missing a /event. i think this could go into io.papermc.paper.event.world or a sub-package of that
The event is fired incorrectly. The chunk system changes the chunk status incrementally, and carefully handles concurrent requests to lower it. It is possible that the overall result of the operation is to lower the status, even if initially it was requested to be higher. You can see this by how the function updateCurrentState works.
You should look more carefully at the operations done in each status change to determine where to place the event. In general this area of code is the worst...
The event is fired incorrectly. The chunk system changes the chunk status incrementally, and carefully handles concurrent requests to lower it. It is possible that the overall result of the operation is to lower the status, even if initially it was requested to be higher. You can see this by how the function
updateCurrentStateworks.You should look more carefully at the operations done in each status change to determine where to place the event. In general this area of code is the...
I agree with @Lulu13022002 here. The method absolutely is still useful, but something is needed to address the max absorption attribute. The best thing to do probably depends on what happens if you override the max and just call that internalSetAbsorptionAmount method on both entities and Players. If there is some use to it, then perhaps another method with a boolean override. But I don't think the default behavior should be to override the attribute.
I've found that this problem seems to be avoided as long as the server command window is not minimized.
It should be caused by the poor disk policy of Windows background calls.
The Rewrite chunk system is good, it loads quickly, it's a lag caused by windows policy.
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
fde5602a PR-927: Add PlayerRecipeBookSettingsChangeEvent
949ff217 PR-930: Add methods to get/set evoker fang attack delay
f6f7c79d SPIGOT-7514, PR-929: Add "Enchantment Roll" API to enchant items according to Minecraft mechanics
d40e22da PR-712: Add API to get full result of crafting items
CraftBukkit ...
Stack trace
https://paste.gg/p/anonymous/22ef4f7a69cb4276a77dd4aa569f5420
Plugin and Datapack List
no
Actions to reproduce (if known)
- use a unix address in the server-ip setting in server.properties such as
unix:/tmp/paper-server.sock - enable velocity/bungeecord in various configs
- patch velocity/bungeecord to allow for proper unix address support between the server and the proxy
- add the server's unix address to the proxy's server list
- start both the server...
Hi there, what's the status on this?
Presumably fixed by #9086
From what I can see it only seems to address the issue in the login process and exposing the SocketAddress in the login events, I can't test the PR right now but I presume pinging is still broken.
There's still the issue with the NetworkClient.getAddress() v Player.getAddress() contract break but that is a separate topic from that PR.
Adds a getModifier(UUID) method to AttributeInstance to get an attribute modifier using its UUID.
Question: Should I merge this diff into the transient modifier patches?
Is it worth exposing the full map somehow? Like an immutable copy of the UUID, AttributeModifier map in the nms AttributeInstance? That would provide more functionality, including getting the modifier by the UUID.
But if its not useful since there is already a method to get all the modifiers, then we don't need it.
Expected behavior
The behaviours tick rates configured to the configurable tick rate in the Paper World Config.
(Recorded using Paper-1.19 Latest with same configuration from reproduce)
Observed/Actual behavior
The behaviours tick rates aren't configuring to the configurable tick rate set in the Paper World Config.
 method. As for exposing the full map as an immutable copy, I'm not sure how useful it'd be, especially since you can just get a modifier's UUID from the modifier itself.
Stack trace
[14:02:22] [Server thread/INFO]: [STDOUT] [net.minecraft.CrashReport] Negative index in crash report handler (0/18)
[14:02:22] [Server thread/ERROR]: Failed to handle packet net.minecraft.network.protocol.game.PacketPlayInWindowClick@49b02578, suppressing error
net.minecraft.ReportedException: Container click
at net.minecraft.world.inventory.AbstractContainerMenu.clicked(AbstractContainerMenu.java:398) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListener...
outside of the fact that we usually don't accept such reports on our issue tracker for new exploits,
- Missing the actual causing exception
- Unsupported version of not paper
- Likely already fixed in the latest builds of paper
Expected behavior
Increased speed while crouching with boots enchanted with Swift Sneak
Observed/Actual behavior
No speed increase compared to no enchantment
Steps/models to reproduce
Load paper server 1.20.2 on latest release as of time of posting (only tested this version)
Enchant boots with Swift Sneak enchantment using either anvil or /enchant command
Plugin and Datapack List
None
Paper version
This server is running Paper version git-Paper-280 (MC: 1.20.2)...
im just a dumbass i thought swift sneak went on boots and not leggings
Expected behavior
Players will spawn at the location where they last logged off
Observed/Actual behavior
The player will spawn in the overworld, regardless of the world he was in before last offline
Steps/models to reproduce
1ใPlayer A goes to the Nether
2ใPlayer A leaves the server
3ใPlayer B uses the command /openinv A (Requires op permissions)
4ใPlayer B closes the open GUI
5ใPlayer A enters the server, will spawn in the overworld instead of the Nether
Plugin an...
Plugins accessing internals is not supported, this is likely a side-effect of:
basically, removing some legacy code from upstream which has been a fun source of problems for a few years now, issue is that they're not loading player data onto the player entity fully, and so, as a result, the world is being reset as they're not triggeri...
The hand was previously only specified when casting the fishing rod. This is useful for plugins which may want to modify the fishing rod item when reeling in.
Add @Deprecated and @DoNotUse to this method. It looks like you changed the only place its used, and we want to catch any new uses of it in the future.
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 ...
I think an override is needed in the UnmodifiableAttributeInstance class for the removeModifier
This error message is not helpful, same below
Stack trace
Plugin and Datapack List
Chunky
CoreProtect
EasyArmorStands
FastAsyncWorldEdit-Bukkit
Geyser-Spigot
GSit-1.5.3
InvSee++
InvSee++_Give
LibsDisguises
Nova-0.14.10.
PaperTweaks
ProtocolLib
Skript
Stargate
ViaBackwards
ViaRewind
ViaVersion
WorldEditSUI
Actions to reproduce (if known)
No response
Paper version
Paper version git-Paper-280 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT)
Other
No response
o never mind it working again
Expected behavior
https://github.com/uran247/voxel-planes-datapack/releases/tag/v0.9.1
Paper 1.20.1 correctly replaced airplanes in resource packs. (light-resourcepack)
Parts are strange in 1.20.2.
Observed/Actual behavior
Unfortunately, the donkey that seems to be used as the basis for resources also appears.
Steps/models to reproduce
I added the diff to UnmodifiableAttributeInstance within this patch instead of the original default attributes patch to match the transient modifiers patch - should I move it to the original patch?
+ Preconditions.checkNotNull(uuid, "uuid");
This would also suffice as a not null check
Used Preconditions#checkArgument to keep in style with the other methods in the class. Also, not a big deal, but Preconditions#checkNotNull throws a different exception (NullPointerException vs IllegalArgumentException).
I checked some other CB classes and it is indeed a mix between Preconditions.checkArgument(x != null, "x"); and Preconditions.checkNotNull(x, "x cannot be null");, so yeah that makes sense to keep in style with the surrounding code
Yeah, I think checkArgument is better because we want the illegal argument exception to be thrown.
No, I think it is fine to add here. We do a similar thing with another method we add to AttributeInstance.
The BlockDropItemEvent fires before the block is changed into its final state after being fully brushed. This gives you full control over what the block drops.
This doesn't solve your issue about cancelling the blockstate changing tho. That can be fixed by adding an EntityChangeBlockEvent right before that happens which you can cancel.
I do not think this event is needed at all. You can accomplish the same things by listening to the BlockDropItemEvent which, contrary to the linked issue, is fired before the block is changed allowing you to change the dropped items.
You can then just add a call to the EntityChangeBlockEvent before the blockstate is changed when the brushing is completed which you can cancel to prevent the brushable block from changing.
c95bc5f Don't unpack loot table for TEs not in world (#... - Machine-Maker
I'm just remembering that there are 2 kinds of modifiers, the transient and permanent ones. Do we need to do anything special to handle that with this? Currently the removeModifier method will remove either (since they still have to have unique UUIDs).
Don't really see the need to distinguish? It's only 'permanent' in the sense that it gets saved, and removal shouldn't be affected by that.
6675d13 Fix strikeLightningEffect powers lightning rods... - notTamion
Closed due to being handled by brig api.
d8847bc Updated Upstream (Bukkit/CraftBukkit) (#9922) - Machine-Maker
It doesn't look like that datapack has explicit support for 1.20.2? It's possible it needs to be updated. Can you try on vanilla 1.20.2 and see if you get the same issue?
This is not really needed, we are already checking the value to not be null in the setter.
This should use the checkArgument one. checkNotNull will throw a NPE if it fails which is a rather ugly exception compared to the illegal args one.
Maybe my brain is fired here, but this would fail to reduce the backoff ticks if the tick delay is <= 0 after its decrementation.
If my server has a tick delay configure of 0, --backoffTicks > 0 is never evaluated.
We might be able to use a com.google.common.collect.ForwardingCollection collecting in combination with a
com.google.common.base.Suppliers.memoize() to only compute the collection of players when a plugin actually needs it during the event.
So e.g. (pseudo code)
Supplier<Collection<Player>> lazyActivatingPlayersSup = Suppliers.memo(() -> transfor(worlds.getNearby.....));
Collection<Player> activatingPlayers = new FowardingCollection() {
delegate() { return lazySup.get() }...
I found where the spread constant was, as for the error this seems to be the usual binary representation error caused by a float multiply by a double. The constant is RandomSource.GAUSSIAN_SPREAD_FACTOR (a double). So you can simplify this by:
double deviation = 0.05F * GAUSSIAN_SPREAD_FACTOR;
in the end this will produce the same number.
dd47ec6 Add Entity Movement Direction API (#7085) - Owen1212055
Why do we need to remove the cooldown here? I don't think the client adds to its own cooldown.
531ef27 Use ApiStatus.Internal instead of Deprecated (#... - Machine-Maker
Expected behavior
When players first join on my server they are facing the wrong direction. They are in the right location, but facing the wrong direction. I have set the world spawn location including the direction every possible way, using commands and the Paper API via a custom plugin but nothing is working.
Observed/Actual behavior
When players first join they are in the right location but the yaw is 0 even though the world spawn location has yaw 180.
Steps/models to repro...
Hugely jank, we need to prolly remove those methods asap.
9548629 Add hand to fish event for all player interacti... - booky10
I think it is worth to add a test here. You can create a mock player relatively quickly (see how GameTestHelper does it).
That way, in future releases and changes, this API does fail a test when it goes out of sync with vanilla given we cannot really use internal logic for the API but have to re-create it.
Fixed by mojang, waiting to see mojang's fix to pull the fix.
aee3830 Deprecate Material#isInteractable (#9216) - Machine-Maker
Superceeded by https://github.com/PaperMC/Paper/commit/23860da6c2f306fdc598fb0d09132636c7141dfd .
A builder is something that might be useful, but in general, would probably be better off implemented in a different way (avoid passing World, etc) So if someone wants to pickup on that, PRs welcome. ๐
Partially resolved by upstream. Will be fully resolved once enums are yeeted.
Mocking a Bukkit Player isn't as easy:
- Bukkit Player
- nms Player
- MinecraftServer <- Requires a lot more stuff
- ServerLevel
- Level <- Mocking errors because some registries are referenced in static fields that are obviously not initialized
When discussing, I am not sure how much of a fan we are of displayedName, I still perhaps think name() is better in this case? In general, the naming is just confusing.
Data display is also a bit odd, as this really only occurs in chat, so I think something like chatDisplay might help describe this better.
<img width="1247" alt="Screenshot 2023-11-11 at 5 41 05โฏPM" src="https://github.com/PaperMC/Paper/assets/23108066/b4c58400-4ceb-4400-b208-abcad58e271b">
Donno, further opinions want...
This is due to async chat, as we have to decorate/resolve message arguments on the chat chainer, which causes it to get moved to the async chat thread. This then however causes the callback logic to be done async, so we probably just need to bump it back to the main thread?
Yea, you are right. The fact that some of the paper code takes a level for granted makes this annoying.
I guess this is fine then, we just need to invest time into integration testing frameworks down the line :upside_down_face:
We've generally decided not to go forward with this change, there is generally little interest in pulling in 3rd party build tooling in order to fix what really amounts to an aesthetical grievance which generally has 0 side effects
I updated to the latest version but it's still broken:
This server is running Paper version git-Paper-288 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: aee3830)
You are running the latest version
Previous version: git-Paper-280 (MC: 1.20.2)
Fixes https://github.com/PaperMC/Paper/issues/9930
Issue here is that we run the chat decorator on the chat executor, but the callback should be ran on the correct thread, chat when its a player, main otherwise. Using the chat TaskChainer facilitates that.
a506b48 Fix several issues with EntityBreedEvent (#8677) - Machine-Maker
Rebased.
It should be noted here that in many cases, blocks are still manually resent. This is mostly in cases where it's obvious there is a desync.
<img width="1273" alt="Screenshot 2023-11-11 at 6 25 15โฏPM" src="https://github.com/PaperMC/Paper/assets/23108066/0be4b872-e4dd-49b3-80ff-4a36842768d3">
Approving on a code perspective and my general understanding of the underlying mechanism, will prefer for others to test, etc
f186318 Run the chat callback on the main thread as exp... - Machine-Maker
Yaw is not saved with world spawn point. Intentional Minecraft behavior.
It is though? Specifically, the angle as mentioned here, and can be retrieved from Level#getSharedSpawnAngle/LevelData#getSpawnAngle?
The spawn command has an angle argument which lets you set that, so, it does exist as a thing
The way this is handled upstream looks kinda scuffed, theres generally a few areas where we get the levels spawn point but don't care about the angle, I'm guessing that this was a relatively recent addition that just wasn't handled by upstream?
Caused by the recent changes on our end. We are fudging spawn position, however that thing resets yaw and pitch.
Idk who to blame here, hopefully not me.
Tested on a vanilla server, this is intentional it seems like. However, when respawning it seems that vanilla doesnโt normally respect yaw? This needs to be looked into a bit.
Just wanter to thanks everyone involved in fixing this issue, that was really fast and it seems to be working like a charm again.
Thanks you thank you thank you ๐ฅฐ
Ok, updated to that.
It's been so long, do we care that the x, y, z coords for the ItemEntity don't follow the exact calculations from Containers#dropItemStack? It's missing the stuff involving the item entity width.
Confirmed, this is a vanilla issue. The spawn angle is just ignored when the player's spawn location is "fudged". Even with a spawnRadius gamerule value of 0, the angle is ignored. There is an open mojira report for it.
My concern is, that I don't exactly know what a clean fix is here. It doesn't immediately strike me that with a spawnRadius > 0, the yaw should always be respected. But I suppose that is the best option.
Is your feature request related to a problem?
Hello,
The modifications to org.bukkit.advancement.Advancement to return a Paper AdvancementDisplay that match different methods than those of its bukkit counterpart directly make Bukkit plugins (using the API) incompatible with Paper plugins.
Describe the solution you'd like.
Either:
- Make the Paper AdvancementDisplay extend the Bukkit One to create API compatibility
- Copy (and maybe deprecate) the Bukkit methods to ensure Buk...
@GamerCoder215 do you have an actual error that happens when a plugin compiled against spigot runs on Paper? We should be fixing this with bytecode rewriting at runtime.
[19:24:45 ERROR]: Error occurred while enabling StarCosmetics v1.3.0 (Is it up to date?)
java.lang.NoSuchMethodError: 'org.bukkit.advancement.AdvancementDisplay org.bukkit.craftbukkit.v1_20_R2.advancement.CraftAdvancement.getDisplay()'
Using Paper build 290 for 1.20.2
[19:25:16 INFO]: This server is running Paper version git-Paper-290 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: f186318)
You are running the latest version
Ok yeah, this is probably because you are calling the method on CraftAdvancement, whereas normal use with the API would call it on just Advancement. And the rewrite only checks for methods owned by Advancement.
Ok yeah, this is probably because you are calling the method on CraftAdvancement, whereas normal use with the API would call it on just Advancement. And the rewrite only checks for methods owned by Advancement.
If you're rewriting the bytecode on the interface (I assume you then must rewrite the bytecode on the class), why does it matter?
Would this be fixed by not casting?
Because it rewrites method descriptors from the interface, not the impl class
Because it rewrites method descriptors from the interface, not the impl class yes, not casting would resolve that
Worked.
Yeah, I think the solution here is for you to not call the method on CraftAdvancement, but just the Advancement interface. We can't really go around supporting every single implementation of every interface when we rewrite methods.
Well if the tickDelay is -1, the spawner is disabled no?
if (tickDelay == -1) { return; } // If disabled
Looks good, still need to test in game. Also, its possible there is an existing patch this can be merged into, not sure.
I would like to give you the highest praise for your quick response to bugs.
However, since URAN is individually programmed, it is clear that many BUG certifications have not been achieved.
I submitted a bug report to URAN several version numbers ago.
At that time, airplanes, which were a resource, were not even displayed.
However, it is displayed now.
So it's natural and inevi...
This style is not used anywhere else in the class (see line 1030), Idk if this should be changed.
Well... some of the class was written before that was a thing. I think we'd prefer to use the newer instanceof where we can.
Previously a plugin couldn't cancel or modify an entity-teleport of another plugin.
Generally calling events in api methods is a bit iffy?
Tackles some TODOs for the paper config stuff.
Also adds a warning and error message if a newer config version was found signaling a downgrade. Hopefully this will reduce the number of people asking about this.
The same world works on vanilla, so I think that's paper's problem.
I do not think this event is needed at all. You can accomplish the same things by listening to the BlockDropItemEvent which, contrary to the linked issue, is fired before the block is changed allowing you to change the dropped items.
You can then just add a call to the EntityChangeBlockEvent before the blockstate is changed when the brushing is completed which you can cancel to prevent the brushable block from changing.
In my opinion, having control over this in a singular eve...
Teleporting players through API also causes an event to be called. Adding an event here is the only way to prevent other plugins from moving an entity, other than teleporting it back every tick if it moved.
If the event should get added for this method, I just want to add that this should then get merged into the patch where this method was added without the surrounding paper comments
Rebased and ready for re-review.
+ for (org.bukkit.event.HandlerList list : new java.util.HashSet<>(handlersLists)) {
I cannot replicate this. I created a world with a Paper server on 1.18.1 with the provided seed. I ran the locate at -5000 70 -5000. The two locations output were different.
[10:54:49] [Render thread/INFO]: [CHAT] Teleported Machine_Maker to -4999.500000, 73.000000, -4999.500000
[10:54:53] [Render thread/INFO]: [CHAT] The nearest stronghold is at [-3880, ~, -3272] (2059 blocks away)
[10:55:02] [Render thread/INFO]: [CHAT] Teleported Machine_Maker to 0.500000, 66.158147, 0.500000
[10...
Also reformats any patches that had incorrect Consumer and Predicate params to follow a better codestyle. Eventually we are going to want to do this to the whole API, when we have upstream in source in repo, but for API that we add, we want it to be a part of the patch so we don't clutter up the git history any more than needed.
Fixes MC-172801
This patch properly applies the generic.flying_speed attribute to bees and parrots. If entities do not have this attribute, they are unaffected. The flying_speed attribute is multiplied by 0.049999999254942 in order to have bees and parrots with the default value of flying_speed be unaffected, having the vanilla 0.02 value.
Closes #9827
Please do not open pull requests from the master branch, create a new branch instead.
Fixes MC-172801
This patch properly applies the generic.flying_speed attribute to bees and parrots. If entities do not have this attribute, they are unaffected. The flying_speed attribute is multiplied by 0.049999999254942 in order to have bees and parrots with the default value of flying_speed be unaffected, having the vanilla 0.02 value.
Closes #9827
Is your feature request related to a problem?
Allow changing the raySize of LivingEntity#rayTraceEntities
This will never include Displays because Displays have a hitbox of 0.
Describe the solution you'd like.
Allowing the definition of the raySize so developers can include Displays.
Describe alternatives you've considered.
Requiring Spigot's long method
result = origin.getWorld().rayTraceEntities(origin.getEyeLocation(), location.getDirection(), 100, 1.0D, entity -> !...
8fb6761 work on bytecode modifier - Machine-Maker
[PaperMC/Paper] New branch created: feature/bytecode-modification
Expected behavior
Location location = new Location(Bukkit.getWorlds().get(0), 0.0, 0.0, 0.0);
player.openEnchanting(location, true);
If there is a level 30 enchanting table at this location, the player can open the level 30 enchanting table normally at any location.
Observed/Actual behavior
If the player is in the overworld, the level 30 enchanting table will be opened.
If the player is in the Nether or the End, the lowest level enchanting table will be opened.
S...
I did some testing locally and saw similar behaviour:
On 1.19.1-81
Setting validatenearbypoi to -1 resulted in job changes occurring in about 2 seconds or less.
Setting validatenearbypoi to 300 resulted in job changes taking up to 15 seconds.
On 1.20.2-290 (latest)
Changing the value of validatenearbypoi had no affect on how long it took the villager to switch jobs. The longest it took was about 2 seconds.
I thought maybe the name of the behaviour had changed as strange as...
I have done some extensive checking and tested multiple versions and returned the following results:
- 1.20.2-290 - Broken
- 1.19.3-448 - Broken
- 1.19.3-429 - Broken
- 1.19.3-428 - Broken
- 1.19.3-320 - Broken
- 1.19.3-308 - Broken
- 1.19.2-307 - Working
- 1.19.2-112 - Working
- 1.19.0-81 - Working
After some research, I believe this may have been caused by the 1.19.3 update where the addition of entity sub-predicate types were introduced, adding the following:
- variant- values...
If the event should get added for this method, I just want to add that this should then get merged into the patch where this method was added without the surrounding paper comments
Which patch are you referring to? The "More Teleport API" patch is modifying this method, but the initial method is from CraftBukkit/Spigot.
If I am not mistaken this is the teleport method taking optional teleport flags as arguments, and that method has been added by the "More Teleport API" patch
currently when creating a new PotionEffect that has a hidden PotionEffect and adding that to a PotionMeta the hidden effect won't get added to the PotionMeta cause afaik there is no NBT for hidden effects or anything like that on a Potion. I don't think documenting this is sufficient. Perhaps just adding the hidden effects (if there are any) as normal custom effects to the PotionMeta is a solution? Please leave some feedback on this
At the moment all openXXX methods on HumanEntity creating real inventories discard the world of the provided location and instead use the world of the player.
It could be easily done to respect the provided world, but a general issue of these methods is that some of these inventories try to access the actual blocks in the world at some point of time and if the block is in an unloaded chunk, same world or another, a sync main thread chunk load will occur which isn't really desirable.
So ...
opening inventories cross world was never an intended usecase for these methods, it was always intended that either you'd be opening a "fake" inventory to a player backed by real world logic, or something actually within some reasonable boundary of them; I don't think that this will be fixed, mainly inso is that if we support it, we need to ensure that it's safe to do and won't induce potential state issues, i.e. the chunk unloads, the world unloads, etc
Expected behavior
Sheep should grass and regrow their wool when all PlayerNaturallySpawnCreaturesEvents are cancelled.
Observed/Actual behavior
Sheep do not eat grass and regrow their wool when all PlayerNaturallySpawnCreaturesEvents are cancelled.
Steps/models to reproduce
Make a plugin:
package com.example.test;
import com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listene...
Hmmm. Yes, its not the best solution, especially as there is currently no teleport cause at all for entities.
Should some sanity checks be added to these methods that ensure that the location is in the same world as the player and maybe a chunk loaded or even a distance check to prevent misuse?
Some entity AI behaviours were changed in 1.19.3 from having their own classes to becoming instances of the OneShot behaviour, including ValidateNearbyPoi. This caused the tick rate options to stop working for those behaviours, as the options use the class names as config keys.
This PR re-adds tick rate option support for the behaviours that were affected by the update.
All OneShot behaviours are created by a call to the BehaviorBuilder.create() method, which happens in a static...
[PaperMC/Paper] New comment on pull request #9946: Implement tick rate options for OneShot behaviors
Near duplicate of #9946 unless I am understanding the diff wrong, just implemented on a different layer ?
[PaperMC/Paper] New comment on pull request #9946: Implement tick rate options for OneShot behaviors
I could be reading #9916 wrong, but I think it is adding another setting to let you rate limit behaviours that require certain memories: jobsite, bed location, meeting point, etc. As any number of behaviours can depend on a given memory, this would rate limit a large of number of behaviours.
This PR just restores the pre-1.19.3 functionality of the existing behaviour rate limit settings, which let you rate limit individual behaviours
[PaperMC/Paper] New comment on pull request #9946: Implement tick rate options for OneShot behaviors
Hmmm, possibly a nicer solution then. I mean the other PR just rate limits the try trigger on the pure memory rather than the consuming behaviour.
I'll have a longer look over this once home ๐ the mobile diff viewer isn't particularly great
Can confirm, this is related to the vanilla fix of MC-210802 that use a method really specific to mob spawning. When you cancel that event the player is removed from a map that this fix then use to check nearby players.
Naming this registerListener too might also be good? Provided that it only accepts one Listener and not multiple, I think naming this registerListener might be a good idea.
Alternatively, could this maybe accept a vararg Listener array?
Partly a duplicate of https://github.com/PaperMC/Paper/issues/7702, though it affecting the EntityShootBowEvent too is new.
[Paper] Branch feature/lifecycle-event-system was force-pushed to `bbf20e5`
[Paper] Branch feature/lifecycle-event-system was force-pushed to `4551ed5`
[Paper] Branch feature/lifecycle-event-system was force-pushed to `995186c`
[Paper] Branch feature/registry-modification was force-pushed to `b4f2aa8`
[Paper] Branch feature/registry-modification was force-pushed to `19039ec`
That's fair, I had it as registerListeners as it replaces registerEvents, but the new one still only registers one listener, even if it registers multiple events.
Expected behavior
Advancement "Oh Shiny" obtain when player throw even one gold item and piglin pick it up.
Observed/Actual behavior
Trigger "thrown_item_picked_up_by_entity" with "item" condition only triggers when player throws stack with two or more items in. Therefore, to get the advancement you need to throw out two gold items in the stack at the same time.
Steps/models to reproduce
- Revoke advancement by command `/advancement revoke @s only minecraft:nether/distract_p...
[PaperMC/Paper] New comment on issue #9947: Trigger thrown_item_picked_up_by_entity work incorrectly
Replicable, EntityPickupItemEvent fixes patch messes around and passes the item stack too late to the method
I think I might be confused that it implies only this advancement progress has it granted: other sources would still have it not marked, which is incorrect
maybe
gets the current AdvancementProgress after the criterion has been granted.
woops lol. not exaclty sure what happened here but seems to me that you didn't rebase correctly: https://github.com/PaperMC/Paper/blob/master/CONTRIBUTING.md#rebasing-prs
i am unsure about this one. "after the criterion has been granted" kinda makes it seem like the criterion will get granted regardless of if the event is cancelled etc. perhaps we could add something like "See {@link PlayerAdvancementCriterionGrantEvent}" to my suggestion. since we already clarified it nicely in the class jdocs
i think including the word current helps a lot, but i agree that linking back to original event is useful. is that compromise ok?
96759b2 Call LivingEntity#onItemPickup before mutation - lynxplay
[PaperMC/Paper] New branch created: bugfix/incorrect-piglin-pickup-item
thing is if we do say it returns the current one. it actually has to return the current one which it doesn't since the advancement progress is being retrieved during event creation and not during the method call. i am unsure if the jdocs or the way its stored is the issue. somebody from paper team should probably look over that one and say how its usually done with events
+ * If cancelled the criteria will be revoked.
The existing EntityPickupItemEvent fixes patch moves the call to LivingEntity#onItemPickup for piglins after the respective EntityPickupItemEvent calls, which is correct.
However the patch moved the call so far down the line that the existing logic already mutated the picked up item entity, leading to faulty state being passed to the onItemPickup method.
To prevent logic in LivingEntity#onItemPickup to read from an ItemEntity that was already mutated, this commit moves the calls prior to ...
might be fine though. probably just me being dyslexic
From what I can tell, anything that would invalidate the advancement progress would also invalidate the advancement itself that is provided in the same way, so I thought it was unnecessary
0a8c873 Call LivingEntity#onItemPickup before mutation ... - lynxplay
[PaperMC/Paper] branch deleted: bugfix/incorrect-piglin-pickup-item
I'm not sure if this adds to the issue much but some things seem to de-trim non-armor items more frequently. Going slow doesn't seem reliable either as sometimes waiting 10 seconds between actions can still result in certain actions de-trimming an item stack.
some such instances:
- Right clicking a trimmed item stack like carved pumpkins to split the stack can detrim both stacks
- Middle clicking stackable trimmed items can de-trim both, or make your cursor pick up an untrimmed copy of ...
closes #9919
closes #7702
Stack trace
Plugin and Datapack List
Chunky
CoreProtect
FastAsyncWorldEdit-Bukkit
Geyser-Spigot
GSit-1.5.3
InvSee++
LibsDisguises
ProtocolLib
Skript
ViaBackwards
ViaRewind
ViaVersion
Actions to reproduce (if known)
-start :start.bat"
-cmd starts
-crash
Paper version
git-Paper-292 (MC: 1.20.20
Other
it starts and after like 10 secends closes
You did not include any stack trace, please also use the discord for support.
This pull request adds the FluidState API started by MachineMaker in PR #8609.
It adds everything in the PR's todo list. I tested the methods and they returned everything correctly. I don't really know what more I could say. Feel free to ask any questions!
Also where did the methods on the BlockState go that the original PR had?
Maybe replace both of these methods with a single one taking a Position?
You then can also use MCUtil.toBlockPos to convert the position into a NMS BlockPosition
Remove the separate world argument, because a location contains a world
Use MCUtil to convert the Location to a blockpos
Why not use Location just like all other methods like getBlockAt?
Location can not contain a World. Which would mean i would have to return null or make it throw an exception
Also where did the methods on the BlockState go that the original PR had?
Owen said on [Discord](#paper-contrib message) that we probably shouldn't couple liquid with blocks. That's the main reason for the fact it's not there. I could still add it tho. If do add it, should I make it a new patch or edit the existing one?
Position is a new API that is used where a world from the location object does not get used, as methods on the World / RegionAccessor discard the world inside the location because it uses itself
You could add an not null check using Preconditions.checkNotNull(location.getWorld()) or something similar, because calling this method like this seems a bit silly:
fluid.getFlowDirection(location.getWorld(), location);
Owen said on [Discord](#paper-contrib message) that we probably shouldn't couple liquid with blocks. That's the main reason for the fact it's not there. I could still add it tho. If do add it, should I make it a new patch or edit the existing one?
If Owen said that you can leave it like it currently is, he is more knowledgeable around this stuff after all.
Expected behavior
For example the material Material#BAMBOO_WALL_SIGN is NOT an obtainable item in survival minecraft. So the method is expected to return false.
Observed/Actual behavior
When I check the material Material#BAMBOO_WALL_SIGN with the isItem method it returns true.
Steps/models to reproduce
System.out.println(Material.BAMBOO_WALL_SIGN.isItem());
Plugin and Datapack List
none
Paper version
This server is running Paper version git-Paper-196 (MC: 1.20.1) ...
I am unable to reproduce this, both on 1.20.1 and 1.20.2. Just logging Material.BAMBOO_WALL_SIGN.isItem() results in false, as expected.
The check is just done with one big switch statement (starting at line 8514 in Material), it would be a bit unusual if that is suddenly returning different things.
e5274ee Fix spawners checking max nearby entities with ... - Machine-Maker
b72fd25 Move event type list to server impl - Machine-Maker
581c743 Add API to retrieve an attribute modifier from ... - TonytheMacaroni
In the future this event could be added onto through the teleport API addition patch.
8611796 Fix missing event call for entity teleport API ... - booky10
250388d add getAdvancementProgress() to PlayerAdvanceme... - the456gamer
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
96340858 PR-938: Various Sound API improvements
cbfe0ff0 PR-937: Minor improvements to World#rayTrace documentation
e979ee95 PR-935: Change Consumer and Predicates to super
27ae46dc SPIGOT-3641, SPIGOT-7479, PR-931: Add missing values to EntityEffect
0616ec8b Add eclipse .factorypath file to .gitignore
...
This is a critical problem for us as well - so we just hack around it in our paper fork. Not ideal, and certainly not a PR I'd like to submit here... but this patch has worked for us for years now:
Would love to see this changed someday. Until this is fixed it's difficult to reliably build a plugin that alters how player data storage works.
@...
Oh, it looks like the above referenced #9679 does basically this same thing, I should have checked before commenting.
The problem with this is that the behavior for certain plugins COULD possibly change or even break them which is a total no-go in production but thanks for your input
Stack trace
c86930b51dbd4c30964a3dc0cddae62d
[17:47:28] [Paper Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-217 (MC: 1.20.2) ---
[17:47:28] [Paper Watchdog Thread/ERROR]: The server has not responded for 10 seconds! Creating thread dump
[17:47:28] [Paper Watchdog Thread/ERROR]: ------------------------------
[17:47:28] [Paper Watchdog Thread/ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[17:47:...
Spigot has merged the virtual entity API now. Any chance this can be updated to directly include it or do you want to keep that separate?
Long standing vanilla issue, treasure maps will attempt to potentially generate some stupid metric amount of chunks in order to populate the map inside of them
Stack trace
[01:38:30] [User Authenticator #1/INFO]: UUID of player sapir3 is aa5cd6bb-d9d1-421f-b4ae-ceadc6ed7005
[01:38:30] [Server thread/INFO]: sapir3[/70.59.238.240:55627] logged in with entity id 8918 at ([world]-48.5, 53.0, 490.5)
[01:38:30] [Server thread/INFO]: >> sapir3
[01:38:32] [Server thread/ERROR]: Failed to handle packet net.minecraft.network.protocol.game.PacketPlayInWindowClick@44a4a42e, suppressing error
net.minecraft.ReportedException: Container click
at ne...
Thats an exploit that was fixed in 1.20.2. Updating will fix it.
Thanks, must have missed that patch log.
Will update
On Nov 19, 2023, at 9:23 PM, Malfrador @.***> wrote:
Closed #9955https://github.com/PaperMC/Paper/issues/9955 as not planned.
โ
Reply to this email directly, view it on GitHubhttps://github.com/PaperMC/Paper/issues/9955#event-11005509378, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAYW7B6UWQKKIRMYVXCZSI3YFK5JHAVCNFSM6AAAAAA7SGL24KVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRGA...
Any chance this can be updated to directly include it or do you want to keep that separate?
I really want to wait as long as possible before adding this. It is a poorly designed system with many flaws. It exposes "not-in-world" entities in new event calls that will be unexpected to plugins, the API itself does not care at all about cancelled spawn events, and I'm sure a dozen other problems with specific entity events that will not throw exceptions, but have bad behavior if called on a n...
This is tricky here.
The whole "blockdata" api is based on the idea that most methods can exist as the block is independent.
However fluid is strictly tied to the world due to its inherently unfinished implementation.
I think that we should call this FluidState, to not only align with vanilla but to make a clear distinction between block data here.
Because in truth, FluidState represents a block in the world.
IMO, these should be utilities on Fluid rather than on FluidData
This should just be a default implementation of getType() == ...
Or not exist at all.
In general I think this api is very helpful, but I think we need to move a bit in a different direction here. More specifically, you're sort of mashing the BlockData concept of being "wordless" and BlockStates "world" idea.
Since you're introducing methods that require a world, but also some that don't.
cc @Lulu13022002
(This would need to be removed)
Otherwise looks good
This should get a less generic name, it sounds like it holds one or a pair of potion effects (not a type), when really it is just a bare bones potion effect.
But I also don't know what ๐
something along the lines of Fluid.isWater(Fluid fluid)?
I put it there because it was in FluidState, but i guess i can remove it
Didn't do that, this was in MachineMaker's original PR and to be honest I have no idea how it works. If i get the FluidData of an air block, and do getFluidType() it returns Fluid.EMPTY so uh it works i guess?
This was the original name in MachineMaker's PR. And I guess it makes sense, but shouldn't it be named differently to not confuse it with the minecraft one?
you're sort of mashing the BlockData concept of being "wordless" and BlockStates "world" idea.
Since you're introducing methods that require a world, but also some that don't.
So should I do methods that require a world or not? I would say they don't require a world since you get the FluidData from the World.
Yes, (assuming not static here)
Wellโฆ. We arenโt going to confuse it with the Minecraft name. Mayching MC names is ideal.
imo jdocs should just be changed similar to setHealth: "Sets the entity's health from 0 to getMaxHealth()"
basically just change the amount parameters jdocs to be something like this: "new absorption amount from 0 to its GENERIC_MAX_ABSORPTION Attribute"
I do not agree. This isn't the equivalent of a bukkit BlockState, which is what it will be confused with if we call it FluidState. It's the equivalent of an nms BlockState which the api calls BlockData.
nms FluidState does not represent a block in the world, all the methods on it require a Level.
I didn't include empty here because it's handled below in the getOrDefault call on the map when creating an instance. the empty just uses the regular PaperFluidData type.
Okay, that's fair. discard.
Do note here that this may be better to be covered FluidTag in future, but this would be future stuff, as the tag API won't work nicely with fluids since it's an enum currently.
I think its fair to have a copy/clone/whatever method to create a duplicate of it, since it doesn't have any world state, copying a fluiddata and applying it to some other location is valid.
Is this good or needlessly excessive ?
<details>
<summary>Code</summary>
public enum Fluid implements Keyed {
// ...
WATER{
@Override
public boolean isWater() {
return true;
}
},
/**
* Flowing water.
*/
FLOWING_WATER{
@Override
public boolean isWater() {
return true;
}
},
/**
* Stationary lava.
*/
LAVA{
@Override
pub...
(Continuing on my previous comment)
The thing is that some methods in FluidState just don't need a Level and position like getAmount and getHeight since it can just read it from the block properties (you know, the data you can see when looking at a fluid with F3). getFlowDirection really is just the only one that needs a position and level
The PlayerChatEvent previously linked to the now deprecated AsyncPlayerChatEvent and there were double deprecated annotations. I just took the deprecation message from ChatEvent since that one seems nice and compact
Has happened to me too, It really makes it hard for us to use worldborders in minigames.
Been using this in production for over 3 months with 0 problems, saved data io and portal travel are 2 main natural causes of lag spikes (ticks over 250ms) from what I've seen (I have maps disabled lol).
This patch is great as its a simple fix with large benefit.
This appears to prevent Asynchronously teleporting entities, is this intended or an unforeseen side effect?
This appears to prevent Asynchronously teleporting entities without an error being printed in console, is this intended or an unforeseen side effect?
Using our API or through NMS? Async teleportation that you may be doing here is not supported, but please show stacktrace.
@Machine-Maker how did you discover this? I.e. do you have a specific scenario in which this behavior is reproducable?
- public io.papermc.paper.block.fluid.FluidData getFluidAt(int x, int y, int z);
+ public io.papermc.paper.block.fluid.FluidData getFluidData(int x, int y, int z);
To be consistent with getBlockData method names
These are incorrect. I don't think any isWhatever methods should be added. These are already set by tags and changeable by datapacks. Those tags are already exposed to the API, I don't think we need an alternative way to do it.
Inline the import (or just don't use it at all, not needed)
Should be removed as I mentioned in my own review
c1cd363 Update paperweight to 1.5.10 and Gradle to 8.4 - jpenilla
[PaperMC/Paper] New branch created: build-updates-1
Expected behavior
Im currently developing a vehicle plugin and I am teleporting the seats every tick to their offset position from the main armorstand.
I expect them to be like in this image.
Observed/Actual behavior
However, when driving out of the render distance of a player and entering it again, the armorstands are desynced with the player like in this picture.
...
Thanks for your report! Will take a peak at this, in general when teleporting entities to a location close to themselves they instead send position packets "relatively", so in the case that their initial position becomes desynced, it can obviously cause stuff like this to happen.
e1cd9e5 Update paperweight to 1.5.10 and Gradle to 8.4 ... - jpenilla
[PaperMC/Paper] branch deleted: build-updates-1
I see. Kinda sad that wasn't put forward on the original PR :S
thats what happens if you close PRs to the public ๐คท
I see. Kinda sad that wasn't put forward on the original PR :S
thats what happens if you close PRs to the public ๐คท
Don't say it as if you don't know that it's not intentionally like that. (For anyone who doesn't know: It's a limitation with Stash's permission system, it was not a choice to not make them publicly visible)
And I am sure most relevant people have access anyways...
I see. Kinda sad that wasn't put forward on the original PR :S
thats what happens if you close PRs to the public ๐คท
Don't say it as if you don't know that it's not intentionally like that. (For anyone who doesn't know: It's a limitation with Stash's permission system, it was not a choice to not make them publicly visible)
And I am sure most relevant people have access anyways...
I always have and always will disagree with that argument. Any organization ...
Expected behavior
ๆญฃๅธธ่ฟๅ ฅๆธธๆ๏ผๅนถไธๆฅๆถๅฐ่ตๆบๅ
Entering the game normally and receiving resource packets
Observed/Actual behavior
็ฉๅฎถ่ขซๆฆๆช
Player intercepted
Steps/models to reproduce
1.่ฟๅ
ฅ็ฌฌไธไธชๆๅกๅจ๏ผๅๆ ทๅธฆๆๆๅฎ่ตๆบๅ
๏ผๆฅๆถๅฐ็ฌฌไธ่ตๆบๅ
ใ
2.่ทจ่ถไผ ้ๅฐ็ฌฌไบๆๅกๅจ๏ผๅคฑ่ดฅ
Plugin and Datapack List
- ChestCommands, *ChineseNickName, Citizens, CMILib, CnUsername, *CommandNPC, ConsoleSpamFix, dynmap, Essentials, LuckPerms
Multiverse-Core, Residence, SkinsRestorer, *Stp, Vault, VeinMiner, ViaBackwards, ViaVersion
P...
I managed to fix the problem by lowering the telportDelay in the ServerEntity. I don't think this is the best soulution but it works in my case.
I stumbled upon this bug and poked around for a bit. Not finding an "easy" solution, I first tried moving the
((net.minecraft.server.level.ServerLevel) this.level).chunkSource.chunkMap.anyPlayerCloseEnoughForSpawning(this.mob.chunkPosition())
to the location of destroying the grass block - so the sheep can still regrow its wool. Preferring to have the bug of the grass not being destroyed, than to never regrow the wool at all.
The biggest problem I had in looking for a real solution, w...
Expected behavior
Cancelling a player's command would cancel the command being run
The player would be able to chat as intended
Observed/Actual behavior
After a player's command is cancelled, they cannot chat or run another command without being kicked.
Steps/models to reproduce
A simple plugin with a class that contains this code:
public class CommandListener implements Listener {
@EventHandler
public void onCommand(PlayerCommandPreprocessEvent event) {...
[Paper] Branch feature/lifecycle-event-system was force-pushed to `2942811`
This patch fixes a bug where the dependency tree used for classpath joining,
wasn't built using the bootstrap dependencies, for plugin bootstrappers.
Please do not open pull requests from the master branch, create a new branch instead.
This patch fixes a bug where the dependency tree used for classpath joining,
wasn't built using the bootstrap dependencies, for plugin bootstrappers.
[PaperMC/Paper] Pull request review submitted: #9963 Fix plugin bootstrap dependency tree population
Code review looks good to me, will need to fixup original paper plugin patch on merge.
Tested using Paper's internal paper plugin tester tool.
[Paper] Branch feature/registry-modification was force-pushed to `e5fca8b`
This appears to prevent Asynchronously teleporting entities without an error being printed in console, is this intended or an unforeseen side effect?
Using our API or through NMS? Async teleportation that you may be doing here is not supported, but please show stacktrace.
thank you for your reply, this is no longer an issue, I appreciate you taking your time to reply to me
fa23081 Un-experimentalize Position and Entity TP APIs - Machine-Maker
[PaperMC/Paper] New branch created: refactor/remove-experimentals
Both the Position and Relative Teleport/Look At APIs have been mature for a while now with no breaking changes needed. I think we can safely remove the Experimental annotation from them. I don't want to just end up never removing these annotations.
[Paper] Branch refactor/remove-experimentals was force-pushed to `ded9d85`
Would async variants of the new teleport methods be added in a separate PR? Since this is just taking them out of the experimental phase
I think those can be added whenever really. I don't think those teleport async methods have any server implementation, it's just loading the chunk async and then teleporting within the future that is returned.
96d5e6c Code Generation for TypedKeys (#9233) - Machine-Maker
[PaperMC/Paper] branch deleted: feature/key-generation
[Paper] Branch feature/registry-modification was force-pushed to `27dd551`
I was able to reproduce this issue with Dungeons and Taverns data-pack on Paper 1.20.2 299.
https://pastebin.com/raw/U0iKNuyf
Occured while pre-generating world on 927816334084923 seed using Chunky. Affected location happens to take place somewhere near X = -359 and Z = -853, by the nova_structures:undead_crypts structure.
the me serwer minecraft
Asynchronous chunk generation provides an opportunity for mobs being added with generation to have effects added to them. The event does not support asynchronous firing.
This functions by checking the type of the ServerLevelAccessor provided in the finalizeSpawn method and doesn't fire the event if it's not a ServerLevel.
I don't think this is the final fix for this, some mechanism probably has to be introduced to allow the event to be fired asynchronously without breaking plugins' ex...
@Grabsky if you can reproduce it, go ahead and try using the server jar that is linked at the top of https://github.com/PaperMC/Paper/pull/9965 (if it's not linked yet, wait a few minutes).
This PR seems to fix the issue - with these changes, I was able to generate the world normally.
Expected behavior
Only a certain amount of entities spawn within the range of the spawner (In the case of the video below, 5 entities)
Observed/Actual behavior
MaxNearbyEntities is not obeyed by mob spawners and spawners will blow past the cap
Steps/models to reproduce
https://github.com/PaperMC/Paper/assets/62525223/25113864-48a7-4d02-b17f-5902351039f5
Plugin and Datapack List
None - Tested with only Paper
Paper version
This server is running Paper version ...
Might be an annoying question, but what about Location? The whole Position API seems to be immutable, but Location, which implements FinePosition, just isn't. I feel like there might be a problem when a plugin has positions stored that change over time. Also, Location already has a bunch of mutating offsetting methods, and now it has more, but without a single mark that those are creating an immutable Position that isn't a Location.
I'd say either Location's and Positions' javadoc should d...
Issue is caused by this part of the vanilla bugfixes patch implemented in #8945. The clazz parameter of the tryCast method shadows the clazz parameter of the forExactClass method.
Has happened to me too, It really makes it hard for us to use worldborders in minigames.
True, I might try to fix this myself as no one from the core dev team seems to care about this since it's only relevant for minigames.
The hope was that the patch maintainer would look into this, given that he generally knows this stuff much more closely than the rest of the team, given my lack of eye sight, this is not a high priority for me, but it's false to say we don't care.
Has happened to me too, It really makes it hard for us to use worldborders in minigames.
True, I might try to fix this myself as no one from the core dev team seems to care about this since it's only relevant for minigames.
If you're gonna try to fix it yourself I can give you more info about the bug
Has happened to me too, It really makes it hard for us to use worldborders in minigames.
True, I might try to fix this myself as no one from the core dev team seems to care about this since it's only relevant for minigames.
If you're gonna try to fix it yourself, I can give you more info about the bug
That info being?
Iโm having the same issue! Canโt do the location command anymore
This is not a bug, this is generally how commands have worked for years, just the plugin changed
use minecraft:command to force it to run the vanilla command
This is not a bug, this is generally how commands have worked for years, just the plugin changed use
minecraft:commandto force it to run the vanilla command
Thank you! I didnโt know that was a way to do it ๐ซถ๐ป
FYI... I used an alias in commands.yml to "restore" the reload command to the Minecraft command:
`aliases:
reload:
- minecraft:reload $1-
`
If you know the range you can use the Range annotation
This can be a default method
I think checkArgument would be better here with a proper message
The reason I had it this way in my original PR was so it was similar to CraftBlockData. We can simplify it, but there is something to be said for setting it up the same way.
OSHI maintainer here. Found this bug introduced in version 6.4.5. Fixed in 6.4.8.
[Paper] Branch feature/bytecode-modification was force-pushed to `6990b14`
I was able to trigger a ConcurrentModificationException while using this PR:
[18:54:22] [Paper Async Command Builder Thread Pool - 0/ERROR]: Caught previously unhandled exception :
[18:54:22] [Paper Async Command Builder Thread Pool - 0/ERROR]: Paper Async Command Builder Thread Pool - 0
java.util.ConcurrentModificationException: null
at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1486) ~[?:?]
at java.util.TreeMap$ValueIterator.next(TreeMap.java:1531) ~[?:?...
[PaperMC/Paper] Pull request opened: #9968 Configurable Dry and Wet Farmland Nearby Water Tick Rates
If your server has a lot of farms, the isNearWater calls gets very expensive.
To workaround this, we can throttle the tick rate of farmlands, because after all, you don't really need to check if the farmland is near a source of water that much, right? It is not like the water will magically vanish if they are in a player made farm.
This helps a lot, on my server farm lands were taking up 8% of CPU time, so throttling the tick rate to 8 helped.
There are two options: `dry-farmla...
For each player on each tick, enter block triggers are invoked, and these create loot contexts that are promptly thrown away since the trigger doesn't pass the predicate.
To avoid this, we now lazily create the LootContext if the criterion passes the predicate AND if any of the listener triggers require a loot context instance.
While the performance increase ain't that big (on a random profile with ~55 players on my server, the createContext call was using 0.10% according to spark), ...
3c83853 completely handle the Position Location change - Machine-Maker
[Paper] Branch feature/bytecode-modification was force-pushed to `0b79ec2`
The blockEntityTickers list was replaced with a custom list based on fastutil's ObjectArrayList with a small yet huge change for us: A method that allows us to remove a list of indexes from the list.
This is WAY FASTER than using removeAll with a list of entries to be removed, because we don't need to calculate the identity of each block entity to be removed, and we can jump directly to where the search should begin, giving a performance boost for small removals (because we don't nee...
thanks! we don't include oshi ourselves, but we forwarded it to mojang so they can update it at their end
I'm not a super huge fan of the way this logic is structured. To be clear, it seems to work, but the optional.isPresent() check on the earlier if statement to counter the optional.isEmpty() check below might not be the most clear way to do this.
As much as I don't like using the return value of variable assignment, perhaps this is more clear?
- if (optional.isEmpty() || optional.get().matches(lootContext)) {
+ if (optional.isEmpty() || optional.get().matches(lootContext = (l...
It's almost worth creating a new wrapper type for tick rates cause now we have like 5 of those big ugly long if statements that are identical (FarmBlock and SpreadingSnowyDirtBlock)
Here's the patch with your suggestions, if other people also agree that this is better, I will commit it directly to the branch :3
It's almost worth creating a new wrapper type for tick rates cause now we have like 5 of those big ugly long if statements that are identical (FarmBlock and SpreadingSnowyDirtBlock)
If it is easier, maybe creating a simple static function shouldSkip(int tickRate, int hashCode) could also help clean up those pesky if statements without requiring too much work.
Adds a new file, command-aliases.yml into our config folder for defining simple aliases for commands that work with tab completion and permissions. Schema is as follows
alias1: some-command
alias2:
- some
- command
alias3:
target: some-command
permission: some.permission
alias4:
target:
- some
- command
permission: some.permission
The default permission behavior is to combine all of the permission requirements at all of the nodes al...
Expected behavior
to stop playing when being broken
Observed/Actual behavior
still playing when broken
Steps/models to reproduce
place a juke box
spam it with a bunch of music discs
https://github.com/PaperMC/Paper/assets/53542804/3a9d801a-73ea-4277-8fa9-a67528f6464d
Plugin and Datapack List
spark, viaversion, viabackwards
Paper version
Paper version git-Paper-290 (MC: 1.20.2) (Implementing API version 1.20.2-RO.1-SNAPSHOT) (Git: f186318)
Other
_No r...
[Paper] Branch refactor/remove-experimentals was force-pushed to `8109ceb`
Ok yeah, there has been some more discussion about Position on the discord. Possibly we can just remove FinePosition from being implemented by Location and just have an asPosition method. Either way, removed that from this patch, now its just the teleport API.
334b2f2 Fix max nearby entities class check (#9967) - TonytheMacaroni
faa2f47 Lazily create LootContext for criterions (#9969) - MrPowerGamerBR
8280211 Fix yaw being ignored for first spawn pos (#9959) - Warriorrrr
8eac3e1 Don't fire EntityPotionEffectEvent during world... - Machine-Maker
resolves #8916
i was unsure where to add checks but i think they fit pretty nicely where they are now.
0b20f94 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#... - Machine-Maker
f9938d3 Fix plugin bootstrap dependency tree population... - oxkitsune
b37bbcf Use ? super in Consumer/Predicate API (#9939) - Machine-Maker
This patch should just completely replace Fix MC-117075: TE Unload Lag Spike. That is the patch that changes the removal logic from vanilla's removal 1 at a time to using the removeAll. No point in having a patch that is completely reverted in a later patch.
Seeing as though nobody else has reported this issue, I am gonna close this. It seems like something got into a very invalid state as it doesn't really make sense that this could occur.
If you experience this issue again please feel free to report, and we can reopen this issue. ๐
Superseded, will be done in bulk later.
[PaperMC/Paper] New branch created: version-catalogs
todo
- paperweight needs changes to support version catalog use (at least dev bundle gen, maybe more)
- needs release build of multi-version-catalog
- need to go through the patches and migrate all the dependencies & versions
Has anyone mad this a plugin for 1.20.2?
Ok, went for OperatorInteractEvent with specific subclasses for Block and Entity since minecart command blocks also exist.
[PaperMC/Paper] New branch created: update-mapping-io
i have been using the hasStarted boolean from Watchdog since that kinda behaves like a isreloading boolean. however the watchdog thread is not started until after the first tick is done. so a required plugin could have done this:
and the server would not get stopped.
with powershell being the "new" default terminal for windows (which does not load commands from the current directory by default) i think this should be mentioned
Expected behavior
Java version check should be ignored when starting the server
Observed/Actual behavior
The version compatibility check runs anyway and stops the server's execution
Steps/models to reproduce
Run an unsupported java version and try to run the server with "-paper.IgnoreJavaVersion=TRUE"
Plugin and Datapack List
openjdk-17
Paper version
1.20.2 Build#307
Other
I'd like i was just trying to run Paper through termux on my phone, which obviously is...
What's the exact command line you're starting your server with?
i have tried using "-DPaper.IgnoreJavaVersion=true" (which tells me it's not a recognized option) as well as "-Paper.IgnoreJavaVersion=true" which just doesn't do anything at all
Make sure you put that before the -jar, not after
What's the exact command line you're starting your server with?
i have tried using "-DPaper.IgnoreJavaVersion=true" (which tells me it's not a recognized option) as well as "-Paper.IgnoreJavaVersion=true" which just doesn't do anything at all
Make sure you put that before the -jar, not after
That worked, thank you, sorry i didn't think the order of the command would matter, problem was between the chair and keyboard ๐
I do not get the point of this change, this seems obvious. I think that the people using this project will be aware of what terminal to use.
This patch should just completely replace
Fix MC-117075: TE Unload Lag Spike. That is the patch that changes the removal logic from vanilla's removal 1 at a time to using the removeAll. No point in having a patch that is completely reverted in a later patch.
I've now replaced the old patch with the new code :3
I also changed the code a bit: Now the list itself tracks what indexes and where to start the search, instead of throwing the code in the tickBlockEntities() method, which m...
[PaperMC/Paper] Pull request opened: #9978 Log correct recipes and advancement count on server start
Previously, the recipe cout log always logged Loaded 7 recipes. It was logging the number of recipe types, not the number of recipes loaded.
Also, upstream claimed to have moved the log message logging the number of advancements loaded to somewhere else, but I can't find it and it doesn't show up, so I added it back.
I cannot reproduce this. Try without the via plugins? It looks like from your video, it doesn't have a record in it when you break, so it doesn't stop the music. The music stop is just a packet sent when a jukebox is broken that has a record in it, so some state somewhere is being desynced.
It's possible I'm not clicking fast enough, but I was doing in creative so I didn't need to switch hands, just put in disc, and pop it out. But always when I stopped and the music was still playing, br...
since powershell is the default and i think thats also what most people use the wording "On Windows" isn't correct imo. while yes people using the project will probably know that. It is still incorrect.
How is "powershell" the default? Opening intellij and pretty much any major IDE, you get a standard command terminal.
I just think this is negligible.
wait huh. then i don't remember changing the default. what version of windows are you using?
We'll see what others think, perhaps.
Could just say that on Windows you should use .\gradlew.bat, that'll work for both the old conhost and powershell
so basically just remove the part about windows?
Pretty sure both intellij and windows terminal default to PowerShell nowadays, I agree with Emily's comment
I know that this looks like a stupid optimization that doesn't do anything, but hear me out: getDurability() ain't free, when you can getDurability(), it calls getItemMeta(), which then allocates a new ItemMeta or clones the current item's item meta.
However, this means that we are unnecessarily allocating useless ItemMeta objects if we are comparing two items that do not have durability, and this impact can be noticed if one of your plugins has a canHoldItem function that chec...
This may be impractical due to https://github.com/gradle/gradle/issues/26020, adding or removing one catalog entry will cause the entire paperweight pipeline to be run again.
I've been running this patch on my server for ~1 week already (after making my own makeshift patch that only did the ItemFrame getItem() optimization, only to find out that someone else already had made the same patch but better) and I didn't find any issues, and it also improves performance a bit if the server has a lot of item frames (which is my case for a Survival server) by avoiding calling getItem(), where all getItem()calls were using 0.25ms every tick. (not a lot but for big ser...
+ this.server.getLogger().severe("The required plugin " + plugin.getName() + " was disabled. Stopping Server.");
+ * Checks if the server is currently reloading
+ *
+ * @return if the server is reloading
Might need a better explanation
+ * Checks if the server is currently reloading
+ *
+ * @return if the server is reloading
Might need a better explanation
i might be understanding this wrong. but that would mean that we can't give the user information on what plugins actually aren't enabled and on a server with a lot of plugins and a bunch of logging that information can be pretty useful so you don't have to dig through logs.
i mean what do you suggest? "Checks if the server is currently reloading." seems self explanatory
[Paper] Branch refactor/remove-experimentals was force-pushed to `74d69f4`
JavaFile.Builder builder = JavaFile.builder(this.packageName, this.getTypeSpec()).indent(" ");
Can't this be on the same line?
4d111a3 Un-experimentalize Entity TP APIs (#9964) - Machine-Maker
[PaperMC/Paper] branch deleted: refactor/remove-experimentals
So this only covers 1 type of reload. There is the very much supported reload caused by /minecraft:reload which reloads datapacks, recipes, tags, advancements, etc. I think that should be covered by this as well.
Is any weirdness caused by starting the shutdown here when this disable call could be in disablePlugins which is a loop over all the plugins, calling disable on each of them? I haven't tested it, it just might be a concern.
Create a separate // Paper start - isReloading API comment block instead of adding to an existing one. This is something I've been starting to do because it makes it more clear which patch diff comes from without having to look at the blame. Same in Server as well.
Adds MaterialTags for the Following Sets
- Leather Armor
- Chainmail Armor
- Iron Armor
- Golden Armor
- Diamond Armor
- Netherite Armor
I'm skeptical about adding more of these right now. I think we are planning on deprecating this whole API when upstream deprecates the Material enum.
They'll be replaced by a better system for adding custom tags. Of course if that happens in 2 years, its fine to add these now, but if its 1.21, then I'd rather not.
27fa5a6 MergedProperties POC for sharing properties bet... - jpenilla
[PaperMC/Paper] New branch created: merged-properties
This is an alternate way to share dependency versions between api & server to version catalogs (#9974), which have the problem where any catalog change that impacts the generated accessor ABI will cause the entire paperweight pipeline to run again (which makes it impractical for our use case)
If we decide to go forward with this, will need to merge https://github.com/PaperMC/paperweight/pull/226 and make a paperweight release first.
So as far as I can tell, running the generate task now will just delete the deprecate stuff. I'm not sure that's a good thing, running that task shouldn't generate any git diff. Either we just manually paste that text into the file or something in the generation code, or we way this is waiting for 1.21 so we can just remove all of that anyways.
Can put those nice collapse comments around all of this. Makes source a lot nicer. Intellij has keybinds for it, but I always forget what they are.
final
- private constructor
not a fan of the name of here, especially since its just a private method and we can change it. like create is good I think.
final
- private constructor
This looks good to me. Confirmed that isSimilar still functions correctly when comparing damaged items.
It did make me go looking for other places ItemStack#getDurability is still used, and there are several which probably should also be reworked at some point, but that doesn't have to be here.
Approving as the concept and implementation seem fine. I don't know if someone else like @Spottedleaf might have a different preferred way to remove the tickers.
I also think the final product should use better param/local names as single letters here can just be super confusing.
If it is easier, maybe creating a simple static function shouldSkip(int tickRate, int hashCode) could also help clean up those pesky if statements without requiring too much work.
It's probably fine for now. I will probably end up changing it to something custom wrapper type during one of my periodic config cleanup PRs.
Looks good.
This pr adds the 2nd and 3rd blockstates which have their own tick rates (along with mob spawners). Depending on how many more are useful to add, might be nice to have some sort of way to set the random tick rate of any blockstate, but that can happen later if needed (and if its a good idea at all)
I don't know if someone else like Spottedleaf might have a different preferred way to remove the tickers.
Another way that I thought that it could be optimized even further beyond is if you System.arraycopy instead of a[j++] = a[i]; for each element that is not in the list. This way, indexes that are far apart (example: index 100 and 8000) could avoid the looping thru all the elements just to get from index 100 to 8000.
So, using our example: The search starts at index 100, then t...
[Paper] Branch feature/lifecycle-event-system was force-pushed to `852bbff`
d50c979 call predicate and method renames - Machine-Maker
I like this idea, pretty much version catalogs but without the codegen stuff, so all the same advantages but no real disadvantages (other than lost type safety which seems fine)
Is your feature request related to a problem?
When Mojang first added the copper bublb, it had a 1-tick delay. This was a pretty big deal for Redstone, because Redstone usually runs at even game ticks so this would allow for events to occur at odd game ticks.
Describe the solution you'd like.
Patch the copper bulb so it has a 1-tick delay. AFAIK this is only server side, so it should be patchable by Paper. Please correct me if Iโm wrong.
Describe alternatives you've considered...
I don't think this falls into the scope of paper, not even with a config option.
- I get the want for this, so I'm not 100% against it, but, configurably diverging from vanilla behavior gets to be a bit weird
- Most server modding environments generally take the same general stance of: not our motif.
But what about a configuration option? Would that cause any problems if itโs off by default?
The question is less, can a config option be implemented that's does this (it certainly could, off by default etc) it's more a, does paper want to offer config options that change vanilla behaviour just for the sake of changing it.
Existing config options are either bug fixes, performance improvements or sanitisers for data.
This would not have any motivation beyond "I don't like mojangs decision", which (while maybe reasonable) is not something we have done yet.
Imo it is also not somethin...
Hm, understandable, but Iโm pretty sure that there arenโt many people who wouldnโt like this change.
This PR is mostly for "hey maybe there is a better solution for this", since I don't expect this PR to be accepted since it is mostly a hacky hack that probably has concurrency issues (accessing hasScheduledAtLeastOneTask outside of a synchronized block) and probably has a better solution.
Folia's EntityScheduler executeTick loop in MinecraftServer's tickChildren is slooooow if you have a lot of entities (example: for a server with 15k entities, it uses ~1.7ms every tick, even if n...
Closing, see above reasons. We do not really divert vanilla behavior for things like this.
I'd maybe call this awaitingFirstTask = true
This is an alternate implementation of #9984, based on the patch that I'm running on my server. https://github.com/SparklyPower/SparklyPaper/blob/ver/1.20.2/patches/server/0010-Skip-EntityScheduler-s-executeTick-checks-if-there-i.patch
In my opinion this PR is better than other PR because it is cleaner and better, but it is more complex than the other one. I haven't tested on Folia tho to see if there is any concurrency issues BUT I think there wouldn't be any, all checks are made within t...
Rebased the PR on master (as of 11/19/2023). Messed up the first rebase, this is why the commits look a little messed up
Also tested using several solutions, hopefully this is enough to finally merge this!

The first banner was created using https://www.spigotmc.org/resources/itemedit-1-8-x-1-20-x.40993/
The second banner was created using <https://www.spigotmc.org/resour...
I have made another PR that also solves the same issue, but that one is based off the patch I mentioned in this PR's description: #9985
I decided to open a new PR instead of editing this one because I think both approaches are nice:
- This one requires less changes, but if a EntityScheduler has been used at least once, then the scheduler will continue being ticked until retired.
- The other one requires more changes, but is cleaner and better overall.
This needs to be the NMS entity to avoid issues with the CB entity being mapped to by multiple NMS entities.
Inappropriate formatting, when accessing field variables you must use the this qualifier
Inappropriate formatting, when accessing field variables you must use the this qualifier to clearly indicate the access is for a field
Inappropriate formatting, when accessing field variables you must use the this qualifier to clearly indicate the access is for a field
Expected behavior
(Paper version #246)
In version #246, plugins were able to obtain PlayerUUIDs, even when the player is Offline (BungeeCord or Waterfall.) This was crucial for plugins to perform tasks like displaying Playerheads or generating Playerdatas.
Observed/Actual behavior
(since Paper version #247+)
However, starting from version #247, plugins are no longer able to retrieve the real UUIDs, and instead, fake UUIDs are generated when the Player is Offline. Especially in...
Updated the patch to change the variable names to be more descriptive and easy to understand
Is your feature request related to a problem?
A not-uncommon problem with certain types of plugins, especially ones which mirror chat to other platforms i.e. Discord, is that..."special" plugins will handle events improperly, cancelling events and mimicking their behavior instead of allowing Paper to handle it. This causes problems for the consuming plugins, since as far as they're concerned, the event was cancelled and thus should be ignored.
The dumplisteners command helps tremendou...
This patch adds new Chunk events that are called during the chunks' serialization/generation process.
Yes, there is a ChunkLoad or ChunkUnload event. However, they are called sync.
These proposed events are called during the process. They are primarily used to manipulate the persistent data container of the chunk to offramp saving/loading tasks made by custom plugins to the paper chunk loader threads system.
You may ask: Why not just store data in the persistent data container of the c...
Please do not open pull requests from the master branch, create a new branch instead.
This patch adds new Chunk events that are called during the serialization / generation process of chunks.
The use case of such events is that heavy saving/loading tasks from cache to the chunk nbt container or vice versa are executed asynchronously as well but in the same thread.
It also happens in single player, you just need to click fast enough.
You can map the right mouse button to Space and then hold Space for super fast clicks.
https://github.com/PaperMC/Paper/assets/61594596/46d7d470-1853-4092-8a9b-4cc162aca4a3
I like the principal here, and think that yes it would be very useful to be able to hook onto the chunk loading async in order to add your own data. However, the issue I see here is the PDC really thread safe here? We may need to offer some sort of alternate implementation to ensure that it is safely mutable async. Unsure though, since if the chunk loading is blocked until the async event completion is done theoretically it shouldn't have any duel-thread mutations?
Closing this as the issue generally was improved by the change to the ansi serializer nor has this issue been active.
This patch adds new Chunk events that are called during the serialization / generation process of chunks.
A problem some developers may face while using the ChunkLoad or ChunkUnload events is the fact that they are called synchronously.
These proposed events are called during the process.
The use case of such events is that heavy saving / loading tasks from cache to the chunk nbt container or vice versa are executed asynchronously aswell but in the same thread
that saves / loads / gener...
CustomModelChoice is used to create recipes that not only compare for materials but also CustomModelData.
Using the ExactChoice alternative is not a good idea since items can have different lores or attributes.
This is a great way to implement recipes with the new possibilities of Minecraft custom items.
Why is this in another package? Also looks like the exact same methods are in CraftEventFactory?
+ } else { // Paper end - Adding CustomModelChoice to bukkit recipes
+ }
+
+ public static int getCustomModelData(net.minecraft.world.item.ItemStack stack){
+ } else { // Paper end - Adding CustomModelChoice to bukkit recipes
+ if (!stackToCheck.getType().equals(material)) return false;
Oh I thought I removed it. This was a patch from a private fork.
This feels rather arbitrary IMO.
Preferably we just match specific nbt tags.
Custom model data feels somewhat randomly selected from the plethora of ways plugin developers can identify custom items. Given the fact that custom model data is not even the preferred way of identifying custom items (the PDC is) I am really not sure if I like a slapped on server side recipe choice that makes use of the custom model data value.
The fact that mojang does not support nbt matching recipes has be...
This feels rather arbitrary IMO. Preferably we just match specific nbt tags.
Custom model data feels somewhat randomly selected from the plethora of ways plugin developers can identify custom items. Given the fact that custom model data is not even the preferred way of identifying custom items (the PDC is) I am really not sure if I like a slapped on server side recipe choice that makes use of the custom model data value.
The fact that mojang does not support nbt matching recip...
What do you mean the *rest" of the PDC ? CustomModelData isn't in the pdc. I 100% get what you are going for here. I am not saying it would be useless.
I am more arguing that this change picks an arbitrary way to identify a custom item and promotes it to the API with a recipe choice when plenty of other ways exist.
It's in a way fixing a symptom of a way deeper issue, Mojang not permitting recipe ingredients via compound tag.
If I am identifying my custom items via a pdc tag, e.g. I have a...
What do you mean the *rest" of the PDC ? CustomModelData isn't in the pdc. I 100% get what you are going for here. I am not saying it would be useless.
I am more arguing that this change picks an arbitrary way to identify a custom item and promotes it to the API with a recipe choice when plenty of other ways exist.
It's in a way fixing a symptom of a way deeper issue, Mojang not permitting recipe ingredients via compound tag.
If I am identifying my custom items via a pd...
Yea pretty much. A "here is this compound tag of nbt, only compare the inputs values if the provided tag even has that value" recipe choice would be nice but rn I am unsure if we have nice enough API to model that kind of item nbt
I presume whenever the properties API makes it in, that might be nicer.
Do you know if this works with shapeless recipes? My initial guess is that it does not.
Apparently opened another PR that makes this change... idk how I ended up opening 2 prs separated by 6 months that fix the same problem, but whatever. Was done in https://github.com/PaperMC/Paper/pull/9411
Rebased for 1.20.2. Updated to replace an existing patch that improved vanilla permission level checking.
Thank you very much for your contribution here, but I will be closing this due to inactivity. Please however feel free to leave a comment if you are interested in picking this back up and it can be reopened... ๐
Superseded by https://github.com/PaperMC/Paper/pull/8660, thank you regardless for your contribution. ๐
Closing, in general, see the listed comment above. I do not want to so strictly break previous behavior because it's expected that this event reset the velocity of the player when canceled, and using this new rotation logic for the move event breaks this.
Do you know if this works with shapeless recipes? My initial guess is that it does not. The initial implementation of ExactChoice also did not work with shapeless recipes which upstream just decided to ignore putting in the javadoc that it didn't work with them. I don't really want to go back to that adding more RecipeChoice that doesn't work in all recipes.
Ive been using this implementation for quite a while now but I am willing to do a full testing session to make clear it works on ev...
I agree with @Owen1212055. We can just remove the check. No such check exists for the fire call.
Do you know if this works with shapeless recipes? My initial guess is that it does not. The initial implementation of ExactChoice also did not work with shapeless recipes which upstream just decided to ignore putting in the javadoc that it didn't work with them. I don't really want to go back to that adding more RecipeChoice that doesn't work in all recipes.
Is there a specific reason why we are still using StackingContents and RecipePicker instead of building a whole new system? I was t...
The nature of ExactChoice being flawed is more an issue with how bukkit represents itemstacks and would generally stand a chance of being fixed once we get the property API
Replacing entire vanilla systems generally needs a strong reason when plugins have been delivering this within their own code for years now, especially given the expectations that we'd be expected to maintain it, while mojang is working on stuff which would generally make the custom model data irrelevant for a good chunk ...
The nature of ExactChoice being flawed is more an issue with how bukkit represents itemstacks and would generally stand a chance of being fixed once we get the property API Replacing entire vanilla systems generally needs a strong reason when plugins have been delivering this within their own code for years now, especially given the expectations that we'd be expected to maintain it, while mojang is working on stuff which would generally make the custom model data irrelevant for a good chunk...
after thinking about it for some time i think instead of adding the isReloading API i should just add an internal boolean called isReloadingPlugins. and then move the check from the initServer method into the last if statement of the CraftServer#enablePlugins.
honestly i think just removing the shutdown here is best. maybe logging that there was an attempt to disable the plugin or making the method return a boolean depending on if the plugin was disabled succesfully
Updates documentation in EntityEquopment.java to reflect behavior mentioned in issue #9867
If these are all methods from upstream, it should probably be inside of the upstream javadoc fixes patch rather than its own
Short explanation:
We were deciding between two approaches. After talking to @Machine-Maker who has helped us by providing guidance we either wanted to enforce the dropChance in the setDropChance method within the interval of [0.0, 1.0] and create a separate method that sets a guaranteed drop chance to 2.0 (following Mojang's approach when doing so) or merely updating the docs.
However, after comparing both approaches, we have decided to simply update the docs as we deemed it uneccessar...
So I know I said to name it this for static imports... but I feel like I changed my own mind. We don't do that anywhere else in the API really for static factory-type methods. Do we want to here? Its just kinda long instead of .create or something.
I like create or of better as well
The unit should be said somewhere
This message should say which method use instead like in the error thrown below. Same for the other methods
This interface has been renamed to SuspiciousEffectEntry
This semicolon is not needed
This is kinda a duplicate with getAmount() ?
I'm not sure about the use case of this method, people just have to divide the amount by 9 instead? Otherwise the doc should be clear that this is the height on only one block and not in blocks that might be confusing.
This is not completely resolved the parameter still say location
Looks good. Can be moved into the upstream javadocs fixes patch either by the author or the merger.
9993eb9 Updates documentation in EntityEquipment.java (... - waterlily1
While true, I don't like assuming this over code that can change or be extended at any time and possibly go by unnoticed, and adding the extra check isn't expensive, same for a bounds check
Not related to the changes, but the patch should be renamed to say block entities instead of TE/tile entities
This should get docs as to when the chunk is null or not null
Especially in this class it's going to be ugly, but please remove the added imports and instead fully qualify them when used in code to reduce diff
Uppercase name for static final fields
Expected behavior
It should be allowed to add AttributeModifiers with same UUID into ItemMeta as long as they have different Attribute types, which is the vanilla behavior.
Observed/Actual behavior
ItemMeta#addAttributeModifier wrongly throws an IllegalArgumentException on adding such an AttributeModifier.
Steps/models to reproduce
ItemStack item = ;
item.editMeta((meta) -> {
AttributeModifier modifier = new AttributeModifier(UUID.randomUUID(), "Example", 69420...
2184fbc Log correct recipes and advancement count on se... - Machine-Maker
Can you provide some basic replication steps here in regards to what code fails to retrieve an offline player's uuid ?
8bda1f7 Remove unnecessary durability check in ItemStac... - MrPowerGamerBR
977a729 [ci skip] Correct Windows requiring path to gra... - notTamion
678467c [ci skip] Add mention of FQ imports - Machine-Maker
[PaperMC/Paper] New branch created: chore/update-contrib
I'm sure bug reports will tell us whether Owen broke everything again
Looking over this patch, I wonder if a reverse approach would be faster.
Given we have a sorted list of indices to remove from the list we would be able to do determine a set of "ranges" of elements to be kept.
E.g. with toRemove = [0, 3, 5] and a list of [a, b, c, d, e, f, g] we can immediately conclude that items 1 and 2 have to be moved by one index to the left, leading to [b, c, c, d, e, f, g]. We can also conclude item 4 has to be moved to the left by two indices, leading...
3766afa [ci skip] Add mention of FQ imports (#9994) - Machine-Maker
[PaperMC/Paper] branch deleted: chore/update-contrib
Don't forget the flower pot
Fixes the issue. Tested with the linked issue's reproduction steps
40872ec Fix CraftMetaItem#addAttributeModifier duplicat... - hyper1423
ffa4115 Configurable Dry and Wet Farmland Tick Rates (#... - MrPowerGamerBR
I did it that way to copy more exactly what was done above since its copied directly from there. I think, for that reason, its fine to leave as is
37bee09 Restore vanilla entity drops behavior (#7650) - Machine-Maker
Are you planning on addressing the comments ?
Otherwise I can look into taking over the PR and completing it for you.
Machine and I discussed this yesterday but wouldn't it make sense to "merge" backoffTicks with tickDelay ?
The tickDelay variable does pretty much the exact same.
We'd save ourself a field here by this.tickDelay = Math.max(this.tickDelay, event.getBackoffTicks()) instead.
Passing the current backoff ticks to the event seems, in retrospective, kind of useless ? given the event is only called when those reach 0, I don't think there is much value here.
3 days ago I posted a pull request #9991 about adding CustomModelChoice. However, we came to the conclusion that we need a more generalized approach.
As a result, I began working on what is called PredicateChoice.
To make it work the StackedContents logic had to be edited.
In the ExtraContentsMap we don't store the exact ingredient items of every recipe ingredient. Instead, whenever we account a new stack in StackedContents logic we compare it to the provided predicates and store them as "...
I created a second pull request regarding PredicateChoice API. Let me know your thoughts #9996
Is your feature request related to a problem?
Giant's AI was removed long time ago.
Purpur's Giant AI patch helps to adding giants as hostile mobs in the game.
Paper should have it either. Just a little gameplay feature that is small and harmless.
Describe the solution you'd like.
This can be option and disabled as default to fit vanilla gameplay.
Like this,
- paper-world-de...
Missing all sorts of // Paper comments, but that's not a big deal.
Overall, this works with my initial testing. I haven't yet done any spark profiles yet to see if the performance is significantly worse or anything.
My main concern with this is the unnecessary replacement of MaterialChoice and ExactChoice. We should just be able to add a 3rd (PredicateChoice) to that lineup without needing to replace the others.
Asking a non rhetorical question, does this violate the clone method contract? (reusing the predicate instance)
No public records exposed to the API. PredicateChoice should be an interface with static factory methods to create new instances of it that take recipe book examples and a Predicate<ItemStack>. Make the interface sealed that only permits the package-private record to implement it.
Should already be in the map right? I think it should throw if its not (or leave this, and don't pre-populate in the initialize method)
