#paper
1 messages ยท Page 19 of 1
In regards to this, is there a point in us just resending the block?
Usage of this event would always be with "ephemeral" signs.
Leaving this up to plugin developers feels pretty meh.
While this does end up with potential latency issues, the real cooldown is tracked and authoritative to the server.
A cooldown off by one imo is better than a cooldown of by n.
ad74b67 Fix client visual desync if cooldown events are... - Doc94
The return type shouldn't be Set. The contents are mutable objects which can break set invariants. The type shouldn't be List either because the order and random access shouldn't be used, so I think Collection is the best option.
The implementation type to the Collection returned can just be a list.
As a wise man said above
Right, I forget the API is dumb.
Applied the requested changes
Applied the requested changes
javadocs still say "set"
iirc it should now inherit from offline player?
50c2c59 Fix unstable Suggestion comparison by sorting i... - emilyy-dev
3709150 Expose all possible block data states (#11958) - masmc05
5e23d28 Remove entity tag selector tag completion fix (... - Machine-Maker
For now, the event won't allow for breaking the itemstack, mostly because doing so is down the line upkeep to ensure no caller expects the item to remain.
If people end up requesting this specific feature, we can revisit this and potentially enable this, but util we have requests it isn't worth the upkeep.
ab1b312 Call PlayerItemDamageEvent for tridents (#11899) - notTamion
Im not sure if you close discussions after merging PRs but this can be closed due to #11914.
Discussion Category: Ideas
GH wont allow me to attach but heres the contents:
This is the global configuration file for Paper.
As you can see, there's a lot to configure. Some options may impact gameplay, so use
with caution, and make sure you know what each option does before configuring.
If you need help with the configuration or have any questions related to Paper,
join us in our Discord or check the docs page.
The world configuration options have been moved inside
their respective world folder. The files are named paper-world.yml
Docs: https://docs.papermc.io/
Discord: https://discord.gg/papermc
Website: https://papermc.io/
_version: 29
anticheat:
obfuscation:
items:
all-models:
also-obfuscate: []
dont-obfuscate:
- minecraft:lodestone_tracker
sanitize-count: true
enable-item-obfuscation: false
model-overrides:
minecraft:elytra:
also-obfuscate: []
dont-obfuscate:
- minecraft:damage
...
in the future, you can also use a pastebin like https://pastes.dev
got it ok sorry. anything else you need from me on this ?
I also pondered about doing it that way, but at the end I thought the event should just report back that the player tried to edit a sign and minimize other side effects.
I mean, it's unchecked, and so I generally expect it to be a lot more 'dumb' in terms of how it interacts. I feel that such low level events are always going to be kinda meh
Hi, sorry, @auserthatlovespapermc is my second account for mini projects, I used an Apex Hosting Minecraft server with the experimental build to do this. I just switched to stable and it seemed to have fixed it.
Apologies for not being that helpful but life got in the way lmao.
Fixed in 5e23d28ad280b2955002a159b4f4235e2f326184
I suggested another approach in the related issue, where we keep the original command in the node, so that the equality of the fake node matches the original node (and other copies thereof). I'm not sure what side-effects this has, however, since it seems like the command field is intentionally wiped
Yea we are presumably going to opt towards that approach down the line to avoid the tree reduction from failing as hard as it has been :+1: The approach here worked well enough, it was only ever exposed as an issue cause once a couple of other bugs were fixed as well.
Spark Profile
https://spark.lucko.me/ECksyrJVyu
Description of issue
Hello,
I am facing very high ping in my server (Like 5000 - 800 MS). I am using 1.20.6 version paper. Also, there is no any tangible warn or error in my console.
Can u help me?
Plugin and Datapack List
Server config files
https://mclo.gs/R3nSaIk - bukkit.yml
https://mclo.gs/c9Cvb0f - spigot.yml
https://mclo.gs/FaMxDVg - paper-global.yml
https://mclo.gs/72aC9ls - paper-world-defaults.yml
https://mclo.gs/iGbepj8 - server.properties.yml
Paper version
This server is running Paper version 1.20.6-151-ver/1.20.6@a4f0f5c (2024-10-30T19:13:22Z) (Implementing API version 1.20.6-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.20.6-149-6e71f41 (MC: 1.20.6)
Other
No response
1.20.6 is no longer supported.
Strongly agree with undeprecating this, EntityRemoveEvent is the only event that can detect when an entity (i.e an item entity) dies in the void.
Spark Profile
https://spark.lucko.me/1So4QkjtYe
Description of issue
I was having problems on a server with Datapacks and Plugins, I started removing plugins and then datapacks to the point of having nothing.
In Spark I can see that "LockSupport.parkNanos()" and "Unsafe.park()" make my server sometimes send problems of:
"Can't keep up is the server overloaded running 11038ms" every 5min approx.
Plugin and Datapack List
N/A
Server config files
[mclo.gs](https://mclo.gs/JskKGsH)
Paper version
1.21.4-106-main@ab1b312
Other
No response
Your server is waiting for the next tick to start.
In Spark you can also see that Non Heap is full, should I change something in the startup parameters to solve this as well?
Your server is waiting for the next tick to start.
This happens every time regardless of when I run spark
Github issues isn't the place to get support. You should join the Discord and use the paper-help channel.
See comment above, this isn't a bug ๐
just fyi still happening with build 107
I cannot reproduce this on a fresh environment.
clone the parameter to it can't be changed later
clone (cause mutable and we have a setter)
a clone for you, and a clone for you, clones for everyone!
make it an unmodifiable view so you can't mutate the list, we have a setter.
what i noticed is that the piece of paper has the same 9 component data on single player vs multiplayer, but the texture does not render in multiplayer. videos attached are named for the testing, and Ive included the sample resource pack that im testing with.
command ran on server:
/minecraft:give @p minecraft:paper[custom_model_data={strings:["bandana1"]}]
command ran in single player:
/give @p minecraft:paper[custom_model_data={strings:["bandana1"]}]
https://drive.google.com/drive/folders/1O3ouiBDAJz2wUisbfom9wLgFzB-RfyvW?usp=sharing
video files were too large to attach - please see drive link
Can you sanity check this without mods and other resource packs installed?
E.g. a vanilla client without resource packs like vanilla tweaks etc.
The file comes from https://github.com/Tuinity/Moonrise.
Changes would be PRed there.
Please refrain from simple cleanup PRs :+1:
We have plans to properly cleanup the repo down the line, but that is left to the team.
Plus you randomly included submodules?
Well I would not mind it if this event was low level on purely client side signs.
But the fact that this is also called for actual in-world signs makes this pretty annoying/easy to fuck up potentially leaving normal signs out of sync.
Could potentially have some cancel overload that allows passing some RESEND flag?
Expected behavior
When zombie-villager-infection-chance is set to 100.0, it should be impossible for a zombie to kill a villager.
Observed/Actual behavior
A villager was killed by a zombie.
Steps/models to reproduce
Set zombie-villager-infection-chance is set to 100.0 on a difficulty other than hard (easy or normal), spawn a villager and a zombie a few times, and in some cases the villager will be killed instead of being infected.
Plugin and Datapack List
> plugins
[15:49:17 INFO]: Server Plugins (2):
[15:49:17 INFO]: Bukkit Plugins:
[15:49:17 INFO]: - floodgate, Geyser-Spigot
> datapack list
[15:49:14 INFO]: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
[15:49:14 INFO]: There are no more data packs available
Paper version
> version
[15:49:07 INFO]: This server is running Paper version 1.21.4-106-main@ab1b312 (2025-01-12T23:38:01Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You ar...
eeec611 Fix zombie villager infection chance hunk (#11974) - lynxplay
Can replicate but the suggested change can't work directly otherwise getGoal will always return null since it will fetch from the wrong key (minecraft:wrapped)
As far as I know, it was an unnecessary rule enforced by spigot.
I don't think JDs are inherited by default?
oh, no, nvm, they are, ineritDoc is for additive
https://drive.google.com/file/d/1ueM5LtbQUmtaW3aodVAX64Kk0-KeILof/view?usp=sharing
Sanity Check as requested. First part is single player then I go to the same testing server - which before this video I updated to 1.21.4-111 with the same result
This also fix Player#getRespawnLocation that consume the respawn anchor in the nether if binded
209e5f8 Readd dropped hunk for ender dragon fight data ... - lynxplay
Can replicate but the suggested change can't work directly otherwise getGoal will always return null since it will fetch from the wrong key (minecraft:wrapped)
I did a test changing it (stupid me didn't keep my changes), but basically I think what I did is within the PaperVanillaGoal class, when getting the key from the Goal, I just checked if it as instance of wrapped goal, grabbed the inner goal to get the key from that.
I'll look into maybe doing a PR soon, and doing a bunch of testing.
Hmm it's possibly a worked as intended if those methods shouldn't be called by the consumer (just callback) and they follow vanilla there, the goal will just first check canUse and then canContinueUse and the game will call stop on the goal itself without your help.
what's with all these "dropped hunks" what is that, and why are they causing bugs?
what's with all these "dropped hunks" what is that, and why are they causing bugs?
Just code that was accidentally skipped when the patches were manually reapplied in the hard fork process
what's with all these "dropped hunks" what is that, and why are they causing bugs?
Just code that was accidentally skipped when the patches were manually reapplied in the hard fork process
Edit: Kinda also was mentioned by paper devs that such dropped hunks were the reason for such a long experimental period
why not just apply the patches on the code pre hard fork then do a diff with the code + patches post hard fork? Wouldn't this easily show the dropped hunks?
This is more a discussion for discord and not here, but the initial sources changed everywhere with the new decompiler (instead of really outdated spigot's decompiler fork, it uses an up to date one) and other mappings, making most patches incompatibile
Stack trace
entity.teleport(location, TeleportFlag.Relative.PITCH, TeleportFlag.Relative.YAW);
java.lang.IllegalArgumentException: duplicate element: VELOCITY_ROTATION
at java.base/java.util.ImmutableCollections$Set12.<init>(ImmutableCollections.java:798) ~[?:?]
at java.base/java.util.Set.of(Set.java:704) ~[?:?]
at org.bukkit.craftbukkit.entity.CraftEntity.teleport(CraftEntity.java:246) ~[paper-1.21.4.jar:1.21.4-DEV-9f74858]
at org.bukkit.entity.Entity.teleport(Entity.java:143) ~[paper-api-1.21.4-R0.1-SNAPSHOT.jar:?]
...
Compiled against paper api 1.21.1 if that makes a difference
Plugin and Datapack List
Custom plugin teleporting entities with relative flag
Actions to reproduce (if known)
entity.teleport(location, TeleportFlag.Relative.PITCH, TeleportFlag.Relative.YAW);
Paper version
[02:39:29 INFO]: This server is running Paper version 1.21.4-DEV-main@9f74858 (1970-01-01T00:00:00Z) (Implementing API version 1.2...
[PaperMC/Paper] New branch created: move-generated-src
91d108a Move generated API sources to src/generated/java - jpenilla
b6be7cd [ci skip] Move generated API sources to src/gen... - jpenilla
[PaperMC/Paper] branch deleted: move-generated-src
Is your feature request related to a problem?
The problem is the current component for Instrument is lacking features.
Describe the solution you'd like.
If you look at the Instrument Component you will see it has a few features Paper is missing:
- sound_event/sound definition: Use any sound key
- use_duration: A non-negative float for how long the use duration is.
- range: A non-negative float for the range of the sound.
- description: Text component to use as the instruments description
Describe alternatives you've considered.
Using NMS or NBT to make this happen, but that isn't really a viable option for me.
Other
No response
Even tested this with a server supplied resource pack, I cannot reproduce this.
Other triage members also were not able to reproduce this either.
There is not much we can do here if we cannot replicate this issue.
I guess ensure the pack sent from the server is up to date?
Given I cannot replicate this, I'll be closing the issue.
Obviously sorry for closing this as you obviously experience some issue, but the github bug tracker is not really the place to debug your personal setup.
Can ask around in paper-help on our discord, maybe someone wants to run through some more potential pitfalls.
Exists a PR https://github.com/PaperMC/Paper/pull/11925 but depends in another PR for allow create a instance of MusicInstrument with the values.
cd9d6d6 Allow duplicate relative flags in entity teleport - kennytv
Thoughts on deprecating this method (without overload) altogether?
Player extends OfflinePlayer, and both have different default chunk loading behavior, which is quite confusing (also would be nice to specify the default behavior in respective javadocs).
Expected behavior
Hitting a boat with a fire aspect weapon should not destroy it if the VehcileDestroyEvent is cancelled
Observed/Actual behavior
If you cancel the VehicleDestroyEvent and destroy a boat with a fire aspect weapon, the event will get called but the boat will get destroyed regardless of cancellation
Steps/models to reproduce
- Place a boat
- Get a fire aspect sword
- Always cancel the VehicleDestroyEvent
- Destroy the boat
This doesn't give off any EntityDamageEvent either
Plugin and Datapack List
N/A - tested on plain
Paper version
This server is running Paper version 1.21.1-132-ver/1.21.1@b48403b (2024-11-21T10:14:27Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-DEV-164e116 (MC: 1.21.1)
Other
No response
Expected behavior
A player destroying a boat with a fire aspect weapon should still show the attacker as the player
Observed/Actual behavior
If you destroy a boat with a fire aspect weapon, the e.getAttacker() in the VehicleDestroyEvent is null. This makes it impossible to get the player from this event if they use fire aspect
Steps/models to reproduce
- Destroy boat with fire aspect weapon
- See how the e.getAttacker() is null
Plugin and Datapack List
N/A
Paper version
This server is running Paper version 1.21.1-132-ver/1.21.1@b48403b (2024-11-21T10:14:27Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-DEV-164e116 (MC: 1.21.1)
Other
No response
Expected behavior
If you cancel the PotionSplashEvent, it should prevent putting out fires with water potions
Observed/Actual behavior
Fires are always put out regardless of cancellation
Steps/models to reproduce
- Throw water splash potion (or lingering) at a fire
- Cancel potion splash event
- Fire goes out
Plugin and Datapack List
N/A
Paper version
This server is running Paper version 1.21.1-132-ver/1.21.1@b48403b (2024-11-21T10:14:27Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-DEV-164e116 (MC: 1.21.1)
Other
No response
Fire Aspect call a ignite effect for well apply the fire.. this call EntityCombustEvent/EntityCombustByEntityEvent where the author is send (for the ByEntity) later when damage the entity the "damager" its not passed then when comes to the place where VehicleDestroyEvent is called the damager its not the player....
i dont find a nice way to make the call of damage for fire also know the damager... (or can add a extra field in entity for save the damager in this case and clear when the fire is clear... but still not clean)
1.21.1 its a little old i try in latest and dont see any issue.
We'd either need to put the logic for putting out fires to after the event calls or you can just use the entity change block event instead
Exposed the DamageSource used in the explosion to the event... i feel this can help if consider the damage source can have many behaviours based in how datapacks can use the explode effect.
Using this event to set an arrow fails when the player looks at a block instead of air (it still gets called).
I don't find an obvious reason for that.
I'm toying around with the same idea, and what I've noticed is that, if you hold the bow on the off hand, the bow does pull back.
If you listen to PlayerInteractEvent, you'll notice that the hand is called first, then the off hand second, but this DOES NOT happen when pulling the bow in the air, so maybe the server is overriding the use state when the off hand interact is called.
However, for some reason, cancelling the off hand event sadly does not make the main hand bow work... Cancelling the off hand does make the off hand bow not work tho.
Another thing that I have found out: If you slap a
@Override
public void handleUseItemOn(ServerboundUseItemOnPacket packet) {
if (packet.getHand() != InteractionHand.MAIN_HAND)
return;
the bow DOES get pulled when using in the main hand, so theorically it is possible to fix the issue
After debugging, I found out that the issue lies within the this.player.stopUsingItem(); // CraftBukkit - SPIGOT-4706 line in handleUseItemOn, if you remove it, it works fine.
Expected behavior
The displayName of ItemStack should be translated according to the player's locale.
Observed/Actual behavior
It only displays the key. (For example, block.minecraft.diamond_block instead of Diamond Block)
Steps/models to reproduce
@Override
public void onEnable() {
GlobalTranslator globalTranslator = GlobalTranslator.get();
TranslationRegistry translationRegistry = TranslationRegistry.create(Key.key("translationtest", "main"));
translationRegistry.register("abc.myKey", Locale.US, new MessageFormat("This is a test."));
translationRegistry.register("abc.myKey", Locale.GERMAN, new MessageFormat("Dies ist ein Test."));
globalTranslator.addSource(translationRegistry);
TranslatableComponent translatable = Component.translatable("abc.myKey");
getCommand("ttest").setExecutor((sender, command, label, args) -> {
sender.sendMessage(translatable);
Player play...
As far as I can tell, the use of that plugin does not properly handle creative mode. The problem with doing this for items has always been creative mode. When you desync itemstack state between the client and the server, creative mode will override the server's state. Which will essentially remove the "translatable" part and just make the item rendered in whatever client's language for everyone on the server.
As far as I can tell, the use of that plugin does not properly handle creative mode. The problem with doing this for items has always been creative mode. When you desync itemstack state between the client and the server, creative mode will override the server's state. Which will essentially remove the "translatable" part and just make the item rendered in whatever client's language for everyone on the server.
EDIT: I also just realized that the plugin page acknowledges this shortcoming and how it's not easily solvable
This is indeed a sad thing. But does that mean we can't accept an imperfect solution and would rather leave it as it is now
That โimperfect solutionโ is literally โintroduce a mechanism that will
mean that the base game will break your items in a well known use caseโ.
If you want to put your items at risk of being modified by the client using
a plugin, thatโs up to you, but this is just not something we can do inside
of paper by default, and Iโm not sure it would ever make sense to slap this
behind a config due to how oddball destructive it is for a relatively niche
thing, mojang already has a solution for this.
On Fri, 17 Jan 2025 at 06:27, Noy @.***> wrote:
As far as I can tell, the use of that plugin does not properly handle
creative mode. The problem with doing this for items has always been
creative mode. When you desync itemstack state between the client and the
server, creative mode will override the server's state. Which will
essentially remove the "translatable" part and just make the item rendered
in whatever client's language for everyone on the server.
...
That โimperfect solutionโ is literally โintroduce a mechanism that will
mean that the base game will break your items in a well known use caseโ.If you want to put your items at risk of being modified by the client using
a plugin, thatโs up to you, but this is just not something we can do inside
of paper by default, and Iโm not sure it would ever make sense to slap this
behind a config due to how oddball destructive it is for a relatively niche
thing, mojang already has a solution for this.
โฆ
I see. That is very reasonable.
But since you mentioned that "mojang already has a solution for this", does that mean that the issue will be officially fixed in future releases?
Mojangs solution to this is sending a resource pack with the respective translations.
Mojangs solution to this is sending a resource pack with the respective translations.
I see. I will close this issue. By the way, I still feel that mojang's solution is a bit, uh, heavy I think
To add, this is still happening on the latest paper (1.21.4-114-main@cd9d6d6 (2025-01-15T11:21:28Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)):
[13:36:47 WARN]: java.lang.IllegalArgumentException: There is no data holder converter registered to convert from a class net.kyori.adventure.nbt.api.BinaryTagHolderImpl instance to a interface net.kyori.adventure.text.serializer.gson.GsonDataComponentValue (on field minecraft:banner_patterns)
[13:36:47 WARN]: at net.kyori.adventure.text.event.DataComponentValueConverterRegistry.convert(DataComponentValueConverterRegistry.java:90)
[13:36:47 WARN]: at net.kyori.adventure.text.event.HoverEvent$ShowItem.dataComponentsAs(HoverEvent.java:623)
[13:36:47 WARN]: at net.kyori.adventure.text.serializer.gson.ShowItemSerializer.write(ShowItemSerializer.java:151)
[13:36:47 WARN]: at net.kyori.adventure.text.serializer.gson.ShowItemSerializer.write(ShowItemSerializer.java:50)
[13:36:47 WARN]: at com.google.gson.TypeAdapter$1.write(TypeAda...
Expected behavior
The piston should be able to push the block through the world border, or the block should be stopped as if it was pushed against an immovable block.
Observed/Actual behavior
After a block is pushed through the world border it turns into a glitchy moving block. I am unable to interact with the block and after reconnecting the block turns invisible but I can still collide with it.
If you increase the world border size the block will be able to move.
Steps/models to reproduce
Push a block through the world border using a normal piston
Plugin and Datapack List
n/a
Paper version
This server is running Paper version 1.21.4-114-main@cd9d6d6 (2025-01-15T11:21:28Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are 2 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Other
No response
A bit weird to suddenly drop the "get" prefix there
This pr break fire explosion done via world.createExplosion(location, 3, true, false) by filtering empty blocks i guess. Ideally should only affect the event but it's tricky cause block list is mutable
Would be better to cast the Block to CraftBlock and get the underlying the position, same for others
Can just use CraftBlock.at(serverExplosion.level(), cpos) and move the above vars down
Unless im wrong the enchatment call the explode effect not the trigger thing
I base in the originals bukkit events.
Not sure if add or not the get if this list its mutable
Yes but each explode effect can define the type there, here is the wind burst definition:
Then can change the docs for just mention trigger things?
Been a week, given this PR isn't linked to an actual issue and you failed to reply, I'll close this.
Expected behavior
Up to version 1.21.1, EntityDamageByBlockEvent.getDamager() returns the block responsible for the damage dealt as a valid Block object for damage caused by lava. I therefore expected it to work that way in newer versions too, as it's most certainly the expected behavior of this method in this case.
Observed/Actual behavior
On 1.21.3+, EntityDamageByBlockEvent.getDamager() just returns null for damage caused by lava.
Steps/models to reproduce
Here's what I did:
-
Create 2 localhost servers, one with PaperMC 1.21.1 and the other one with PaperMC 1.21.3 (newest builds).
(no changes to those servers except accepting the eula) -
Create a minimalistic plugin to log EntityDamageByBlockEvent.getDamager().
-
Join both servers, grab a bucket of lava and take a bath.
-
Compare console output:
1.21.1:CraftBlock{...}
1.21.3:null
Plugin and Datapack List
Just the minimalistic logging plugin:
public final class GetDamagerTest extend...
Caused by the moonrise patch, patching over CB setting Entity.lastLavaContact in Entity#updateFluidHeightAndDoFluidPushing
Might be worth looking for a better alternative to this field tho (if there is one)
Expected behavior
The trial Spawner requires 2 spawn eggs mob each. I played in the single player world and found that it takes 1 mob egg to activate the spawner. Also, during the test, I deleted the CMI plugin to test my hypothesis and everything remained the same, 2 eggs are still needed.. If possible, please fix it, I will be very grateful.
Observed/Actual behavior
A trial spawner must spend 1 Mob Summoning egg to activate instead of two mob summoning eggs.
Steps/models to reproduce
Plugin and Datapack List
AuthMe, Citizens, CMI, CMILib, DeluxeMenus, Interactions, PL-Hide, PlaceholderAPI, WorldEdit, WorldGuard
Paper version
This server is running Paper version 1.21.4-114-main@cd9d6d6 (2025-01-15T11:21:28Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are 3 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 1.21.4-113-8e80d4e (MC: 1.21.4)
Other
No response
Not tested/properly looked; I was curious and took a peek; we have a fix for https://bugs.mojang.com/browse/MC-273635, which was since patched by Mojang; maybe there is a conflict there?
Yes there is, the patch should be dropped
This pr break fire explosion done via world.createExplosion(location, 3, true, false) by filtering empty blocks i guess. Ideally should only affect the event but it's tricky cause block list is mutable
not sure how handle this.. i mean still being the "normal" behaviour with or not this PR i think...
Expected behavior
When I want to read the class package it does not give the information correctly and it is impossible to know the version, example:
public static String getBukkitVersion() {
String[] v = Bukkit.getServer().getClass().getPackage().getName().replace(".", ",").split(",")[3].split("-")[0].split("_");
return v[0].replace("v", "") + "." + v[1];
}
example error in plugin:
09:11:53 ERROR]: Error occurred while enabling PsABF v2.0.92 (Is it up to date?)
java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3
at PsABF.jar/me.PsABF.pb.Main.getBukkitVersion(Main.java:58) ~[PsABF.jar:?]
at PsABF.jar/me.PsABF.pb.Main.onEnable(Main.java:66) ~[PsABF.jar:?]
Observed/Actual behavior
public static String getBukkitVersion() {
String[] v = Bukkit.getServer().getClass().getPackage().getName().replace(".", ",").split(",")[3].split("-")[0].split("_");
return v[0].replace("v", "") + "." + v[1];
}
exa...
This has not been possible anymore for a while since the cb package names no longer contain the version, see [this announcement on discord](#dev-announcements message) from a year ago for what you can use instead.
This is false! I'm doing it from spigot without any problem but not from paper. I have it working without any problems without PAPER so it's not true. Regards
This has not been possible anymore for a while since the cb package names no longer contain the version, see [this announcement on discord](#dev-announcements message) from a year ago for what you can use instead.
This is false! I'm doing it from spigot without any problem but not from paper. I have it working without any problems without PAPER so it's not true. Regards
Please read https://forums.papermc.io/threads/important-dev-psa-future-removal-of-cb-package-relocation.1106/ or the linked Discord announcement. You're depending on a user-hostile implementation detail that we removed, but the posts detail how you can keep your plugin working still
73f7736 Drop patch for MC-273635 fixed in MC 1.21.4 (#1... - Doc94
This can be closed by https://github.com/PaperMC/Paper/commit/73f7736eb93a64cc0270929cb01992404696d66d
i not use correctly the word fix for link this issue for auto-close
What i mean generally is that you can cleanup a bit the old code when you copy things from the old events. In this case i1 can just be named i and Block is already imported so no need to have a FQN there (but that point applies to all your types in this class since it doesn't end up in a patch)
Still applies for the old events you moved
Still applies for the new event
With your PR that fire explosion doesn't spread fire on the ground which is an unintended side effect
I have updated the javadoc, not sure for the deprecation, i kinda expect offline player data to be less accurate than online by default. What i think is confusing is the fact that an online player extends an offline player in the api.
ohhh okay i make the changes than the other place...
Expected behavior
setNoDamageTicks should make a given player invulnerable for the given amount of ticks
Observed/Actual behavior
They still take damage (in my case from explosions)
Steps/models to reproduce
player.setNoDamageTicks
world.createExplosion next to the player
they die from explosion damage
Plugin and Datapack List
N/A
Paper version
This server is running Paper version 1.21.4-DEV-main@a35cfe9 (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are 1 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 1.21.4-DEV-cd9d6d6 (MC: 1.21.4)
Other
No response
perhaps this is relevant:
if (this.invulnerableTime > (float) this.invulnerableDuration / 2.0F && !damageSource.is(DamageTypeTags.BYPASSES_COOLDOWN)) { // CraftBukkit - restore use of maxNoDamageTicks
BYPASSES_COOLDOWN isn't a real damage type tag in 1.21.4
So, this is a rather weird mechanic.
Previously, minecraft players had a spawn invulnerability which would behave like you described above (negate all damage).
setNoDamageTicks on players specifically would set the entities invul timer and the spawn invuln timer.
That is now gone in 1.21.4, changed by mojang. Players will take damage the second they load into the world.
The player setter hence cannot set that, and now players behave like any other entity in this regard, which is
"you are only invulnerable to damage sources that deal less damage than the damage that initially caused your invul", which in case of setNoDamageTicks is 0, so everything just damages.
This can obviously be fixed, but it feels pretty hacky and isn't a mechanic we really would wanna maintain I don't think?
Especially when better, event driven mechanics approaches exist to prevent damage on players.
With your PR that fire explosion doesn't spread fire on the ground which is an unintended side effect
i see the issue... not sure when i broke maybe the change from getType.isAir to isEmpty... i make a change for allow the empty things for the fire and looks is working. if its not a good "fix" can just revert the thing for the empty check
also i remove the shuffle in the KEEP behaviour because just make changes not related to the vanilla behaviour...
setNoDamageTicks
Can we not just set the initial cause damage to Int.maxvalue inside setNoDamageTicks to fix it?
Yea we could but there is already a method for this and it would mess with the API getters on the last damage.
So the API was relying on internal behaviour that has been removed, at which point the usual way to go would be deprecation and then removal of the method, but in this case only the player-speciifc side effect was removed, which makes this a rather ugly case as we don't have a clear migration path for this.
In my honest opinion, this should just be implemented via EntityDamageEvent cancellation (that code would work backwards as well, no one is loosing anything there), but I'll leave it open for others.
Maybe just mark that for player like Obsolete, i think better that than mess in reimplement
This has been discussed many times over the years, and generally, the command is already gated by default, and people are well aware of the implications or just don't care. The diff here is also pointlessly noisy for what it's doing, and would generally not be a feature patch for a thing we add.
What i think is confusing is the fact that an online player extends an offline player in the api.
Yes, that was my concern. Technically, you can have OfflinePlayer object representing an online Player instance (#getOfflinePlayer too returns online player if present), so you may call the method on an offline player expecting not to load chunks, but they will load due to the object being an online player.
New devs might stumble upon this quirk and will have to account for it. Deprecation would require to explicitly specify the wanted behavior, but I don't have a strong feeling against leaving this as is.
Caused by the moonrise patch, patching over CB setting Entity.lastLavaContact in Entity#updateFluidHeightAndDoFluidPushing
Might be worth looking for a better alternative to this field tho (if there is one)
hmmm a little hard its not valid just re add the set of that field in the updateFluidHeightAndDoFluidPushing?
now.. im not good with the large feature touchs... im not sure if this is the better way for handle the add again that CB patch.. or if is better fix that in the source file and the moonrise patch just need avoid deleting that...
The issue here is that we don't really want to be implementing this stuff into moonrise directly, as it will just be removed on the next moonrise update
The issue here is that we don't really want to be implementing this stuff into moonrise directly, as it will just be removed on the next moonrise update
then the fix its just modify the file and handle the merge conflict or exists a better way?
cept there will be no merge conflict due to how this stuff is applied, we need MR to add a hook or something so that the changes don't get wiped out on every update
Ok i remake this... just copy the part of updateFluidHeightAndDoFluidPushing where get the last BlockPos for the fluid... and use that for update the BlockPos of lastLavaContact this require keep update that new method but avoid mess with the method touched by moonrise.
Hi @TheLimeGlass, I want to contribute to this issue could you please assign it to me ?
You can just open a PR to it, you don't need to have it assigned. You are free to fix this, but if you don't want to anymore, I'd be glad to take over
Is it solved?
For the sake of avoiding other server owners and developers banging their wall against the head trying to figure out how to do this: I wanted to create a plugin that uses the bow behavior to with a custom bow that does not require arrows (context: created a cue stick model for a bow, and I created a custom plugin to play billiards (more bow force = more ball velocity) without needing any weird hacks like spawning fake arrows in their inventory)
To do this, I needed to create this patch (similar to
this PR's patch but calls before any of the other arrow related events)
Changing the server to say that "hey there's an arrow for your bow!" DOES work if you are aiming at the sky, but does NOT work if you are looking at a block, because the client knows that there isn't an arrow in the inventory, so it ...
Probably off hand also needs to be considired in the remove item method.
This would go against behavior specified in javadocs, as offhand is not in the storage contents, making something like #11994 a breaking change that can lead to dupes in plugins that were expecting the added items in storage
8c8836a Flush regionfiles osave configuration option - Spottedleaf
[PaperMC/Paper] New branch created: test/save-on-flush
~Fixes #11921~ (Closing as won't fix)
After review, it was determined that the proposed solution would break the API contract specified in the Inventory.getStorageContents() javadocs. The off-hand slot is intentionally excluded from storage contents, and addItem() should only work with storage contents as specified.
Instead of modifying addItem(), we should consider adding a new method addItemAnySlot() (similar to the existing removeItemAnySlot()).
So you should rather add a new method like addItemAnySlot (similar to removeItemAnySlot which already exists)?
Why? or this mess with the add logic?
if so then the docs can add the throws for this cases.
Vanilla don't support overstacked items, since we're giving it to vanilla, we can't risk with bugs from possible side effects
And don't think mentioning in the docs is necessary, as many usages (like the new dropItem method) break on overstacked items, they are more supported only when mentioned as supported
this not require the update container like the give command?
No, broadcast changes is triggered anyway every https://docs.papermc.io/paper/reference/world-configuration#tick_rates_container_update ticks, and usually api doesn't manually trigger updates unlike vanilla, letting it be tracked by tick methods
Expected behavior
I would expect that setting the background color of a text display to null would reset it to its default value
like in the picture
Observed/Actual behavior
The background becomes a solid grayish white
Steps/models to reproduce
- Spawn a text display
- set the background color to null
Plugin and Datapack List
irrelevant
Paper version
[18:18:02 INFO]: Checking version, please wait...
[18:18:02 INFO]: This server is running Paper version 1.21.4-118-main@73f7736 (2025-01-18T13:37:35Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-117-a35cfe9 (MC: 1.21.4)
Other
I skipped over the implementation, and the default is not -1 but 1073741824 now
using this code proves it
if (tagOptions.get...
Setting it to null would imply that there is no specific override of this,
so, apply parent derived style?
On Tue, 21 Jan 2025 at 17:27, David @.***> wrote:
Expected behavior
I would expect that setting the background color of a text display to null
would reset it to its default value
like in the picture
image.png (view on web)
https://github.com/user-attachments/assets/f3314dfa-3786-40a1-9d69-801a2eb66ffc
Observed/Actual behaviorThe background becomes a solid grayish white
image.png (view on web)
https://github.com/user-attachments/assets/5c25a3d5-255c-45ec-a7b1-3b99285dc247
Steps/models to reproduce
- Spawn a text display
- set the background color to null
Plugin and Datapack List
irrelevant
Paper version[18:18:02 INFO]: Checking version, please wait...
[18:18:02 INFO]: This server is running Paper version
@.*** (2025-01-18T13:37:35Z) (Implementing API version
1.21.4-R0...
Expected behavior
Taking damage after hitting an entity should not alter sprinting speed. This is the behaviour seen on the vanilla server.
Observed/Actual behavior
The FOV and sprinting speed are reduced when taking damage after hitting an entity during uninterrupted sprinting.
Steps/models to reproduce
- Hold down your sprint key (or, enable toggle sprint)
- Begin running by holding W
- Attack an entity
- Take any form of damage (e.g. fire, fall)
- Observe that FOV and running speed are reduced
Demonstration video: https://youtu.be/MytXWu4hQGc
Plugin and Datapack List
None
Paper version
This server is running Paper version 1.21.4-118-main@73f7736 (2025-01-18T13:37:35Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Other
Enabling paper world config misc.disable-sprint-interruption-on-attack is a workaround to this issue but has other side-effects such as every consecutive hit being registered as a sprin...
Feel free to fix the javadocs of ConsumeEffect#removeEffects if you want too
That change is completely irrelevant, i have already explained the cause of that issue in the original message. It's not only affect your new event but regular ones as well. So i will open a new issue about that (the fix you commited is a workaround). And you broke spigot further with your equivalent commit.
Technically wrong, depends on what the builder targets right?
a consumer to configure the ray trace configuration. The received builder is not valid for use outside of the consumer.
Remove the jetbrains annotations here (and below)
That change is completely irrelevant, i have already explained the cause of that issue in the original message. It's not only affect your new event but regular ones as well. So i will open a new issue about that (the fix you commited is a workaround). And you broke spigot further with your equivalent commit.
Yeah for the not explosion is handled by the keep maybe and how im now calm the event in that place the filter take all... Currently not sure why even need filter that... That block is in the list maybe just send all blocks and if user wanna they can filter that... Based in the first commit.
Or not sure if you have another suggest for this thing
Expected behavior
I expect the fireball to spread fire on the obsidian at the impact like in vanilla.
https://github.com/user-attachments/assets/2540734b-ad1d-4cae-b9fd-7baa33296dee
Observed/Actual behavior
The fire is not spread on the platform.
https://github.com/user-attachments/assets/04ea3d22-afd1-4073-bce1-29e817dba174
Steps/models to reproduce
- Create a new world
- Build an obsidian platform of 3x3 in the air
- Summon a fireball (/summon minecraft:fireball)
- Throw the fireball on the obsidian platform
- Notice if the fire spread on the ground or not
Plugin and Datapack List
None
Paper version
30fdfb1aa173a8362e3a5bf19a4e309341f3ee19
Other
I have discovered this issue while reviewing https://github.com/PaperMC/Paper/pull/11840 which copied the old implementation.
Stack trace
[11:59:03] [Server thread/ERROR]: Attempted Double World add on ItemEntity['Goat Horn'/298549, uuid='aeab8c83-5fdc-43a8-beee-40cae4aee3c5', l='ServerLevel[world]', x=XXXX53.26, y=16.13, z=XXXX17.03, cpos=[XX03, XX32], tl=0, v=true]
java.lang.Throwable: null
at net.minecraft.server.level.ServerLevel.addEntity(ServerLevel.java:1510) ~[paper-1.21.4.jar:1.21.4-DEV-a35cfe9]
at net.minecraft.server.level.ServerLevel.addFreshEntity(ServerLevel.java:1454) ~[paper-1.21.4.jar:1.21.4-DEV-a35cfe9]
at net.minecraft.server.level.ServerLevel.addFreshEntity(ServerLevel.java:1449) ~[paper-1.21.4.jar:1.21.4-DEV-a35cfe9]
at net.minecraft.world.entity.Entity.spawnAtLocation(Entity.java:2803) ~[paper-1.21.4.jar:1.21.4-DEV-a35cfe9]
at net.minecraft.world.entity.animal.goat.Goat.dropHorn(Goat.java:362) ~[paper-1.21.4.jar:1.21.4-DEV-a35cfe9]
at net.minecraft.world.entity.ai.behavior.RamTarget.tick(RamTarget.java:97) ~[paper-1.21.4.jar:1.21.4-DEV-a35cfe9]
at net.minecraft.world.e...
[PaperMC/Paper] New branch created: bugfix/double-goat-horn-addition
3e8b5d6 Only add goat horn once - lynxplay
(Congrats on 12000 ๐ฅณ )
Will be resolved in the linked PR shortly ๐
[PaperMC/Paper] branch deleted: bugfix/double-goat-horn-addition
The yield shouldn't be needed there no blocks explode anyway
Cancelling the event should probably stop the fire too to be consistent with the old events
You don't propagate the cancellation state of the old events to the new one
yeah but not make "damage" keep that.
about resolve https://github.com/PaperMC/Paper/issues/11999 now the filter is gone for allow the event show the same blocks (from positions) used in vanilla and avoid the mess with reduction of the fire.
We can use an import here :+1:
I did not add an import because an other fully qualified import already exists in the file and I didn't want to touch that. Should I remove that aswell?
Just leave the other FQN alone, we will be doing a cleanup of these files soonish once we have checkstyle ready on our repos.
But new code can already follow that :+1:
You can't remove the filter for the old events without updating the javadocs which is kinda a breaking change so not sure but the new one can hold empty blocks fine.
Cancelling the events still spread fire it seems mainly because you removed the filter.
You can't remove the filter for the old events without updating the javadocs which is kinda a breaking change so not sure but the new one can hold empty blocks fine. Cancelling the events still spread fire it seems mainly because you removed the filter.
well already can consider a "breaking" change the thing about how now spigot fire the events for the keep behaviour and paper not (not in that events but yes in the new) but i make the rollback with the patch for the bukkit events.
the fire thing is maybe because just check the cancel for the keep behaviour and not in the main condition.. i move that for cover all calls.
30046e0 Fix a rare crash with a concurrent modification... - AverageGithub
All the types can be imported in this class
Missing space between if and (
An enum set would be better no need to have duplicate there
For builder without targets this will cause a NPE, might be better to make it a requirement
88bbead Flush regionfiles on save configuration option - Spottedleaf
[PaperMC/Paper] branch deleted: test/save-on-flush
I dislike it also, inventory full is a common situation should be catched in the invoke of Inventory#addItem(). Use an event will breaks the functions encapsulation.
Stack trace
Plugin and Datapack List
AdvancedTeleport, BetterChairs, BetterMessages, MiniMOTD, PingDisplay, Plan, ProtocolLib, SeeMore, ViaBackwards, ViaVersion
Actions to reproduce (if known)
No response
Paper version
This server is running Paper version 1.21.4-121-main@88bbead (2025-01-22T20:05:15Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-118-73f7736 (MC: 1.21.4)
Other
I use https://github.com/itzg/docker-minecraft-server and here is my docker compose file:
services:
mc:
image: itzg/minecraft-server
container_name: paper
labels:
- traefik.enable=true
- traefik.http.routers.http-analytics.entryPoints=http
- traefik.http.routers.http-analytics.rule=Host(`analytics.gregtech.eu`)
- traefik.http.middlewares.https_redirect.redirectscheme.scheme=https
- traefik.http.middlewares.https_redirect.redirectscheme.perman...
Looks like a corrupted chunk, and the thing is stuck in a tizzy trying to read it
Looks like a corrupted chunk, and the thing is stuck in a tizzy trying to read it
at 118,161 right?
Also could it perhaps have something to do with this warning I got from LibertyBans, which I just tried to install:
paper | [16:45:13 INFO]: [LibertyBans] Enabling LibertyBans v1.1.0-RC2
paper | [16:45:13 WARN]: [LibertyBans] *******************************************
paper | We have detected bugs on your server which threaten your server's stability.
paper | LibertyBans will continue to operate unaffected, but we strongly suggest you fix these bugs.
paper |
paper | These bugs are (most likely) due to other plugins' mistakes. Each of the following plugins has shaded a library but did not relocate it. You should report each bug to the plugin author.
paper |
paper | Plugin Name | Library Name | Class Detected
paper | ----------------------------------------------
paper | Plugin 'Plan 5.6 build 2959' | Jakarta-Inject | jakarta.inject.Provider
paper |
paper | Note for advanced users: Understanding the consequences, you can minimize this warning by setting the system ...
Looks like a corrupted chunk, and the thing is stuck in a tizzy trying to read it
at 118,161 right?
Yes
Also could it perhaps have something to do with this warning I got from LibertyBans, which I just tried to install:
paper | [16:45:13 INFO]: [LibertyBans] Enabling LibertyBans v1.1.0-RC2 paper | [16:45:13 WARN]: [LibertyBans] ******************************************* paper | We have detected bugs on your server which threaten your server's stability. paper | LibertyBans will continue to operate unaffected, but we strongly suggest you fix these bugs. paper | paper | These bugs are (most likely) due to other plugins' mistakes. Each of the following plugins has shaded a library but did not relocate it. You should report each bug to the plugin author. paper | paper | Plugin Name | Library Name | Class Detected paper | ---------------------------------------------- paper | Plugin 'Plan 5.6 build 2959' | Jakarta-Inject | jakarta....
Since you already reverse the order for the old events, redoing it will make the list inverted compared to the old events. The block list should be consistent across events and ideally the list should remains intact after the events (so not inverted)
I still don't like this workaround, you don't have to fix the issue in this PR, but having an inconsistent block list is even worse for plugins. Can you just revert to the empty check for now?
You can't just return there, you need to clear the moonrise cache too, imo you can just move the check on the fire check below for now, otherwise would need to patch moonrise and add a hook which is annoying since it would only be relevant for paper
I teleported to those coordinates and there was nothing interesting going on there. I can still delete the region files tho.
Then just convert in all cases and not mess with order?
I forget about the moonrise thing (this cuase a mess if try to remove the CB import in the start for migrate to fq..)
Then just move this to fire && !wasCancel?
You can use the util in CraftLocation
The first letter is not consistent with the rest
Curious why you reverted your change from the position?
Hmmm but this make all the events cause that bug... I feel better keep this.
Yes, the alternative is not worth imo and if mojang add more things patch should conflict anyway
Is your feature request related to a problem?
I, like several server authors, am the author of a fantasy RPG server and it has custom heads with unique characteristics, when a head with a custom texture must be held in a certain hand. But as soon as you place a head on any block, all its characteristics are lost.
Describe the solution you'd like.
Good day, dear developers. I would like to offer you a function for switching the installation of player heads on blocks. This is due to the fact that there is no worthy alternative to plugins in prohibiting the placement of heads on blocks. Server administrators could optionally switch whether it is possible to place heads on their servers.
Of course, there are servers in which builders place player heads with custom textures, but there are also servers where player heads are used as runes and custom items with unique attributes like in RPG games. But here's the problem, there are no normal plugins for 1.21.4 that could work w...
I use plugins like: AuthMe, Citizens, CMI, CMILib, DeluxeMenus, Interactions, PL-Hide, PlaceholderAPI, WorldEdit, WorldGuard
I'm not exactly sure what you're asking, but this sounds like "2-minute plugin" territory
Consistency with modify temperature (which needed the world) + that class is experimental + protection against future changes which may make grass color dependent on world, which could be added without lots of breaking changes with Location
Expected behavior
Method call should silently fail
Observed/Actual behavior
ClientboundSetEquipmentPacket is sent anyway
Steps/models to reproduce
invoke Player#sendEquipmentChange with an empty map as slots argument
Plugin and Datapack List
irrelevant
Paper version
[21:30:36 INFO]: Checking version, please wait...
[21:30:36 INFO]: This server is running Paper version 1.21.4-121-main@88bbead (2025-01-22T20:05:15Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-118-73f7736 (MC: 1.21.4)
Other
ClientboundSetEquipmentPacket does not allow for empty slots
We throw on every other illegal arg, not sure if we wouldn't here?
Good question. I'd argue that NMS also just drops the packet if the slots are empty, but either way, I'm fine with an exception.
Expected behavior
Amount for first slot in inventory in InventoryMoveEvent is bugged by Hoppers patch, I would expect the actual amount.
If InventoryMoveEvent is cancelled I wouldn't expect patch code to go rollback inventory or amounts since those could be already removed by other plugins or code... introducing dupes.
Observed/Actual behavior
I think all versions with this patch are affected:
When server is using non-standard move amount for hoppers (ie 2,3,64... whatever but not default 1) and Plugins are modifying amounts or items in InventoryMoveEvent, items could get duped.
This would only work for items in first slot because of bugged patch in question.
After InventoryMoveEvent is fired, amount on slot 1 is rolled back even if InventoryMoveEvent is cancelled. Which shouldn't be the case?
Since InventoryMoveEvent was cancelled...
I just checked why they reverse the order like that, and it's a relic of the past back in 1.2 which doesn't make sense anymore in modern version.
However i'm tired of this PR, so i will take over.
Please provide some reproduction steps/code for this issue
reverted since you are unable to fix it properly and i don't want to spoonfeed
If the corrupt chunk is still there in the region file you can upload it here so it can be looked at
Okay... Sorry for the issues and thanks for the help...
I can't find exactly when this got fixed, but we now check if the connection is still open before going through this logic, which fixes this issue.
336ea9d Check for empty when sending equipment changes ... - HaHaWTH
Expected behavior
right clicking an entity with blocks behind them shouldn't fire playerinteractevent for the block
Observed/Actual behavior
It fires playerinteractevent for the block behind the entity
Steps/models to reproduce
right click a mob with blocks behind them
Plugin and Datapack List
N/A
Paper version
This server is running Paper version 1.21.4-DEV-main@88bbead (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are 1 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 1.21.4-121-88bbead (MC: 1.21.4)
Other
No response
You are gonna have to be more specific about your replication steps. This for example, doesn't fire the PlayerInteractEvent at all. What mob, what blocks, how far, etc?
Closing this as cannot reproduce, me and two others have tried and failed to reproduce it and there's no other data to go off of that shows it's a bug in paper.
Given this isn't a full fix for the linked mojira issue, I'll update the comment.
We should also keep the old check as well as otherwise pistons outside the world border now start pushing things into, being stuck with the same problem.
There is not much interest in adding an event like this at this time
LGTM, thanks!
For any readers of this PR down the line, this is not a fix for the linked MC issue but a band aid fix specifically for the piston attempting to push blocks out of the world border :+1:
ce95b5d Use proper default for setting null display bac... - Warriorrrr
2477f1f [ci skip] fix and improvements for docs in Cons... - Doc94
fb5b173 Add PlayerClientLoadedWorldEvent (#11940) - FlorianMichael
Just a note, this might wanna be a ItemStack first, ItemStack... other, but we decided against that because itwould make interop with getContents() methods that yield ItemStack[] a lot worse so, may people call this without any items I guess xD
To note for tomorrows review/merge, leftovers are scuffed in creative as the method obviously doesn't drop for creative mode players.
This, I'd argue, is perfectly fine tho given this is supposed to be exactly like vanilla.
Generally, the type of interactions that would cause issues with the changes done here, outside of knowing the source stack size, have generally not been an issue given how precarious modifying state in any of these sorts of events is. Removing the clone was pretty important in terms of performance boosting here due to how expensive cloning the items is, especially with how hot this tight loop can get. This is, however, not a huge deal anymore given that item stacks now use immutable data components and the container for that supports a COW, and so, I think that this side-effect is actually mitigatable now
Amount being wrong for item in first slot is known issue, but that's not all.
Source inventory itemstacks simply CAN NOT be modified safely in IMIE, even if item is set in IMIE, IMIE is cancelled or something else.
In theory one could set transfer amount to 64, trying to work around this, then manually implement hopper code to reduce transfer amount do to 1 or whatever.
However this would always be required to run with 1 tick delay which would put redstone stuff out of sync.
@Warriorrrr I can put something together real quick if needed but any code that would try to modify items in source inventory during IMIE would fail if it touches first slot. Doesn't matter if calledSetItem is true, calledGetItem is true or whole IMIE is cancelled.
One would expect that if IMIE is cancelled, I can do whatever I want with source or target inventory, during IMIE.
Maybe it would also make sense that changing Item using setItem() on IMIE would change items that are being transferred? IMIE#ge...
One would expect that if IMIE is cancelled, I can do whatever I want with source or target inventory, during IMIE.
That has pretty much ever been promised from the API, cancelling an event will often run a form of "revert back to the state we saw before this event", as there's no nice way to properly manage what should occur when an event is cancelled outside of reverting the change, and there is generally no state tracking to see if people mess with stuff considered out of scope.
Even the original implementation of this event will wipe out any change you did to the source item inside of the inventory when cancelled. Hopper stuff is also generally a really precarious place due to how tight the logic is there, it makes doing much pretty harsh, especially given the performance complexities
I'm not sure if generic tick event for block entities wouldn't get called too often? In terms of performance?
Cancelling and doing own logic won't work (and ig this isn't promised by api, so ok api would roll it back).
Trying to use setItem() to implement own logic won't work (this should... could work?).
setItem() method on IMIE is not working as intended tho? I mean it's using getItem() from IMIE to add new items to target inventory when item is modified in IMIE right?
Why would it not also consider item from IMIE when removing an item from source inventory?
With that and counts on first slot fixed (that temp manipulation removed) there would no need for another event? Filters, different transfer amounts, etc, could simply be implemented in IMIE? Unless I'm missing something here.
IMIE basically works in this weird area of being before the item is placed into the target inventory, but it does a whole bunch of mutations to achieve that; changing the stack in the event would change the item which is tried to be added into the target inventory.
This event is generally a pretty hot area that nobody really wants to touch due to how precarious the implementation is, only made even more challenging due to the optimisation patch
Is your feature request related to a problem?
I'm currently developing an API allowing recipes with custom items as input, but there isn't any way to do the following:
- Start smelting an item if a condition is met
- Modify the result for the Crafter Block (not only if a valid recipe is given)
Describe the solution you'd like.
For the furnace:
An event triggered every tick, right before the furnace checks if it can smelt the given item.
This event should allow modifying the total cooking time required and provide a method to explicitly indicate whether the item can be smelted.
For the Crafter:
An event that's similar to PrepareItemCraftEvent.
Describe alternatives you've considered.
I tried mixins, but they don't work when only using PaperMC
Other
No response
Expected behavior
As documented, Sittable applies to Animals and since all implementing classes of Sittable share the Animals class it should extend Animals
Observed/Actual behavior
Sittable does not extend any entity class
Steps/models to reproduce
Plugin and Datapack List
Paper version
This server is running Paper version 1.21.4-126-main@fb5b173 (2025-01-25T20:51:32Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-121-88bbead (MC: 1.21.4)
Other
this makes it not possible to use sittable in generic contexts where you expect an instance of entity
Before I open up another feature request,
it'd also be nice for Campfires (Event for when clicked to allow it to place, and also another Event like the one I suggested for the furnace)
You are gonna have to be more specific about your replication steps. This for example, doesn't fire the PlayerInteractEvent at all. What mob, what blocks, how far, etc?
hold a bone in your hand and right click a cow
Welcome to paper :tada:
Thank you for updating the PR. I don'T have time for a indepth review rn, but I left some initial easy nitpicks around comments :+1:
Will get to a review next week probably
No need for paper comments in the API anymore.
Missing - Add PredicateChoice
No more comments, can be properly formatted with the above closing if bracket.
Why not just !exampleStack.isEmpty() ?
Hi and welcome to the Paper PR world (well this more a thing can say a Paper Team Member xd)
The paper comments currently just apply to code in patches, its not required in the api,craftbukkit,paper classes.
I just noticed there is already a PredicateRecipeChoice for potions, with the addition of the PredicateChoice this could be a bit confusing. Maybe it should be renamed to something more clear like a PotionRecipeChoice/PotionPredicateChoice?
I just noticed there is already a PredicateRecipeChoice for potions, with the addition of the PredicateChoice this could be a bit confusing. Maybe it should be renamed to something more clear like a PotionRecipeChoice/PotionPredicateChoice?
well rename sounds a little breaking i think, maybe this new PredicateChoice can be named ItemPredicateChoice (? or add an extension of RecipeChoice for Potion and move things to that for make clear the diff... but not really sure.
Hi and welcome to paper :wave:
I don't see the usage of this? Why would you teleportAsync to an entity?
The entire point of that method is that you might teleport into a chunk that isn't loaded yet.
An entity instance existing means the respective chunk said entity is in also exists.
Just on a type-basis I don't see a usecase for these, but maybe I am just missing something. Could you elaborate on that a bit?
Hi and welcome to paper ๐
I don't see the usage of this? Why would you teleportAsync to an entity? The entire point of that method is that you might teleport into a chunk that isn't loaded yet. An entity instance existing means the respective chunk said entity is in also exists. Just on a type-basis I don't see a usecase for these, but maybe I am just missing something. Could you elaborate on that a bit?
As far as i know, folia needs the teleportAsync method, so this would allow someone to create a Paper plugin with Folia support that uses this functionallity.
This would be one example i can think of, because i just encountered this issue with GrimAC
If this is porting methods up from folia, then yea, this might be something to do.
Tho that is a lot different of a premise than your PRs description.
These methods don't exist in folia, this is a desire to pull up some of the helper util flood for the teleport method to the teleportAsync methods; which, I'm generally on the edge around adding more helper functions for trivial operations
If this is porting methods up from folia, then yea, this might be something to do. Tho that is a lot different of a premise than your PRs description.
I just wanted to word it as a more general thing.
Anyways if this is not needed feel free to close this PR :D
Yea, I think I'll close this then.
Thank you anyway for the PR <3
For documentation purposes as to why the PR was closed:
Teleporting to an entity instance means the target entity exists.
Unless a plugin is doing terrible things, it is also loaded, as such the teleport target location is loaded.
As visible in the PR, this is then pretty much just syntax sugar for CompletableFuture.completedFuture(entity.teleport(targetEntity)), which is just not enough code saved to really be worth yet another method around teleportation, which is already one of the most overloaded bits of logic we have :sweat_smile:
Thank you again! Hope my line of reasoning here was understandable.
Both these should get a // Paper - diff on change - CraftDoubleChestInventoryViewBuilder.defaultTitle on the respective bits in NMS that "define" them / use them
This is one of those "buildFakeBlockEntity" things that would make me happy xD
See other, diff on change.
Less of a try, this will error if it doesn't succeed and that error isn't an expected state unless we fucked up.
So just, setDefaultTitle, or honestly super.defaultTitle = extractDefaultTitle(entity) is better here.
Early return instead.
!(obj instanceOf final Type type) works.
i feel this a little breaking just change the PlayerChangedMainHandEvent::getMainHand now returns the old...
this can be more a fix by making the method return correctly the new hand.
i feel this a little breaking just change the PlayerChangedMainHandEvent::getMainHand now returns the old... this can be more a fix by making the method return correctly the new hand.
I thought about how to make the method return the new hand correctly, but it's been so long since this method has been behaving incorrectly that I chose to create a new method.
This is fun; getMainHand() fells redundant and generally useless given that the info is on the player at this point; I'd ponder if the better option here is to just replace the event so that plugins can use the new event or mitigate the busted behavior from the older event
Maybe MenuType#create could have a new method without title and a nullable title.
Also i get this error while testing the lectern: https://pastes.dev/KgmpW6mqCE
If the corrupt chunk is still there in the region file you can upload it here so it can be looked at
Sorry I am a bit silly, where does it say which region file caused the issue?
We already have a new event, PlayerClientOptionsChangeEvent.
I think the way forward here is to just, deprecate getMainHand, leave it as PR suggests it (technically broken).
Add the new method for people that wanna stick to this and @Obsolete the event.
Done as stated above and reverted the javadocs to not have this method appear "non broken".
I think it should be noted that the fake sign needs to be within 9 blocks of the player.
(It's block interaction range + 4).
If it's too far away, the sign will immediately close.
7e21cb8 fix PlayerChangedMainHandEvent javadoc (#12020) - LemonCaramel
I'm not sure this is smart. What happens when a non-animal sittable mob is added? Not really out of the realm of possibility, in fact its probably likely. I would rather Sittable be made to extend Entity or LivingEntity since that's pretty much guaranteed to always be the case.
Agree, this should not be on Animals but Entity.
Stack trace
> tag @e remove
[22:57:58 ERROR]: Thread Server console handler failed main thread check: Chunk getEntities call
java.lang.Throwable: null
at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:11) ~[paper-1.21.4.jar:1.21.4-126-fb5b173]
at net.minecraft.server.level.ServerLevel.getEntities(ServerLevel.java:2443) ~[paper-1.21.4.jar:1.21.4-126-fb5b173]
at net.minecraft.server.level.ServerLevel.getEntities(ServerLevel.java:1405) ~[paper-1.21.4.jar:1.21.4-126-fb5b173]
at net.minecraft.commands.arguments.selector.EntitySelector.addEntities(EntitySelector.java:172) ~[paper-1.21.4.jar:1.21.4-126-fb5b173]
at net.minecraft.commands.arguments.selector.EntitySelector.findEntities(EntitySelector.java:157) ~[paper-1.21.4.jar:1.21.4-126-fb5b173]
at net.minecraft.commands.arguments.EntityArgument.getOptionalEntities(EntityArgument.java:69) ~[paper-1.21.4.jar:1.21.4-126-fb5b173]
at net.minecraft.commands.arguments.EntityAr...
Ok, I can replicate that. It's fired by the call in ServerGamePacketListener#handleUseItem
You can convert from chunk coords to region file coords using online tools, the chunk at x118 z161 corresponds to the r.3.5.mca file
In that case I'd change the JD as well
They state an animal that may sit
Yeah, that's fine. I don't really take a casual mention of "animal" to be an API contract that this type also implements Animals (btw, why is it plural? strange bukkit choices).
Itโs been animals for ages, just an ancient relic.
Stack trace
> tag @e remove [22:57:58 ERROR]: Thread Server console handler failed main thread check: Chunk getEntities call java.lang.Throwable: null at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:11) ~[paper-1.21.4.jar:1.21.4-126-fb5b173] at net.minecraft.server.level.ServerLevel.getEntities(ServerLevel.java:2443) ~[paper-1.21.4.jar:1.21.4-126-fb5b173] at net.minecraft.server.level.ServerLevel.getEntities(ServerLevel.java:1405) ~[paper-1.21.4.jar:1.21.4-126-fb5b173] at net.minecraft.commands.arguments.selector.EntitySelector.addEntities(EntitySelector.java:172) ~[paper-1.21.4.jar:1.21.4-126-fb5b173] at net.minecraft.commands.arguments.selector.EntitySelector.findEntities(EntitySelector.java:157) ~[paper-1.21.4.jar:1.21.4-126-fb5b173] at net.minecraft.commands.arguments.EntityArgument.getOptionalEntities(EntityArgument.java:69) ~[paper-1.21.4.jar:1.21.4-126-fb5b173] at net.minecraft.comm...
Based in how previously this value is directly send in the old method (that method not exists) then just set the yield to 0 for handle in events.
Is your feature request related to a problem?
The trial spawner tilestate lacks features - the most important one being getting and setting the cooldown_ends_at value.
Providing access to this value would be highly beneficial, as it would allow users to get the remaining time before the trial spawner becomes available again, as well as modify or remove the cooldown as needed.
Describe the solution you'd like.
I propose these 2 functions:
getCooldownEndTime() returns a long that is the value, if there is no value it would return 0 or null.
setCooldownEndTime(Long) sets this value for the tilestate.
Describe alternatives you've considered.
.
Other
Implementing this feature shouldn't be too complex, considering there is already a function in setting and getting the target_cooldown_length value. Of course, that's just my perspective. It's not me acutally doing the...
Here's the file: https://files.catbox.moe/fho97w.mca
I assume it should be the one from the world folder
The same problem applies to Attributable
I doubt attributes will ever be applicable to non entity objects
Not a big fan of these method names, they feel really spigot.
getCooldownEnd is probably better.
getNextSpawnAttemptTick or something?
okay i just take the same name in the var/wiki but maybe this works better.
maybe just getNextSpawnAttempt
Was a bit iffy on that because that could also be the next attempted mob or whatever.
getNextSpawnAttemptTime maybe?
Is your feature request related to a problem?
Currently, it is not possible to define an armadillo's state (idle, rolling scared and unrolling)
Describe the solution you'd like.
A method to set the state
Describe alternatives you've considered.
NMS
Other
No response
that and maybe expose the other methods in NMS like the scared,rollUp,rollOut.
that and maybe expose the other methods in NMS like the scared,rollUp,rollOut.
I think adding a set state method would be enough since it covers all of those methods
Expected behavior
The maximum speed of placing blocks with the main hand and the off hand should be the same
Observed/Actual behavior
It is easier to make blocks become "ghost blocks" when quickly placing blocks through an off hand. The main reason for blocks to become "ghost blocks" is that packets are sent up to the limit set by paper.
In ServerGamePacketListenerImpl code, can be noticed that:
// Spigot start - limit place/interactions
private int limitedPackets;
private long lastLimitedPacket = -1;
private static int getSpamThreshold() { return io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.incomingPacketThreshold; } // Paper - Configurable threshold
private boolean checkLimit(long timestamp) {
if (this.lastLimitedPacket != -1 && timestamp - this.lastLimitedPacket < getSpamThreshold() && this.limitedPackets++ >= 8) { // Paper - Configurable threshold; raise packet limit to 8
return false;
}
...
Resolved as that event got un-deprecated! Epic!
5a34bf0 Correctly retrun true for empty input shapes in... - Spottedleaf
Going to close this as WAI. Mojang really should add a way to hide attributes without having to copy over the default attributes for an item type. We have no interesting in maintaining a hacky fix where we implicitly do that copying over if someone sets the hide flag, and we don't want to keep upstream's broken fix that just deletes all implicit attribute modifiers for items.
Should reconsider fixing this bug for the future MC version (whenever it comes), due to 25w04a changing how tooltips are hidden again and separating "show_in_tooltip" from the attribute component.
Stack trace
Server hard crashed right after updating from 30046e041049e4a942ba5367dba1b1aaaf1ba91e to 5a34bf0425f39d7b206a2c7de3bae860740a9da1
Plugin and Datapack List
N/A
Actions to reproduce (if known)
No response
Paper version
This server is running Paper version 1.21.4-DEV-main@5a34bf0 (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-DEV-88bbead (MC: 1.21.4)
Other
No response
Can you send the chunk debug data? It should have been dumped on crash.
Expected behavior
the error shouldn't halt execution for the whole server jar, worlds should attempt to save
Observed/Actual behavior
The whole server halts execution indefinitely as the shutdown process fails
[17:29:57] [Paper Watchdog Thread/INFO]: [ProtocolLib] Disabling ProtocolLib v5.4.0-SNAPSHOT-739
[17:29:57] [Paper Watchdog Thread/INFO]: Saving players
[17:29:57] [Paper Watchdog Thread/WARN]: Asynchronous Save Players! Blocking thread until it returns
java.lang.IllegalStateException: null
at io.papermc.paper.util.MCUtil.ensureMain(MCUtil.java:116) ~[paper-1.21.4.jar:1.21.4-DEV-5a34bf0]
at net.minecraft.server.players.PlayerList.saveAll(PlayerList.java:1073) ~[paper-1.21.4.jar:1.21.4-DEV-5a34bf0]
at net.minecraft.server.players.PlayerList.saveAll(PlayerList.java:1069) ~[paper-1.21.4.jar:1.21.4-DEV-5a34bf0]
at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:1016) ~[paper-1.21.4.jar:1.21.4-DEV-5a34bf0]
at net.minecraft.server.dedicated...
Can you send the chunk debug data? It should have been dumped on crash.
Sure (too big for pastebin, so i'll post here):
Seems like a player probably right clicked while flying with elytra at the edge of a chunk, resulting in a useitempacket "to" field being within an unloaded chunk, I feel like we should be checking the chunk is loaded first though?
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 5738709..9655001 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1997,6 +1997,15 @@ public class ServerGamePacketListenerImpl
float f8 = f3 * f5;
double d3 = this.player.blockInteractionRange();
Vec3 to = from.add((double) f7 * d3, (double) f6 * d3, (double) f8 * d3);
+
+ // Paper start - Don't allow using items on unloaded chunks
+ if (this.player.level().getChunkIfLoadedImmediately(Mth.floor(to.x()) >> 4, Mth.floor(to.z(...
Can you provide the full crash log? It should include the stacktrace of all threads
Expected behavior
Unmatched recipes are not displayed or cannot be used
Observed/Actual behavior
Recipe results are displayed incorrectly
Steps/models to reproduce
1ใAdd an exact recipe for stonecutter
ItemStack source = new ItemStack(Material.STONE);
source.editMeta(itemMeta -> {
itemMeta.itemName(Component.text("a special stone"));
});
Bukkit.addRecipe(new StonecuttingRecipe(new NamespacedKey("a", "a"), new ItemStack(Material.DIAMOND), new RecipeChoice.ExactChoice(source)));
Bukkit.addRecipe(new StonecuttingRecipe(new NamespacedKey("b", "b"), new ItemStack(Material.WHITE_WOOL), Material.STONE));
2ใGive yourself a plain stone (/give xxx stone)
3ใView on Stonecutter
Plugin and Datapack List
Only test plugin
Paper versio...
Pretty sure that this is a vanilla client/protocol limitation
Can you provide the full crash log? It should include the stacktrace of all threads
Sure, here you go: https://pastebin.com/raw/pMJ9pc33
Expected behavior
If I want to make an enumset of blocks that are instanceof Container, I'd do something like this on startup (using the paper createblockstate api)
for (Material value : Material.values()) {
if (value.isBlock() && value.createBlockData().createBlockState() instanceof Container) {
CONTAINER_MATERIALS.add(value);
}
}
Observed/Actual behavior
using the paper createblockstate api lets me create a blockstate without placing it in the world, but it fails for one material: MOVING_PISTON:
Caused by: java.lang.IllegalStateException: The blockState must be placed to call this method
at com.google.common.base.Preconditions.checkState(Preconditions.java:513) ~[guava-33.3.1-jre.jar:?]
at org.bukkit.craftbukkit.block.CraftBlockState.requirePlaced(CraftBlockState.java:332) ~[paper-1.21.4.jar:1.21.4-DEV-88bbead]
at org.bukkit.craftbukkit.block.CraftBlockState.getWorld(CraftBlockS...
Expected behavior
Bukkit.getAsyncScheduler().runDelayed(...)andBukkit.getAsyncScheduler().runAtFixedRate(...)schedule the task usingFoliaAsyncScheduler#timerThread: it doesn't matter if it's a delayed or a repeating taskFoliaAsyncScheduler.AsyncScheduledTask#run()gets run for the task- All runs of the task are executed on
FoliaAsyncScheduler#executors
Observed/Actual behavior
Bukkit.getAsyncScheduler().runDelayed(...)andBukkit.getAsyncScheduler().runAtFixedRate(...)schedule the task usingFoliaAsyncScheduler#timerThread: it doesn't matter if it's a delayed or a repeating taskFoliaAsyncScheduler.AsyncScheduledTask#run()gets run for the task- Each run is meant to be dispatched into the pool (
FoliaAsyncScheduler#executors) but the first one isn't. The work is dispatched into the pool only whenAsyncScheduledTask#stateisSTATE_ON_TIMER, which is instead alwaysSTATE_SCHEDULED_EXECUTORfor first runs of all task:- `As...
b68be72 Switch to jspecify annotations for Player - jpenilla
[PaperMC/Paper] New branch created: player-jspecify
2c9faae Switch to jspecify annotations for HumanEntity - jpenilla
dbc383a Switch to jspecify annotations for OfflinePlayer - jpenilla
Expected behavior
- Villagers pathfind correctly to beds and workstations according to their schedule, going through doors to get into houses.
Observed/Actual behavior
- Villagers attempt to access bed/workstation through the wall instead of walking inside the building, if the bed/workstation is close enough to a wall
Steps/models to reproduce
- Construct a small box/house with an opening on one end
- Place bed inside the box adjacent to one of it's walls opposite the opening
- Spawn villager outside the wall on the side with the bed
- Set time to night
- Observe villager pathing
Plugin and Datapack List
None
Paper version
[23:50:10 INFO]: Checking version, please wait...
[23:50:10 INFO]: This server is running Paper version 1.21.4-131-main@1004374 (2025-01-28T21:51:56Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
Other
Might not replicate 100%. Making walls >4 blocks thick sometimes fixes the issue.
Tested same world on vanilla server with no...
I am running a server in Buffalo New York using Sparked Host and I am also getting this issue. It's been happening ever since I've started using this host.
https://bugs.mojang.com/browse/WEB-7591
This is a known issue, We do not have means to control mojangs WAF, however; this is 100% on them; any form of mitigation on your side would basically rely on external proxies, etc
@electronicboy Pretty sure that this is/was a vanilla client/protocol limitation
https://github.com/ViaVersion/ViaBackwards/issues/912 ViaBackwards dev told that could be fixed in paper. In comments, people report the bug to Geyser and it got fixed. maybe that be could fixed in Paper module
understood. well, i sent this to you just for you know that viabackwards couldn't fix it
Is your feature request related to a problem?
The main issue with creating a new world via WorldCreator, is it can take upwards of 10 seconds (or longer on some machines I'm assuming)
After throwing in like 20 debug timings, I came to the conclusion that it's setting up the initial spawn area that is causing the massive delay.
In my test:
[14:13:20 INFO]: 'set biome provider' took: 2 ms
[14:13:20 INFO]: 'create dimension key' took: 0 ms
[14:13:20 INFO]: 'create ServerLevel' took: 39 ms
[14:13:20 INFO]: 'setup world border' took: 2 ms
[14:13:20 INFO]: 'initialized serverLevelData' took: 0 ms
[14:13:27 INFO]: 'set initial spawn' took: 6855 ms # <-------- eeek, nearly 7 seconds
[14:13:27 INFO]: 'init world' took: 0 ms
[14:13:27 INFO]: Preparing start region for dimension minecraft:world_custom_biomes
[14:13:27 INFO]: Preparing spawn area: 100%
It took almost 7 seconds to setup the initial spawn. This is due to Minecraft having to search around to find a valid ...
[PaperMC/Paper] New comment on issue: #12044 WorldCreator - option to override setting initial spawn
Closing, as @lynxplay informed me of:
https://jd.papermc.io/paper/1.21.4/org/bukkit/generator/ChunkGenerator.html#getFixedSpawnLocation(org.bukkit.World,java.util.Random)
Thanks again lynx.
We'd like to avoid having classes/records or really any implementation types exposed to the API, preferring to just have an interface.
So make this an interface, and add a package-private implementation, in the api, like PredicateChoiceImpl that is a record. Then inside RecipeChoice, add a static method to create an instance of it.
In the constructor of the above-mentioned record, clone the itemstack input.
I just noticed there is already a PredicateRecipeChoice for potions, with the addition of the PredicateChoice this could be a bit confusing. Maybe it should be renamed to something more clear like a PotionRecipeChoice/PotionPredicateChoice?
Since PredicateRecipeChoice isn't public, delete it, and make PotionMix#createPredicateChoice return an instance of the new type. But also deprecate that method, and suggest to use the new method you create.
Here's a great example of what I talked about in my review, suggesting to keep implementation types out of the "api" because we can now just delete PredicateRecipeChoice entirely.
Yeah, this is not fixable. In fact we might want to not allow exact ingredients as inputs for stonecutter recipes. Stonecutter recipes are unique, in that the client and server have to agree on the number and output of each recipe for a given input because of the button arrangement. If there is any desync, the menu behaves strangely.
There are no exact ingredients as far as the client is concerned, so in this example the client thinks there are 9 valid recipes for the input stone. But the server thinks there are only 8 valid ones, because it checks the exact ingredient. This leads to this desync, and the behavior observed here.
Lets make these static and public. Maybe useful elsewhere in the future to convert between the two types.
Also you can import the nms type. No need to fully qualify the name.
No need to show the location at all if it's not placed in the world. The purpose of our change to make it have the world/position is for debugging in-world issues. Not important for unplaced states.
Okay.
About the the FQN its IntelliJ who add this when make import.. not sure if that is for a rule in the .editorconfig because in the past the IDE just add the import and not force the FQN...
That's because the armadillo Bukkit wrapper has no armadillo state enum and IJ falls back to FQN instead of static imports for sub classes
ohh... yeah right... if i make fqn for the bukkit class and try again target the NMS class... then its a "IntelliJ" behaviour...
I ponder if these should replace initialisation rather than overriding them almost immediately, but, otherwise, from a quick look, lgtm
I ponder if these should replace initialisation rather than overriding them almost immediately, but, otherwise, from a quick look, lgtm
I was thinking about that myself, but as WaterAnimal.java has it like that I decided not to change it :shrug:
Yeah, this is not fixable. In fact we might want to not allow exact ingredients as inputs for stonecutter recipes. Stonecutter recipes are unique, in that the client and server have to agree on the number and output of each recipe for a given input because of the button arrangement. If there is any desync, the menu behaves strangely.
There are no exact ingredients as far as the client is concerned, so in this example the client thinks there are 9 valid recipes for the input stone. But the server thinks there are only 8 valid ones, because it checks the exact ingredient. This leads to this desync, and the behavior observed here.
Please do not remove the exact recipes for the stonecutter. The plugin can send fake recipe update packets when players use the stonecutter, ensuring that the client displays the recipes synchronized with the server. I'm not sure if this fix can be ported to Paper, as the solution seems too hacky.
What's your opinion on also adding static constructors inside RecipeChoice for the MaterialChoice and ExactChoice? (for concistency)
Yeah, letโs do that. Then mark the constructors for those as deprecated. Weโll move those to interfaces too when we have the bytecode tools to support rewriting that.
Call the method โitemTypeChoiceโ.
Is there even a point to having seperate interface? Maybe these methods could all just return a RecipeChoice.
might be too big of a change. There are specific public methods for each.
Actually just ignore MaterialChoice for now. I'm gonna open a separate PR handling that one, just do ExactChoice
Is your feature request related to a problem?
My problem is I can't get the vanilla terrain heigh in a generator.
Describe the solution you'd like.
I hope I can explain this well.
Let's say I have created my own ChunkGenerator
I have implemented the generateSurface method
I have also implemented shouldGenerateNoise ... telling Minecraft that it will generate the base noise terrain.
My plan is to just generate the surface.
Issue is there is (from what I can find) no way to get the vanilla noise terrain heigh (basically what vanilla has already generated in the chunk by the time it gets to my surface...
public PredicateChoiceImpl {
Preconditions.checkArgument(stackPredicate != null, "The item predicate cannot be null");
Preconditions.checkArgument(exampleStack != null, "The example stack cannot be null");
Preconditions.checkArgument(!exampleStack.isEmpty(), "Cannot have empty/air example stack");
exampleStack = exampleStack.clone()
}
can use a fancy record compact constructor here since its just preconditions
Looks good, just a few more things. I also opened the PR adding the future alternative to MaterialChoice. Will merge mine in after yours
add @Deprecated(since = "1.21.4", forRemoval = true) to all of these.
Lets avoid upstream's mistake. For situations where it's not valid to pass 0 values, and you want a varargs parameter, you can do smth like.
static @NotNull ExactChoice exactChoice(@NotNull ItemStack first, ItemStack... others) {
That forces them to supply at least one value, and optionally anymore
Not sure we have to expose this, since it is a predicate itself. An empty interface is fine. To your point about maybe not needing interfaces, I think it's good to have even an empty one so you can at least know what type of choice it is. otherwise it's a little annoying to figure out.
Long-term this API should just be replaced with data-driven worldgen, given that its very limited and outdated.
But this should be easy enough to expose in ChunkData. The game has special _WG heightmaps during worldgen that contain this data.
Gametime -> game time and you could maybe add a @see tag for a method to get the game time, else looks good
* Represents the current state of the armadillo.
i should get an obfhelper or diff on change comment
based in others PR is valid implement jspecify in this classes or can be done in another PR?
Since you're already changing all method lines you might as well update the annotations here yeah ๐ add nullmarked at the top and remove the explicit notnull annotations
5bcfb12 Fix activation range config and water animal st... - Lulu13022002
e0711af Deprecate UnsafeValues#getSpawnEggLayerColor (#... - Lulu13022002
Thanks can you rename the method to restore the overload (before it made sense in 77fd87e4d053a82b1a733a773b235c25c2a6c6a7) if you don't mind?
Done, though I am not sure if that's a good idea since it generates more diff?
Yeah sorry i meant on the other side fillInventory -> fill
Oh sorry, that makes more sense, should be fixed now.
Should I mark the RandomSource field on the fill() with the plugin boolean as Nullable? Intellij shows me an warning that the field is NotNull but not sure if it matters or not since it's implementation code
That's up to you, but then you will just move the warning to withOptionalRandomSource which is not null too
random is Nullable in the API, so you get a NPE here and above
This was broken before, wasn't it? I pushed a fix lol
Hm yeah right, will just keep it as is
Expected behavior
Triggers when sender uses Tab Completion
Observed/Actual behavior
So i tried to cancel out some Tab Completions, but the event doesnt even trigger, i added some debugging, it didnt trigger aswell, the Listener is registered.
Steps/models to reproduce
@EventHandler
public void onTabComplete(TabCompleteEvent event){
Bukkit.getLogger().info("executed");
if (event.getSender() instanceof Player) {
if (event.getSender().hasPermission("transient.bypass.completions")) return;
List<String> completions = event.getCompletions();
completions.removeIf(completion ->
hiddenCommands.stream().anyMatch(completion::startsWith));
event.setCompletions(completions);
}
}
Plugin and Datapack List
Paper version
This server is running Paper version 1.21.4-110-main@c44f8...
The initial question would be 'what are you trying to tab complete', tab completion is mostly handled on the client these days, with the client only asking the server to complete stuff it's told to ask the server about (i.e. the legacy bukkit command system); stuff like the root command is sent to the client entirely (and, chat completions are 100% on the client)
Expected behavior
Chunks are expected to load fast. i have switched from spigot to paper for the use of velocity and for some reason it loads extremely slow.
Observed/Actual behavior
I have a 32GB ram 3.30 ghz 4 cores processor. where i run the server on. The chunks load very slow you will see it if you fly too quickly and i get stuck in the not loaded chunks and wait for them to load.
Steps/models to reproduce
All i did was switch from spigot to paper and whenever i play on paper the chunk load slow whenever i play on spigot it is back to fast chunk loading
Before you all say stay on spigot i have to stay on paper for the plugins and velocity.
Plugin and Datapack List
Plugin list:
Axiompaper, Buildmode(my own plugin), Essentials, essentialschat, essentialsspawn, Gsit, Luckperms, MV-core, MV-inventories, Timber, Vault, Worldedit.
Paper version
This server is running Paper version 1.21.4-136-main@e0711af (2025-01-31T12:30:12Z) (Implementing API version 1....
Please use our Discord for support with performance issues.
The issue tracker isn't really a good place for diagnosing performance problems.
Please use our Discord for support with performance issues. The issue tracker isn't really a good place for diagnosing performance problems.
This isnt performance im pretty sure its a bug i tried resolving this issue already there was no solution
This is a support topic and requires too much potential back and forth to
be flooding people from the issue tracker. Paper artificially limits the
rate at which stuff is done to prevent DoSโing clients, and you've got the
concurrent sends and loads set to 1 chunk;
On Sat, 1 Feb 2025 at 13:16, Luca @.***> wrote:
Please use our Discord https://discord.com/invite/papermc for support
with performance issues. The issue tracker isn't really a good place for
diagnosing performance problems.This isnt performance im pretty sure its a bug i tried resolving this
issue already there was no solutionโ
Reply to this email directly, view it on GitHub
https://github.com/PaperMC/Paper/issues/12051#issuecomment-2628949916,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJMAZBOLW7XJW2FT5AP5TD2NTCK7AVCNFSM6AAAAABWJI5PD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRYHE2DSOJRGY
.
You are receiving this because you are su...
So theres no way to cancel the event via a server plugin?
Expected behavior
Hello, I'm seeing this problem with 1.19.4 players When players on version 1.19.4 load a crossbow (only if it's enchanted with Impaler IV, I don't know about lvl below), then minecraft freezes. I'm not sure if it's because of you, but try to do something.
Observed/Actual behavior
Occurs when the player loads a crossbow with the Impaler IV enchantment.
Steps/models to reproduce
Occurs when the player loads a crossbow with the Impaler IV enchantment.
Plugin and Datapack List
no
Paper version
Paper 1.21.4-82-main@08fc33c
Other
No response
1.19.4 is very outdated and completely unsupported, so I am going to close this issue. Its recommend to update to 1.21.4.
I'm not sure if it's intended but those methods should probably set/reset the DANGER_DETECTED_RECENTLY memory module type otherwise the changes are immediately reverted. Alternatively the key could be exposed in the api ig.
stateToBukkit and stateToNMS are static methods so it's incorrect to have "this" here
bd22a27 Add support for lz4 - electronicboy
[PaperMC/Paper] New branch created: fix/add-lz4-region-comp-support
Mojang added this early 2024, however, it wasn't ever added to the actual config option
inside of paper
Expected behavior
LZ4 compression to work (added in snapshot 24w04a)
Observed/Actual behavior
Error: [EnumValueSerializer] Invalid enum constant provided, expected one of [GZIP, ZLIB, NONE], but got LZ4
Steps/models to reproduce
Edit server.properties > region-file-compression=lz4
Edit config/paper-global.yml > unsupported-settings.compression-format: ZSTD
Plugin and Datapack List
No plugin, no datapack, fresh server.
Paper version
This server is running Paper version 1.21.4-136-main@e0711af (2025-01-31T12:30:12Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
Other
The LZ4 does not exists in the unsupported settings in paper config, which is why it doesn't work.
I would argue re/setting the memory and and also exposing the memory key to API would be a good call
The loom has the title of the chest set by default.
I also get some other errors while testing
for the enchantment menu: https://pastes.dev/ZgBP7TjW9Y
for the merchant menu: https://pastes.dev/whPBf9wNNc
yeah i forget about that checks.. i set the value (based in the damage call) and call erase for the roll methods for handle that, also expose the memory key for allow modify this.
currently rollUp looks like working but the rollOut not.. when call rollOut and rollUp again not sure what behaviour im missing for that.
The loom has the title of the chest set by default.
I also get some other errors while testing for the enchantment menu: pastes.dev/ZgBP7TjW9Y for the merchant menu: pastes.dev/whPBf9wNNc
Hey can you sure the code you're using when you get the second exception, thanks.
Was notified on discord about a bug relating to "clashing" of sorts when on top of a chest block, and using the no location construction. This occurs because when standing on top of a non full block e.g. in this specific case a chest. The player's BlockPos is still in the same block of the chest thus cuasing the no location construction to open the chest the player is on top of.
I Addressed this by setting the BlockPos to BlockPos.ZERO instead of the player's location the goal is to avoid this clash. My thought here is that BlockPos.ZERO could possibly also cause issues if a specific chest block were to exist at (0, 0, 0) within a world, so I don't really think this is the "best" decision. I'll be revising this PR to attempt to take better shots at addressing this quirky behavior.
I was experimenting with the MenuType API and ran into an issue where when standing on a non-full block (such as a chest or brewing stand), the InventoryView will be that of the container. So any ...
Using the Zero coordinates may cause unnecessary chunk loading.
By binding a location in an unloaded chunk to this builder it is likely that the given chunk the location is will load. That means that when, building this view it may come with the costs associated with chunk loading.
Perhaps you can set the block position outside the world height boundaries, which ensures that a virtual inventory is always returned, such as player.blockPosition().atY(player.level().getMinY() - 1).
However, this may still have side effects, such as players no longer being able to hear the sounds emitted by the inventory.
Hmmm I think sound side effect is no issue whatsoever for fake menus, I will take this idea into considerations.
I would refrain from using positions outside the world boundaries
maybe Mojang decides in the future to disconnect the client for block changes outside the world
Also, last time I did virtual inventories myself the block had to be within the reach of the player plus a few additional blocks to even open
I would refrain from using positions outside the world boundaries maybe Mojang decides in the future to disconnect the client for block changes outside the world Also, last time I did virtual inventories myself the block had to be within the reach of the player plus a few additional blocks to even open
I understand your concern with outside the world positions, however it will be tested thoroughly as an option. Also if you were unable to reach the inventory within a a couple blocks you incorrectly set up your menu api. Distance only really matters for physical menus that are stored within the world. Virtual menus are virtual and thus disconnected from the world, even if they create a fake tile the tile is not actually in the world. I have also other things I wish to attempt to mitigate these issues, such as using the players upper body position instead, which is slightly more favorable if I can avoid these glitches with that.
Why don't you just use ContainerLevelAccess.NULL there instead of creating a real one with fake coordinates?
And why here it isn't just return buildFakeTile(player);?
Expected behavior
Vanilla and also expected behaviour:
Fishing rod bobber is still loaded upon entering nether portal, unless player uses fishing rod again. When used again it despawns.
Observed/Actual behavior
Fishing rod bobber is left in loaded by enderpearl chunk despawns upon entering nether portal.
disable-unloaded-chunk-enderpearl-exploit is set to false.
Steps/models to reproduce
-
Creating enderpearl chunk loader (water column with bubbles, 6 blocks deep into ground), throwing enderpearl inside.
-
Create ender pearl teleport chamber OR command block inverted with redstone torch OR dispenser with single item inverted with redstone torch (Screenshot 1)
-
Use fishing rod on pressure plate, leaving bobber on it.
-
Enter portal with fishing rod in hand.
-
Actual behavior: Bobber despawns, activating dropper/command block/teleport chamber upon entering portal.
Expected...
Expected behavior
Zombified Piglins should spawn in the nether portals
Observed/Actual behavior
Zombified Piglins spawn near to nether portals, outside the portals on random blocks.
Most of the time under the portals.
Steps/models to reproduce
- Build a regular Zombified Piglins Farm and start it
- Wait 5-10 minutes
-> Piglins will spawn next to portals oder under them
https://i.imgur.com/eCeAgGl.png
Plugin and Datapack List
https://i.imgur.com/fFcGgvY.png
Paper version
https://i.imgur.com/siuurBO.png
Other
Other servers are also affected by this issue.
There is also an issue on Folia https://github.com/PaperMC/Folia/issues/320
I get another error when i tried to open a merchant menu without villager but with a title set: https://pastes.dev/hLGHRQQSSt
And the loom is still disguised as a chest.
I think you need to tweaks a bit more its brain.
The issue is that rollOut is called at the very end of the animation, if you want to keep the animation you would need to adjust the ttl to the duration of unrolling state.
That event is only called for bukkit commands. It is not called for commands using the new brigadier command API, as tab completion for those is generally handled on the client. You can specify permissions while registering the command there, and the client will respect those for tab completion.
I am unable to reproduce the event not working on the latest build. Its called just fine for all bukkit commands, so I am going to close this issue. For further support, I would recommend using the discord server.
This seems to be a vanilla issue, https://bugs.mojang.com/browse/MC-160582.
I can also reproduce the villager using the bed through a 1 block thick wall, just like in the vanilla issue.
8927091 Do not record movement for vehicles/players una... - Spottedleaf
you pushed your test plugin
yes, yes I did, if you looked at full diff it was removed, they will squash on commit.
Sorry, wasn't quite sure if you noticed
I didn't see the full diff
The line setting the bukkit owner seems to somehow have been duplicated.
5395ae3 Fix composter block setting bukkit owner twice ... - Warriorrrr
Can confirm. Happens for us as well.
Is your feature request related to a problem?
Only "problem" is readability of the version, as it has a lot of fluff that doesn't really seem to fit or make sense to have.
Describe the solution you'd like.
Given the hard-forking of Paper, it would make sense to consider changing the version structure used for the API.
As of right now is the version the same format as used by Spigot, which is <mc_version>-R0.1-SNAPSHOT, which is a lot to read for very little info or use.
Why is there R0.1? Does it have any use? Are releases really always snapshots?
I would propose to have version changes made by using the following, if technically achievable:
<mc_version>for proper releases matching the MC version.<mc_version>-DEVfor the latest available build of the API for the given MC version.<mc_version>-<commit>(or<mc_version>-<build_number>?) for releases of a specific commit (or build?), if a dev wants to pin the version to a specific one (for wha...
Discussion Category: Ideas
The version string is what is deployed to the maven repo, and that's a 1:1 sorta deal, to have multiple things would require multiple deployments, and that's generally not how stuff like nexus, etc, expects versioning to be handled. Ideally, we'd have release builds, but, every mechanism I've seen of that has generally flopped.
SNAPSHOT needs to stay as that's how stuff remembers that it's a snapshot build and to deal with snapshot versioning caveats; R0.1 is an artifact of the days when bukkit used to do some form of releasing
Discussion Category: Ideas
Perhaps it's time to drop the R.01 part. The last recommended builds (R1.0 and a R2.0!) were for 1.6.4 and the last beta (R0.1 and R0.2) was for 1.7.9, prior to Paper.
Could be an exciting change to make with MC 1.22, for example!
Discussion Category: Ideas
Since PredicateRecipeChoice isn't public, delete it, and make PotionMix#createPredicateChoice return an instance of the new type. But also deprecate that method, and suggest to use the new method you create.
Here's a great example of what I talked about in my review, suggesting to keep implementation types out of the "api" because we can now just delete PredicateRecipeChoice entirely.
Most issues with the PR should now be addressed, but I'm not quite sure how to properly replace the PotionMix predicate choice. The new PredicateChoice requires an example stack, but this might not really make sense for use in the PotionMix. I'm hesitant to make the example stack nullable since not having one can break recipes. Maybe the PotionMix update should be left to a seperate PR?
I was not able to observe any zombified piglins spawnin under/next to portals both using the world download from the linked video and by making a simple portal and digging a hole under it. Please provide some more reproduction steps since I'm not sure what else to do to be able to reproduce this.
Try this map
- make sure the difficulty is set to hard
- start the farm
- you have to hit the piglins with a sword
--> after a few minutes piglins will spawn on the floor
I tested this to make sure only paper is responsible for this issue. There were no other plugins on the server.
This server is running Paper version 1.21.4-138-main@5395ae3 (2025-02-02T21:42:11Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
This is a hacky way I have been using for a long time now original repo: https://github.com/Devlrxxh/BlockChanger. I wanted to implement this into Paper directly as I myself had the issue with stuff like setBlockData or setBlock being really slow for Massive size changes. I have been using this method for a long time no issues and its really fast
This is a hacky way I have been using for a long time now original repo: https://github.com/Devlrxxh/BlockChanger. I wanted to implement this into Paper directly as I myself had the issue with stuff like setBlockData or setBlock being really slow for Massive size changes. I have been using this method for a long time no issues and its really fast
I can confirm the issue now, the piglins that spawn under the portal are from the zombie reinforcement feature, which shouldn't be a thing for zombified piglins
After looking a bit more I'm now not certain if this is a feature or a bug, piglins being able to spawn reinforcements is listed on the wiki as a feature.
Multi block changes at fast speed while not costing performance
would it generally not make more sense to let the dirtying logic deal with this, as then it can deal with batching, etc
This here was mainly made because of speed and performance, no matter which method you use from bukkit (example: setBlock, setBlockData) and I myself had tha issue that's why I made this it's solves the issue I had
Yes, because the bukkit methods run a whole bunch of extra logic; What I'm asking here is does it not make sense to rely on the servers logic to send dirty blocks to viewing clients which uses logic which supports batching
I am unsure what you mean by dirty blocks but for my understanding you mean fake blocks the blocks are placed into the DataPalette Directly which basically doesn't have any extra needed logic and we call Player#sendBlockChange to send the blocks update to the player which exists on the server
You can try out the farm in Vanilla. There are no piglins that spawn around the portals.
As far as I know, the reinforced feature only applies to naturally spawned zombies / zombified piglins.
And I'm guessing it's not a new feature for piglins that spawn from portals.
Otherwise youtube etc. would be full of content around this new change!?
@Warriorrrr
also, actually, I'm not sure we can support going this deep for block modifications, at best we could probably go towards LevelChunkSection#setBlockState to run the small amount of logic needed to keep some counters in check;
The big concern we had around this kinda thing in the past was how to expose it in a manner suitable for plugins wanting to use this stuff, as well as, how do you refine how much work should be done to allow plugins to minise the side-effects induced; I don't think that a plugin wants to use this API to paste a schematic for their game only for it to not function as intended due to stuff like not updating the tickables state, etc
I'm also not really sure where the logic is, but, the game already has the means to send updates to clients without having to manually send them, and that logic supports dealing with batching, instead of flooding clients with individual packets
So if this was instead switched to use LevelChunkSection#setBlockState would it be fine?
@Warriorrrr This issue must be fixed
And also the sendBlockChange is called since results won't be called right away instead of that we could also just refreshChunk
Stack trace
[20:33:08] [Paper Common Worker #0/ERROR]: [ca.spottedleaf.moonrise.patches.chunk_system.io.MoonriseRegionFileIO] Failed to decompress chunk data for task: Task for world: 'world_the_end' at (-135,4) type: CHUNK_DATA, hash: 901536466
net.minecraft.nbt.ReportedNbtException: Loading NBT data
at net.minecraft.nbt.CompoundTag.readNamedTagData(CompoundTag.java:538) ~[paper-1.21.4.jar:1.21.4-126-fb5b173]
at net.minecraft.nbt.CompoundTag$1.loadCompound(CompoundTag.java:57) ~[paper-1.21.4.jar:1.21.4-126-fb5b173]
at net.minecraft.nbt.CompoundTag$1.load(CompoundTag.java:42) ~[paper-1.21.4.jar:1.21.4-126-fb5b173]
at net.minecraft.nbt.CompoundTag$1.load(CompoundTag.java:35) ~[paper-1.21.4.jar:1.21.4-126-fb5b173]
at net.minecraft.nbt.CompoundTag.readNamedTagData(CompoundTag.java:532) ~[paper-1.21.4.jar:1.21.4-126-fb5b173]
at net.minecraft.nbt.CompoundTag$1.loadCompound(CompoundTag.java:57) ~[paper-1.21.4.jar:1.21.4-126-fb5b173]
at net.minecraft.nbt.CompoundTag$1.load(...
Sorry for closing too soon, hadn't tested it on vanilla yet since I saw that line on the wiki and assumed it was WAI. Vanilla must somehow not be following the same code path we do for portal piglins and doesn't set the leader bonus there
I am not sure if this is the best approach. getAndSetUnchecked will bypass any ticking blocks and fluid updates. I don't think the small overhead of LevelChunkSection#setBlockState really is worth not using it. That will properly update all those things. But I guess this could be benchmarked first.
I really like the idea of this API, IMO having something like this (maybe with some disclaimers regarding ticking entities) would be very nice to have. Settings blocks with the API is currently indeed really slow.
Few things that probably aren't ideal. Might be worth looking at WE/FAWE code here too to see how they deal with this, especially in regard to making sure things behave as expected after edits.
Sending all changes indidually like this seems a bad idea and will flood the poor client with packets.
You could instead call ChunkHolder#blockChangedand then use ChunkHolder#broadcastChanges, as that will take care of properly batching and only sending the sections that actually changed. There also might be a method somewhere that does both these things already, not sure.
I tested and it's a really small difference
You can't just cast this here, else it should be moved to CraftWorld
This should be a list/collection rather than a map
Why manually cast for x and z but use blockY? this should be consistent
Long2ObjectMap instead of HashMap, caching by the coordinate key instead of the full Chunk object
... although in general, what's the point of the cache? Loaded chunks are already stored with fast access in a thread safe map via chunk keys
On large scale I have noticed Math.floor starts to take some usage and getBlockY is only needed for the Y axis it's a micro optimisation but I have had no issues
I ran out of disk space while the server was running.
The chunk seems to be entirely missing from the chunk data. -135/3 and -135/5 are there, -135/4 just isn't or is completely invalid NBT. So I guess when you ran out of disk space, it failed to save entirely. There is not really much that can be done here, the game in general doesn't handle running out of disk space very well.
Given that this apparently isn't corruption of some sort and just caused by external factors, I am going to close this issue, this is not something Paper can really fix. Blindly regenerating chunks like that might be unintended behaviour for other cases of actual corruption.
Forgot to set the difficulty to hard when moving the world to vanilla and the leader bonus for piglins from portals also works there after all, I think I'll just leave this for someone else to pick up at this point
blindly regenerating chunks is generally the default behavior here; I told OP to create this issue for leaf to look at
Our old upstream loved to always randomly shift this value to arbitrary amounts of days, but since going stable this hasn't been touched yet. Two weeks seems like a good middle ground to keep it at (though I wonder if this message is even still needed).
The "as per instructions" part also seems like a holdout from spigot, since our downloads page has no instructions.
This seems to be working as intended.
I tested it both on the latest Paper build and in vanilla, using the provided map with difficulty hard. Both in Vanilla and Paper, a zombiefied piglin is spawned as reinforcement after some time, as evident by them having a minecraft:reinforcement_callee_charge attribute modifier. Those can spawn in any free space around the leader and occasionally even spawn in the chamber below the farm.
An easy way to test this is by speeding up time with /tick rate (though Paper is able to sustain a much higher rate here than the vanilla server).
This is a Java Edition-only feature, so maybe you tested against Bedrock? Additionally, this was recently (1.21.2) changed to actually spawn zombified piglins and not normal zombies.
Could you please specify that you should use a protection handling plugin?
If you are looking into the javadoc it's most likely you are writing a plugin yourself and that would render this comment of "using a plugin" kinda redundant.
nice moment for in future improvement this? or just remove?
also can be good remove the Paper comments in that place?
does not work feels better than don't work anymore which reads as a command to stop working.
The deprecation message is too user focused, this is a dev thing
So if this was instead switched to use LevelChunkSection#setBlockState would it be fine?
No, stuff like height maps would still need updating.
I'd generally love to have a nice batch-editing API in Paper, but I'm not so sure about this design. Maybe it's worth to go a step back and look at use-cases to determine what's needed.
With a method that just takes a list of locations + the block data to set, you might be able to place blocks fast, but how do you know where you want to place which block? As soon as you need to read existing blocks from the world, this suddenly isn't really useful anymore. So I'd recommend to figure out what you actually want to cover with this API, and whether that's really a common use-case.
Also thread-safety is a bit more tricky, pretty sure this could lead to errors if the underlying palette is resized while a chunk packet for the chunk to modify is built.
You would know where to place each block since each BlockData has its Location?
If you already have a location -> block data mapping, yes. But from my experience, this is rarely what people want to do. As soon as you need to access world state to determine whether to place a block at a position, this doesn't work anymore. But that's a pretty common use-case (i.e. replacing specific blocks).
One common use-case where this solution is sufficient would be placing schematics. However, in such scenario, an explicit mapping of location -> block data in any way is pretty inefficient.
What else would you suggest? since I know some people who do this stuff like this for arena regneration, or arena copying from one place to another and the default bukkit methods aren't fast enough
I pushed changes which doesn't use Player#sendBlockChanges anymore and uses LevelChunkSection#setBlockState instead of DataPaletteBlock#getAndSet
Now using CraftWorld#refreshChunk instead of Player#sendBlockChanges and now using LevelChunkSection#setBlockState instead of DataPaletteBlock#getAndSet
Here is a showcase of it no issues, and sorry for laggy recording I was using a online recorder since I don't have OBS installed
https://youtu.be/0yycaj0aTv0
with these changes I have tested the speed can reach up to 14 Million Blocks/s and I have been testing around and not noticed any issues or errors
Expected behavior
As show in the video๏ผthe minecart moves along with the machineโs operation and does not detach from its intended position.
https://github.com/user-attachments/assets/8b4dcdad-c237-46ad-98c8-48792eee006f
Observed/Actual behavior
As demonstrated in the video๏ผthe minecart falls out of the machine during operation.
https://github.com/user-attachments/assets/a1988697-d5c3-4632-84e4-2600c12184f0
Steps/models to reproduce
Due to technical limitations๏ผ Iโm unable to create a simplified reproduction setup and have instead provided the complete machine within a world save file for testing purposes.
Plugin and Datapack List
While the scenario is somewhat complex๏ผI can confirm this issue is unrelated to plugins or datapacks.Further details are provided below.
Paper version
This issue has been identified through additional investigation as being caused by Paper-based serve...
Expected behavior
As show in the video๏ผthe minecart moves along with the machineโs operation and does not detach from its intended position.
https://github.com/user-attachments/assets/8b4dcdad-c237-46ad-98c8-48792eee006f
Observed/Actual behavior
As demonstrated in the video๏ผthe minecart falls out of the machine during operation.
https://github.com/user-attachments/assets/a1988697-d5c3-4632-84e4-2600c12184f0
Steps/models to reproduce
Due to technical limitations๏ผ Iโm unable to create a simplified reproduction setup and have instead provided the complete machine within a world save file for testing purposes.
Plugin and Datapack List
While the scenario is somewhat complex๏ผI can confirm this issue is unrelated to plugins or datapacks.Further details are provided below.
Paper version
This issue has been identified through additional investigation as being caused by Paper-based serve...
Please report this issue directly on the issue tracker for moonrise instead of through us, once it's fixed there then the fix will eventually make its way back into paper.
Please provide logs of this happening on a version of paper that's downloaded from our website and reproduction steps for this to be a fully valid bug report
In the future we can maybe just switch this towards actually querying the API to print if an update is available post server init, but, that's low priority
742968e [ci skip] Increase outdated build delay to two ... - Warriorrrr
I don't really get what a whole bunch of this PR is trying to do, it looks like a bunch of logic all slapped in random locations trying to address issues which aren't really addressed with the proposed fixes; I also really do not like that the method proposal here looks like it's the 1st class mechanism of setting multiple blocks into the world.
Providing a level of low level access to the world would be nice and is something we have discussed with some parties before, but, I would much rather see this proposed as a discussion somewhere where we can focus on creating a concrete API plan before we start worrying about the implementation details within
Okay, I get what you mean this is pr is mainly since me and some people I work with on specfic have issues when we try to set a large amount of blocks at once and I had made a solution using reflection and was wondering if it could be implemented into paper directly so other people wouldn't face the same problem
I mean code wise, I get the intent of the PR, but, the logic looks a bit misdirected in some areas or doesn't take advantage of the proper underling mechanisms in the server which already solve issues that this API faces
I think we should have a proper discussion over what such API should look like, as most of the gains in terms of setting blocks is going to be avoiding the extra overhead of the CB layer which isn't always needed, but also in terms of batching. Having a raw means to toss in a Map isn't all that I could see desired from such an API, and so, we should probably have a proper discussion over if such a method is 'enough' or if there are other concerns for consumers of this API
How should we have this discussion should?
Expected behavior
A fisherman of sufficient rank (my test was a master) who has pufferfish in their list of trades, should accept pufferfish and exchange them for emeralds.
Observed/Actual behavior
The fisherman does not accept the pufferfish; clicking on the pufferfish in the trade list (while carrying >=4 pufferfish) has no effect; pufferfish can be dragged into the appropriate UI slot but no emeralds are offered. The trade is not frozen.
Steps/models to reproduce
The behaviour was observed in PaperMC 1.21.4-138. I also tried the same things in vanilla single-player 1.21.4 to see if this was a vanilla issue (apparently it isn't, see below).
- Click on the pufferfish in the list of trades. You should see your pufferfish appear in the lefthand UI slot, and the appropriate number of emeralds in the right; grabbing the emeralds makes the sale. This happens in vanilla single-player. In PaperMC, you hear the click sound, but the pufferfish do not appear in the lef...
Supersedes #11159
Adds new API for vault blocks
Changes made compared to the previous PR:
- Added some javadocs.
- Renamed the display loot table method & changed the getRewardedPlayers return type to align with spigot.
- Removed itemsToEject methods, these items are only populated when a player is opening a vault, but these can already be changed with the block dispense loot event, and also can't think of any use case for changing items in the middle of ejecting.
- Removed rewarded players methods with player instances.
- Added API for state update time.
- Made the VaultBlockEntity#serverData field public to be able to directly update the server data, without having to access the actual tile entity.
I cannot reproduce this issue, I am able to trade pufferfish just fine. Clicking the trade on the left side also moves it into the trade window like normal.
Will this be released in the next version?
The only possible relevant differences I can think of between my game and @Warriorrrr's are (a) I'm in survival where it looks like Warriorrrr is in a creative flatworld, and (b) my fisherman was trained up in a previous version (the world has existed since 1.19 and this Fisherman has been there since 1.20 at the latest). They did buy pufferfish in 1.21.3 though. If nobody can reproduce this then I'm happy to hoard pufferfish and see if the issue disappears when 1.21.5 drops :-)
You can try doing /data get entity @e[type=villager,limit=1,sort=nearest] Offers to see if there's anything different about the trades for that villager and a newly levelled villager, or maybe the pufferfish items themselves? Can't think of many other differences
I've had this issue before, and forgot to report it.
Looking thru the code, I think I see the issue,
In MinecraftServer#stopServer:
<img width="484" alt="Image" src="https://github.com/user-attachments/assets/6e731dc4-3f26-4e32-bc71-f93454cc9626" />
It appears CraftWorld uses the vanilla logic for no-auto-saving.
Minecraft appears to just overrides and forcefully decides to save against your wishes when the server stops.
I'm assuming Mojang did this on purpose, using the no-save option to just stop auto-saving every 5 minutes, but still continuing to save when the server stops.
I guess in a sense the World.setAutoSave is kinda of correct, as it's not AUTO saving (every 5 min), but maybe another method should be added to prevent saving altogether.
autosaving is not full saving, the entire point of that mechanism is to disable the periodic saving in order to allow an external program to backup the world, it prevents various things like chunks from being able to unload, and doesn't even prevent everything from saving.
The big issue with this sorta thing is that the entire data system is leaky as there was never any real considerations of mojang to having separate levels being as separate as CB and people like to think they are, but, also, there's the entire headaches over what disabling saving should and should not affect (and the fact that this is an entire set of discussions and work for such a niche usecase in which we don't have any form of mechanism for assuring that these kind of things would keep working to the degree that people would expect for read-only worlds, etc, etc)
Yeah that makes sense.
As I read the code I understand its just to prevent the 5 min auto save.
The docs for this should maybe be detailed a smidge more explaining that?!?!
I for one definitely had the wrong impression when reading it, until now.
Since this is a very common misconception I'd suggest changing the JD to clarify this behavior
May not be the scope of this PR, but perhaps these could also be addressed here?
- https://github.com/PaperMC/Paper/discussions/11687
- https://github.com/PaperMC/Paper/discussions/11679
Or would this rather be a separate PR?
This is necesary now in implementations?
this message maybe can be more specific about the infinite rather than just "number"?
This throw a NPE and not a IllegalArgumentException like another cases where this type of check is made.
Missing non-null check here and in the remove method.
May not be the scope of this PR, but perhaps these could also be addressed here?
* [VaultUnlockEvent #11687](https://github.com/PaperMC/Paper/discussions/11687) * [VaultStateChangeEvent #11679](https://github.com/PaperMC/Paper/discussions/11679)Or would this rather be a separate PR?
My current scope is just the vault block, I'll change the PR name
It's not necessary, but I added it so that I don't have to add NonNull everywhere in the implementation or get warnings about it everywhere.
oh make sense, if is valid then i take note of that too for the warnings.
I chose the current method name so that it would be compatible with spigot, or is it fine to diverge here? (I do like displayedLootTable more)
Would a Collection or SequencedCollection return type make more sense for this method, instead of guaranteeing a Set?
The BlockDispenseLootEvent seems to already exist for this case now, a new event won't be able to expose anything extra (at least once vault api is merged in)
Discussion Category: Ideas
Well, the question boils down if ever in the future it could make sense listing a player twice, doesn't it?
My take would be, that it doesn't make sense to use a general Collection, since the vault basically just keeps track of whom to not reward any time soon again, not a complete history.
Closes #11679
Adds an event for when a vault block changes its state, allowing plugins to get and/or modify the resulting vault state (though doing something like forcefully setting the vault state to ACTIVE will cause the event to be thrown every second if there's no player nearby).
I'm not completely sure about having a getPlayer, because it requires us to pass the player instance through the unlock method and may not be completely accurate for the case where the vault becomes active. Without it, the diff would be less complex but the event would also be less useful.
Is your feature request related to a problem?
As of now everyone knows bukkit doesn't directly offer any way to do large sized batch-editing. And I have issues trying to do massive block placements since there isn't any way to do it directly except using reflection and NMS.
Describe the solution you'd like.
A way to be able to do batch-editing while it not costing any performance issues, its fine if there are stuff not updating for example ticking tile entities. so a method something like setBlocks(Map<Location, BlockData> blocks); I have made a pr about my solution about this before but its need some discussion
Describe alternatives you've considered.
Using NMS and reflection https://github.com/Devlrxxh/BlockChanger
Other
No response
Discussion Category: Ideas
Had issues with setting large amount of blocks, this would be a good feature if it gets added
Discussion Category: Ideas
It's generally a discussion over how such a mechanism should look, not a "should we add this". We already know that there has been demand for such a thing over the years, it's the API design issue and considering how much/what control should be given over stuff, because "it's fast but it corrupts game state" is not something we can be overly excited for when it comes to API, especially if we're going to be considering it a first class citizen of the API
Discussion Category: Ideas
I ran into problems when trying to set a large number of blocks. It would be great if this feature were added. The only workaround I found was using NMS and reflection, but that method breaks with new updates. So, this would be a highly useful update
Discussion Category: Ideas
I mean the corruption is normal you can't have everything at once I think adding this while still having a disclaimer and maybe seeing what can still be fixed while not costing too much performance would be good as I myself don't really see and major corruption with using this
Discussion Category: Ideas
Majority of the slowdown is in all the extra API fluff that the CB layer adds; maybe we can add a means to skip certain operations and delay them until layer, i.e. letting the light system deal with relighting chunks in the future rather than "right now"; but, busting world state by default without any form of control is just not something that I can personally support
Discussion Category: Ideas
could I know what is a "must" you need when doing this stuff? so maybe I can work on it
Discussion Category: Ideas
WorldEdit has a SideEffect system for stuff like that. An extensive API could be inspired by that. But right now, it is still unclear how sophisticated such an API has to be to make everyone happy.
Discussion Category: Ideas
Part of the reason why I said that this should be a discussion is so that we can nail down the details of what this API should look like; corrupting world state is something I'm not fond of, especially not as the default option;
The idea would be to nail down what the overarching API should look like (It CANNOT be a singular method looking like a first class mechanism of modifying the world), and should likely offer some control over what operations are skipped, and, where viable, use already built in/optimised paths for handing stuff; i.e. delaying relighting of chunks until post work so we can just relight the entire chunk if over X blocks, using the servers already existing mechanism for sending out block updates rather than trying to handle that ourselves, etc
Discussion Category: Ideas
Understood
Discussion Category: Ideas
not require change the mention in the docs of collection to set? (apinote and desc)
Updated those now, thanks
* @apiNote Vaults will only periodically scan for nearby players, so it may take until the next {@link #getNextStateUpdateTime() update time} for this
Preconditions.checkArgument(activationRange <= this.getDeactivationRange(), "New activation range (%s) must be less or equal to deactivation range (%s)", activationRange, this.getDeactivationRange());
Not sure if change but Preconditions support format then not sure why need use the String format.
you can put an empty item?
Didn't think to check if it had that, will update it for both
Yes, that's the default for it too
About the PrepareItemCraftEvent, Spigot just made it fire for the crafter too. This is the commit they made for this change. Implementing the same change would be pretty useful I think.
I would make a PR with this change, however I don't really know how to.
Expected behavior
I just did run the runServer task added by the gradle plugin xyz.jpenilla.run-paper, version 2.3.1. And since I didn't started the testserver for a few days the plugin correctly fetched the latest paper version, at time of writing it's Build 138.
However, at startup checked itself and told me I would be out of date, witch ofcause isn't true as it was updated mere seconds ago!
Observed/Actual behavior
> Task :runServer
Fetching Paper builds for version 1.21.4...
Latest build for 1.21.4 is 138.
Downloading Paper 1.21.4 build 138...
Done downloading Paper, took 19.812s.
Verified SHA256 hash of downloaded jar.
Starting Paper...
Applying patches
Starting org.bukkit.craftbukkit.Main
*** Warning, you've not updated in a while! ***
*** Please download a new build as per instructions from https://papermc.io/downloads/paper ***
2025-02-06T00:48:16.572772100Z ServerMain WARN Advanced terminal features are not available in this environment
[01:48:16 INFO...
Was it already fixed by #12063 and the latest build is just oder than two days?
The check is time based, I didn't see the need to force people to upgrade for a message 99% of people ignore anyways
No, the gist being that our hopper patch may or may not be needed anymore in the first place given item copies are incredibly cheap post 1.21.5 and this PR copying the stack prior is kinda that but without dropping our patch. So yea, it's a bit iffy to review because really this is a review to determine if the patch itself is needed.
Going to close this PR as the issue it attempts to fix has not been marked as accepted and this code looks very, uh, potentially funny.
If we end up determining that the issue is valid, we can reopen this / discuss solutions prior that may not lead to potentially weird client states/information sharing.
Closing this for now, discussion about how an API like this can look like can take place in #12070
Is your feature request related to a problem?
There are certain exploits like Trouser-Streak's NewerNewChunks module which lets players find old chunks and allows for chunk trailing bases.
Describe the solution you'd like.
Paper's anti-xray seems to prevent the Pallete exploit in the Overworld, and makes it much more difficult for chunk trailing to be utilized. In the nether, however, the liquid flow allows for Liquid exploit module under NewerNewChunks to be used to follow chunk trails. Would there be any chance to implement such a patch, or is there already one which exists in paper or in a 3rd party plugin? If liquid and the blocks could somehow be obfuscated, then I believe this could be patched.
Describe alternatives you've considered.
Paper's xray seems to somewhat fix the pallete exploit in the Overworld, but it doesn't work when players use chunk trailing exploits in the nether.
Other
Link to Trouser Streak (required meteor to run) - https://github.co...
If your world is entirely pre-generated, you can use chunky to tick liquids and other blocks for some time to prevent that from being used, but allowing adding non-still liquids to anti xray doesn't seem very useful.
I don't think something like this is really something that can be prevented in a clean way, and also not enough of a priority to warrant an open issue.
My world is way too big to be pregenerated so it is an issue. Is there any way to combat this then with an external plugin or some other method?
Replacing the true with !vanillaMaps could work to reduce the amount of packets being sent while idle, since if there's no plugin renderers we can assume that dirtyDecorations will be accurate.
Moving with a map will still cause packets to be sent because your player arrow has to be updated, but it's still beneficial.
diff --git a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
--- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java (revision e2399547e7f434d9bd7542a70f01d3be8d14b23c)
+++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java (date 1738863833572)
@@ -632,7 +632,7 @@
}
Collection<MapDecoration> collection;
- if ((true || this.dirtyDecorations) && this.tick++ % 5 == 0) { // CraftBukkit - custom maps don't update this yet // TODO fix this
+ if ((!vanillaMaps || this.dirtyDecorations) && this.tick++ % 5 == 0)...
Rebased this and moved it into a feature patch.
Also applied the changes to the brain sensor given it uses an (even worse) bit of logic for the same thing.
The only real fix for this that wouldn't be a hack would be to have a fully stable world generation output, i.e. not relying on things like the world ticking in order to properly handle putting the game into its 'final form', i.e. such as the ticking of fluids.
The only other option would be to ensure that a generated chunk has been properly randomly ticked to completion, noting that you also need chunk neighbours to be there to end up in the correct state properly. All options around this are stupidly invasive, especially if you can't pre-gen. Maybe there is some cat and mouse you can pull off with specific implementations of these tools, I recall scepticising some things a plugin could do a good while ago, but, that's generally 100% out of scope for us.
From a 'real world' standpoint, I would generally just focus on pregenning a fair area around spawn and hoping that puts off enough folk, but I can't see there being much of a tenable solution here.
Is your feature request related to a problem?
I'm currently making a roguelike plugin. I need to find out whether all the enemies are killed to accomplish a combat, so that's why I need to take those entities spawned by enemies into consideration (They should also be considered as enemies in this combat). So I wonder how can I find the entity who causes a spawn event.
Describe the solution you'd like.
Add EntitySpawnByEntityEvent which inherits EntitySpawnEvent
Describe alternatives you've considered.
- Add a method
getWhoSpawn()inEntitySpawnEvent - Add a method
getWhoSpawn()inEntity
Other
No response
entities spawned by enemies, such as? Vanilla doesn't really have much of a "spawned by" concept, and I ponder the capability of exposing such a concept without having any form of proper cause API would just make such a concept be relatively broken in general, especially when it comes to determining what means it was "spawned by X"
entities spawned by enemies, such as? Vanilla doesn't really have much of a "spawned by" concept, and I ponder the capability of exposing such a concept without having any form of proper cause API would just make such a concept be relatively broken in general, especially when it comes to determining what means it was "spawned by X"
For example, a Jokey can spawn a vehicle, an egg can spawn a chicken, a small slime can be spawned by a dying big slime, an endermite can be spawned by a ender pearl, etc
All of those generally sound okay, bar the slime one, as that falls into a really weird area as that's not considered a 'spawn' as such, that's effectively a transformation (and is already exposed in a specific event)
All of those generally sound okay, bar the slime one, as that falls into a really weird area as that's not considered a 'spawn' as such, that's effectively a transformation (and is already exposed in a specific event)
You're right, there's already a SlimeSplitEvent. But what about the others? I thought, maybe we can refactor the SpawnReason, make it an abstract class instead of a enum to carry more information?
All your examples can be covered with the entity spawn even and the spawn reason
All your examples can be covered with the entity spawn event and the spawn reason
Yeah, but the SpawnReason is a enum and it can't tell me which entity causes the spawn. That's why I edited the issue to ask whether we can make it more informative.
Is your feature request related to a problem?
In 1.21.4 the tripwire hook dupe was working in vanilla but now in papermc its not working and i need a option in the config to maybe enable it so i can get emeralds with villager when trading
Describe the solution you'd like.
Add a unsupported setting for it
Describe alternatives you've considered.
String dupe but got patched in 1.21.4 vanilla anyways
Other
No response
Well this issue was already talked in: https://github.com/PaperMC/Paper/discussions/11564 https://github.com/PaperMC/Paper/discussions/10527 https://github.com/PaperMC/Paper/issues/6487
and have a PR related in https://github.com/PaperMC/Paper/pull/7377
not sure if cover all the cases here, but exists the disc about "i need know how this spawn" like this player/dispenser spawn a Wither...
Well this issue was already talked in: #11564 #10527 #6487 and have a PR related in #7377
not sure if cover all the cases here, but exists the disc about "i need know how this spawn" like this player/dispenser spawn a Wither...
This almost solves my problem. They nearly cover all the cases but jockey (and other compound entities), Vex and Evoker Fang(and other spells)
Expected behavior
The Wither does not lose its hostility towards Iron Golems when the chunk unloads.
Observed/Actual behavior
After unloading and reloading a chunk,the Wither momentarily loses its hostility,causing it to escape the Wither cage.
Steps/models to reproduce
Construct the relevant mechanism within a chunk.
Move away from the chunk to ensure it unloads
Return to reload the chunk and observe the Wither's behavior.
Plugin and Datapack List
Issue persists in a clean Paper instance without plugins or datapacks.
This issue is unrelated to plugins or datapacks.
Paper version
All Paper version.
Other
No response
Expected behavior
SpigotLibraryLoader should download the required maven repo provided in paper-plugin.yml.
Observed/Actual behavior
SpigotLibraryLoader does not download anything.... but when i use plugin.yml instead of paper-plugin.yml it works as intended
Steps/models to reproduce
- add paper plugin to your server
- add required libraries to paper-plugin.yml
- start server
Plugin and Datapack List
only this plugin and nothing else
Paper version
Server: Paper 1.21.1-122-master@4430e96 (and yes i tried using the latest paper build)
Java: Eclipse Adoptium Temurin-21.0.3+9
Other
No response
paper plugins/lifecycle plugins have their own way for loading dependencies. please read https://docs.papermc.io/paper/dev/getting-started/paper-plugins#loaders. and make sure to ask in our discord before opening an issue
paper plugins/lifecycle plugins have their own way for loading dependencies. please read https://docs.papermc.io/paper/dev/getting-started/paper-plugins#loaders. and make sure to ask in our discord before opening an issue
mb
Closes #12075.
This pull request introduces another entity tick counter totalTickCount for api usage, reset vanilla tickCount instead of restoring value from Spigot's Spigot.ticksLived tag to keep vanilla parity.
Analysis
Spigot's restore tickCount behavior(See original patch) causes potential issues with Wither's ai, see code below, and lead to wither loses its target when entities are reloaded:
Api Changes
Now Entity#getTicksLived gets value from totalTickCount to avoid api behavior breakage, Entity#setTicksLived sets both tickCount and totalTickCount.
Currently the totalTickCount is only used for apis, if the breakage is fine, the extra counter can be removed.
This PR aims to create a new method for teleporting using vanilla logic.
Minecraft handles a lot of the teleport logic that Bukkit/CB has used over the years.
A lot of the CraftBukkit teleport code is so old, and limits what users can do with teleporting.
This chance allows the user to rely on Minecraft to handle the teleport logic rather than CraftBukkit limitations.
#A Few Notes:
- I chose the method name
teleportVanillaas a temporary placeholder. Would definitely like a better name. - I haven't added all the possible methods yet for Bukkit Entity, I wanted to get feedback first before writing all those out
- I slightly changed ServerPlayer teleport logic to handle the player's passengers (Minecraft by default doesn't allow players having passengers, this is seen when attempting to use the
/ridecommand... the API however let's us do this, so I wanted to make sure that worked.).
I have done a fair bit of testing, including:
- Player with a stack of passengers (I ...
I personally would prefer if the Craftbukkit teleport logic was simply aligned with vanilla, instead of introducing an entirely new method. The goal should be to align API behavior with vanilla where it makes sense, and here there really is little reason to keep the limitations of the Craftbukkit method.
Of course this then should be done in a major update so people are aware of the change.
See #paper-contrib message for some discussion, seems we have a good chunk of the team on the idea to just align existing methods in the next release window with notice to developers.
I do agree with having this take over Bukkit logic over a new method.
The only reason I wrote a new method was because I attempted something along these lines a year or so ago, back on CraftBukkit.
It was noted by someone not to change Bukkit logic.
I personally agree the Bukkit logic is old and silly (why are we explicitly blocking Passengers from TPing when Minecraft allows it?)
I am happy to remove the new method and just plop this into the existing methods if that is what you guys would like me to do.
plz help me Iam getting this problem
[09:03:34 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-318 (MC: 1.20.2) ---
[09:03:34 ERROR]: The server has not responded for 10 seconds! Creating thread dump
[09:03:34 ERROR]: ------------------------------
[09:03:34 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[09:03:34 ERROR]: [ChunkTaskScheduler] Chunk wait task info below:
[09:03:34 ERROR]: [ChunkTaskScheduler] Chunk wait: [( -11,-18) in 'world']
[09:03:34 ERROR]: [ChunkTaskScheduler] Chunk holder: NewChunkHolder{world=world, chunkX=-11, chunkZ=-18, entityChunkFromDisk=false, lastChunkCompletion={chunk_class=net.minecraft.world.level.chunk.ProtoChunk,status=minecraft:initialize_light}, currentGenStatus=minecraft:initialize_light, requestedGenStatus=minecraft:full, generationTask=null, generationTaskStatus=null, priority=BLOCKING, priorityLocked=false, neighbourRequestedPriority=IDLE, effective_priority=BLOCKING, oldTi...
Hello, if you are having issues please contact us in #paper-help on Discord, please do not comment on old issues. Also make sure you are using the latest version
yeah but the animation are not a client side thing?
about the brain im a little lost for what touch i try things but still have the issue with rollOut roll out but the Armadillo rollUp again
Expected behavior
Right-clicking an autocrafter should open an inventory screen letting you configure the crafter
Observed/Actual behavior
Nothing happens in the UI; on the server side there is an error (same as reported in SPIGOT-8005)
`[21:09:59] [Server thread/ERROR]: Failed to handle packet net.minecraft.network.protocol.game.PacketPlayInUseItem@524c55e7, suppressing error
java.lang.IllegalStateException: Title not set
at com.google.common.base.Preconditions.checkState(Preconditions.java:513) ~[guava-33.3.1-jre.jar:?]
at net.minecraft.world.inventory.Container.getTitle(Container.java:96) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
at org.bukkit.craftbukkit.v1_21_R3.inventory.CraftInventoryView.<init>(CraftInventoryView.java:30) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
at org.bukkit.craftbukkit.v1_21_R3.inventory.view.CraftCrafterView.<init>(CraftCrafterView.java:13) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f15...
Please provide the paper stacktrace....
In teory this issue only affects spigot by the this commit where make the Crafter call the PrepareItemCraftEvent and handle with Spigot title Precondition internally. and this its not here in Paper.
Yea I know this was fucked up during the spigot change but, we hardforked so I was just curious for the reporter to actually provide a proper stacktrace as they also claim to be able to "replicate" this on latest spigot in their comment on https://hub.spigotmc.org/jira/browse/SPIGOT-8005
I'll just close this for now and put a mental marker on the 1.21.5 issue.
Not much point in keeping it around until then and it is a super simple change too :+1:
Player info packets carry chat state to other clients since the
introduction of chat signatures. Queuing these packets while force
pushing chat packets allows for potentially inverted packet order, which
may cause chain corruption on clients.
No actually I think you approached this and called it right -- I realize now I started my server with the wrong batch script and didn't notice it was (shocked!) not running paper at all. Sorry for the false alarm and thank you for your diligence!!!
Phew, thank god xD Would have been seriously worried if we had such a glaring issue go un-noticed since the hardfork in december. Thanks for checking!
iirc armadillos have "state ticks" which tell the server to roll out again immediately if not defined properly
Yeah, I only wish I'd asked for something that merited a good use of your time -- except of course maybe giving you a sense of personal satisfaction that your hard fork was successful. I just built a bamboo plank farm that uses two chained auto crafters and it does seem to be working fine. I ran into some weird issues with rails and will open a ticket for that if I can find a good way to explain the issue (and confirm it's not a bug already reported.)
Thanks again!
Expected behavior
After placing rails the way I want them, I expect that their layout/orientation should not be changed when breaking unpowered redstone next to them.
Observed/Actual behavior
What happens in this case is the rails get changed to an S-shape. I understand that switches can be used to change rails, but I don't expect that breaking unpowered redstone should trigger the logic for this. Also, I don't think that redstone state changes should affect rails that do not have any bends in them, but I am not 100% clear on the vanilla behavior either, so some of that could be a "me" problem.
Steps/models to reproduce
Create something like the following, then break the redstone.
Plugin and Datapack List
No plugins needed to reproduce this issue.
Paper version
Paper version 1.21.4-138-main@5395ae3 (2025-02-02T21:42:11Z)
Other
No response
Perhaps add an example here in the javadoc about how to obtain an instance of this via the StatisticType or CustomStatistic classes, since this is the first place that people who see the deprecations will be looking at.
contains a comma instead of a period
Looks good, are we able to merge this?
Hopefully today yea, I'll run my own performance benchmarks and throw it at some more people for checks etc.
Maybe you can try testing it in single player.
This is the case in single player:
[PaperMC/Paper] branch deleted: fix/add-lz4-region-comp-support
Actually pretty unsure on this statement.
A set would be useful for insertion schematics, but the returned thing is unmodifiable/immutable anyway.
Consumers cannot do anything about the contents in the first place but calling contains which, that works on a collection just as well as on a set.
I don't see much benefit from this being a set, tho I'll chat it over with others.
Expected behavior
levelevent id 2001 should be PARTICLES_DESTROY_BLOCK, which spawns block break particles and makes the noise, but
Observed/Actual behavior
in the effect api its
/**
* Sound of a block breaking. Needs {@link org.bukkit.block.data.BlockData} as additional info.
*/
STEP_SOUND(2001, Type.SOUND, org.bukkit.block.data.BlockData.class, Material.class), // Paper - block data is more correct, but the impl of the mtehods will still work with Material
Steps/models to reproduce
N/A
Plugin and Datapack List
N/A
Paper version
This server is running Paper version 1.21.4-DEV-main@742968e (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are 1 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Other
No response
786ddf5 Default piston block entity direction to DOWN (... - masmc05
51acc80 Prevent duplicate raider in RaidSpawnWaveEvent ... - Lulu13022002
61312fd Switch to jspecify annotations for Player (#12042) - jpenilla
[PaperMC/Paper] branch deleted: player-jspecify
1a04e96 Fix EntityBreedEvent cancellation (#12046) - Lulu13022002
Expected behavior
Full output of help command whilst allowing us to use even more commands later on.
Observed/Actual behavior
After running help command, the output is not complete and we can't send any more commands via the Server GUI anymore. We can't even stop the server by closing the GUI.
In that case we have to stop the server via standard-ish console or just straight up kill the process.
Steps/models to reproduce
- Start server without
--noguiflag. - Wait for the server to load fully.
- Write
helpin the server's GUI and send. - Observe the command's output is not complete. You cannot send any more commands after that as well.
Plugin and Datapack List
No plugins nor datapacks
Paper version
1.21.4-143-1a04e96 (MC: 1.21.4)
Other
No response
Is your feature request related to a problem?
Currently, we have the ability to set an entity visually on fire without it being actually burning
but the way visual fire works, it is not possible to disable visual fire if the entity is really burning
Describe the solution you'd like.
Internally, the visualFire field could use a nullable Boolean object and default to null and make the entity burn if true
not burn if false
and send the actual fire state when null
I understand this will cause problems with existing plugins that utilize this method, other suggestions are more than welcome
Describe alternatives you've considered.
Other
Also, I would like to suggest adding a lockFireTicks method to be able to make entities burn or not start burning as long as the ticks are locked
I also just noticed that the getMaxFireTicks is absolutely misleading
it returns the immunity ticks (1 for non player entities and 20 for players)
this should probably not only be clarified in the JD but maybe even a rename would be appropriate
eff617b [ci skip] Deprecate Server#setSpawnRadius (#12024) - Lulu13022002
Hmm, k. It just seems like a bug but not your bug I suppose. Anyway, if this is the same as vanilla then sorry for the noise.
Is your feature request related to a problem?
I would like to request the addition of an RCON login event to the Minecraft API. Currently, there is no event to listen for RCON login attempts, which makes it difficult to implement security measures such as detecting brute force attacks on the RCON interface.
Why is this needed?
Brute-force protection: This would allow server admins to track failed login attempts, lock out IPs after a number of failed attempts, and integrate with firewalls.
Logging and monitoring: Server admins could log RCON activity and detect unauthorized access attempts in real time.
Improved security: It would allow for more secure server management, without relying on external tools or scripts.
Adding this feature would help improve RCON security and better protect Minecraft servers.
Describe the solution you'd like.
Currently, there is no event to listen for RCON login attempts in Minecraft. Adding an RCON login event would provide plugin developer...
While I can support this as a low priority, I'm generally not sure why you'd be worrying about the security of something which is completely insecure in general when it would make more sense to use existing secure alternatives, i.e. one of the few ssh server plugins, or, create something designed to be secure which would serve as a direct alternative
[PaperMC/Paper] New comment on issue: #12083 Server GUI partially freezing when using 'help' command
I can't repro this. please provide more info about your environment, i.e. OS and version, jvm vendor and version, etc
While I can support this as a low priority, I'm generally not sure why you'd be worrying about the security of something which is completely insecure in general when it would make more sense to use existing secure alternatives, i.e. one of the few ssh server plugins, or, create something designed to be secure which would serve as a direct alternative
"Thank you for considering my idea and offering to prioritize it at a lower level. I understand your point, but my goal is to develop a more comprehensive rcon brute-force protection plugin. During today's practical implementation, I found that this event is missing, which is crucial for supporting my plugin's development.
In such a large community like the Bukkit plugin ecosystem, I couldn't find any plugins specifically addressing rcon security. This is why I want to create a more comprehensive and user-friendly plugin and contribute it to the community."
The rcon system is really insecure and flawed, if you want security, as mentioned earlier, use something properly designed to be secure, like ssh protocol or a custom protocol as an alternative to rcon. Rcon and security are a bit of incompatibile concepts, and just an event would not be enough to protect yourself against attacks
Would cancelling BlockDispenseLootEvent prevent conumption of the configured key? Name does not suggest that but I was unable to test this.
Discussion Category: Ideas
[PaperMC/Paper] Issue opened: #12086 ItemMeta content incorrectly deserialized if inside shulker box
Expected behavior
If I serialize a shulker box containing an item with complex ItemMeta (such as CustomModelData) in 1.21.1 and deserialize it in 1.21.4, I expect the ItemMeta to be unchanged (or rather, correctly upgraded if the data format has changed).
For instance, if this item is present in a shulker box in 1.21.1:
==: org.bukkit.inventory.ItemStack
v: 3955
type: PAPER
meta:
==: ItemMeta
meta-type: UNSPECIFIC
display-name: '{"text":"","extra":[{"text":"Custom Paper","italic":false}]}'
custom-model-data: 42
I expect the shulker box in 1.21.4 to contain:
item:
==: org.bukkit.inventory.ItemStack
v: 4189
type: PAPER
meta:
==: ItemMeta
meta-type: UNSPECIFIC
display-name: '{"text":"","extra":[{"text":"Custom Paper","italic":false}]}'
custom-model-data:
==: CustomModelData
floats:
- 42.0
flags: []
strings: []
colors: []
Observed/Actual behavior
CustomModelData i...
ItemMeta is pretty much incapable of being run through DFU. This has been a long-term issue, and while random hack fixes have been employed over the years, this is generally just not something we feel is worth trying to chase. We will, at some point, serialise ItemStacks directly using SNBT so that we can run them through DFU/DataConverter. In the meantime, I'd suggest storing item stacks using the API to serialise them as bytes if you care about longevity, you can base64 them to store them as strings if needed
Is your feature request related to a problem?
Paper fixes tripwire hook duplications without an option to re-enable it.
Describe the solution you'd like.
Create a configuration option.
Describe alternatives you've considered.
None.
Other
No response
Preliminary "needs a docs PR" for when owen reads this.
Should this mention that the view is readonly?
(can be handled by merger) unnecessary diff noise?
Yea I guess the method would benefit from proper javadocs. If you can push it, I am not around rn.
The autosave option has been causing confusion for quite some time now
This change clarifies that disabling auto-save does not stop all saving operations.
This addition explicitly mentions that the world will still save on shutdown and explains the intended purpose of the method.
Can you check other br usages? Semi certain we put them in their own new like just for visual clarity in source.
Expected behavior
so that the items from the creative are visually removed, and not so that you have to re-enter every time after cleaning.
Observed/Actual behavior
Hello, I found such a bug that when I go into the creative and clear the inventory through the cross, it is not cleared visually, all things remain there, only after logging into the server the inventory becomes empty. There is no such thing in survival mode if you write through /clear, and then in the creative through / clear, the same thing does not visually disappear.
Steps/models to reproduce
items in creative mode are not visually cleaned even when using a cross or /clear, only after deleting and logging back to the server the inventory is cleared.
if you write a lot of times in the creative / clear, then it says that there are no items in the inventory.
Plugin and Datapack List
missing
Paper version
Paper version 1.21.4-138-main@5395ae3
Other
No response
Can you check other br usages? Semi certain we put them in their own new like just for visual clarity in source.
It seems to be very mixed
sometimes a paragraph tag is used instead, but I feel like this is weird
Do you have any mods installed on your client?
missing
Do you mean you have no plugins or that you don't want to provide the list?
Pretty sure paragraph tags are the standard for Java (and recommended in the docs), we do seem to use both though. Probably better to use <p>?
there are no plug-ins on the server except viaversion and viabackwards, and this is not present on other servers with the same version.