2debcaf More more patches, including hopper optimizatio... - kennytv
#paper
1 messages ยท Page 9 of 1
Just an initial idea for how to do the itemstack sanitization with the new stream codec system. Needs to be tested once compile issues are fixed.
OpenJDK has fixed the bug causing us to have to double-check in certain scenarios.
Tested on pterodactyl (where this issue was discovered) using the snippet below.
The snippet returns uid 0 for a non-root user on jdk 17. On jdk 21 (the requirement as of 1.20.5) it returns the correct, non-zero uid.
class PermsCheck {
public static void main(String[] args) {
System.out.println("id is " + new com.sun.security.auth.module....
Pretty sure that should be MAX_DAMAGE not MAX_STACK_SIZE
c364785 skip more comments and fix enforceSpace step fo... - Lulu13022002
I don't think we need to do the "nms copy" here. Just a CraftItemStack#unwrap to avoid an additional copy
Cache the "remove enchantments" patch instead of creating it again every time?
We need to use the tryParse method on Resource location here instead of the constructor. The tryParse method has extra validations checks. See how I did it for other setLootTable() methods using the Optionull utility.
Might be worth an asVanillaNotNull utility in PaperAdventure?
asNmsCopy is redundant here. Everything that stack is used for already makes a copy. This should use unwrap to save a copy
43d110e fix issue with item default attribute API - Machine-Maker
7e9da43 support patch versions in api-version - Machine-Maker
Expected behavior
Any entity that isnt moving shouldnt fire it, example an armorstand
Observed/Actual behavior
Placing an armorstand, waiting 1 minute (or boosting tickrate) and the packet it sent
https://github.com/PaperMC/Paper/assets/62521371/280817ee-dc7f-4d2b-a5de-329185234a92
Steps/models to reproduce
- Place an ArmorStand or any entity with no ai
- Wait 1 minute o...
IIRC entity movement packets use relative coordinates, so isn't that a works-as-intended periodic location synchronization?
Hello,
can the title please be changed to "1.20.6" tracking? Mojang is releasing this version because the developers have found a critical bug that needs to be fixed.
1.20.6 isnโt out yet
Okay, I meant that this should be changed when 1.20.6 is out.
Has there been any updates on this? I run a small paper server, and it's infuriating to get kicked making books sometimes as small as six pages, and not being able to modify the configuration in any meaningful way to fix it. I agree with joko that there should be some way to just disable the check.
I run a small Minecraft server, and we've been running into issues with the book size check. After struggling to find a suitable configuration, I've made this patch, which allows an admin to disable the book size check by setting page-max in paper-global.yml to -1. This should also fix issue #10354.
Please do not open pull requests from the master branch, create a new branch instead.
Re-creating this pull request because it was on the wrong branch last time and it was automatically closed. I run a small Minecraft server, and we've been running into issues with the book size check. After struggling to find a suitable configuration, I've made this patch, which allows an admin to disable the book size check by setting page-max in paper-global.yml to -1. This should also fix issue https://github.com/PaperMC/Paper/issues/10354.
19ac9d4 remove no longer needed patches and fix tests - Machine-Maker
e856d17 Update paper plugin check in PluginRemapper - jpenilla
Should be merged into patches/server/Book-Size-Limits.patch. Although i am not sure if this setting will be available after the update to 1.20.6 since minecraft also removes it.
Expected behavior
Expected to see continiously updating comparator. In Vanilla it works just fine.
Observed/Actual behavior
Comparator do not updating => Quasi Connectivity just loosing it's properties
Steps/models to reproduce
Dropper:
...
Apparently the jetbrains runtime specifically has better support for this which could be useful during development.
Expected behavior
While using this following command in
Vanilla: summon creeper ~ ~ ~ {ExplosionRadius:-1b,Fuse:0} will create an explosion
Paper: summon creeper ~ ~ ~ {ExplosionRadius:-1b,Fuse:0} the creeper will not explode
This is commonly used in Player Launch Datapack
Observed/Actual behavior
The creeper should explode, applying the motion to player
Steps/models to reproduce
Use this command: summon creeper ~ ~ ~ {ExplosionRadius:-1b,Fuse:0}
While Explosio...
Expected behavior
With this following code used for randomizing value between 1-3
{ "type": "minecraft:empty", "pools": [ { "rolls": { "min": 1, "max": 3 }, "entries": [ { "type": "minecraft:item", "name": "stone", "functions": [ { **"function": "minecraft:set_count", "count": 0** } ] } ] } ] }
When using "function": "minecraft:set_count", and count to 0 in , it should return a value of d...
5485043 Don't tell people to build the reobf jar - jpenilla
80bd015 fix adventure converters not using RegistryOps - Machine-Maker
Would fix #10443 if done.
This is a rough proposal for abstracting over the brains AI system for mobs for plugins to make use of, similar to the Goals API. I don't think it's feasible to attempt to make the new AI conform to the old interfaces.
At the moment I understand the rough skeleton and arteries of the system, though I'm still trying to piece together what does what in user-facing terms. 'get the mob to walk somewhere' has been unsuccessful so far.
As far as API stability conc...
Hello,
Is there an ETA for when 1.20.6 releases? I have no demands, just asking.
f85d423 improve dumpitem and pgive commands - Machine-Maker
That's a you-problem honestly.
I just wont use paper plugins, lol.
I don't think using parse(== decode) here would be appropriate.
Import it how you should. See contribution.md on how to handle NMS changes.
I'm totally against exposing that via method that way.
I personally prefer a key based approach, where you can use a paper api-generator module to generate these keys automatically. You can even generate the mapping for the keys automatically.
+ public @NotNull io.papermc.paper.entity.ai.Activity get(PaperActivity activity) {
See below, use api-generator and key based approach.
Feel free to reference https://github.com/PaperMC/Paper/pull/6968
This should support creating own sensors/memories via the bootstrap api.
LivingEntity#actuallyHurt should only return false when the damage event is cancelled which then prevents logic in actuallyHurt's overrides from running. If the entity is invulnerable to the damage source or no damage happens for some other reason, the logic in the overrides should still be executed.
... how do i use api-generator? i don't see any documentation in the repo
f933c35 Update DataConverter to 1.20.6-rc1 - Spottedleaf
55b1a87 fix PotionEffectType#getEffectAttributes - Lulu13022002
0b1b1fe fix helmet damage reduction inconsistencies - Lulu13022002
b7e148a Move obfhelper/stack deobf diff into original p... - jpenilla
a390119 Move cb version definition to gradle patch - jpenilla
d99d84a Temporarily comment out adventure jd links - kennytv
Expected behavior
Hopper transfers 64 items.
Observed/Actual behavior
Hopper only transfers 2 items.
Steps/models to reproduce
https://i.imgur.com/H3RMjBC.mp4
Plugin and Datapack List
none
Paper version
> ver
[08:13:42 INFO]: Checking version, please wait...
[08:13:44 INFO]: This server is running Paper version git-Paper-"8454786" (MC: 1.20.5) (Implementing API version 1.20.5-R0.1-SNAPSHOT) (Git: 8454786 on dev/1.20.5)
Error obtaining version information
...
4ad6022 improve checking handled tags in itemmeta (#9470) - Machine-Maker
7e3d5b5 bump paperweight to 1.6.2 to fix spurious build... - jpenilla
Fixed in 4ad6022ee3ba2219f8c56ad2cb92eba2fd3c7d34
[PaperMC/Paper] branch deleted: dev/1.20.5
how does the way tasks are exposed look?
f187fd6 Only scan org.bukkit.craftbukkit.inventory in... - jpenilla
Looks like that patch you linked no longer exists? I'll make the necessary changes to this PR, just want to get clarification on what changes to make. Also what exactly are you referring to for 1.20.6? Thanks!
https://github.com/PaperMC/Paper/commit/1444b3632e68ceb2e258e9cf733493a26a81d0ae#r141429072
How to reproduce it
final Scoreboard scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();
final Objective objective = scoreboard.registerNewObjective("test", Criteria.DUMMY, Component.empty());
objective.numberFormat(NumberFormat.styled(Style.style().color(NamedTextColor.BLUE).build())); // call asVanilla
objective.numberFormat(); // call asAdventure
Caused by:...
a3c4dc9 Fix the incorrect codec usage in the Style conv... - LemonCaramel
Expected behavior
Fireworks created with the following code can be used to call Paper API that require conversion to CraftBukkit/NMS.
ItemStack firework = new ItemStack(Material.FIREWORK_ROCKET);
firework.editMeta(FireworkMeta.class, meta -> meta.setPower(1));
Observed/Actual behavior
In my case, when calling ItemStack#serializeAsBytes, it throws NullPointerException (Full stacktrace).
M...
306b203 more fixes for ItemMeta relating to components - Machine-Maker
The conversation API will not be expanded to support Components - it will be deprecated entirely at some point.
Is your feature request related to a problem?
Since 1.20.5, there's a item-name data component for ItemStacks. Spigot added ItemMeta#setItemName(String) method, however, there also should be one for Adventure components.
Describe the solution you'd like.
ItemMeta#itemName(Component)
Describe alternatives you've considered.
Using internals or (terrible solution) LegacyComponentSerializer and ItemMeta#setItemName.
Other
No response
It still exists. Just search for Book-size-limit.patch in patches/server. The number in front can change.
I've already changed the method name and updated this to 1.20.5.
Stack trace
$ ./gradlew applyPatches && ./gradlew createReobfBundlerJar && start .
Configure project :
paperweight-core v1.6.2 (running on 'Windows 11')
Submodule path 'work/BuildData': checked out 'a7f7c2118b877fde4cf0f32f1f730ffcdee8e9ee'
Submodule path 'work/Bukkit': checked out '304e83eb384c338546aa96eea51388e0e8407e26'
Submodule path 'work/CraftBukkit': checked out '91b1fc3f1cf89e2591367dca1fa7362fe376f289'
Submodule path 'work/Spigot': checked out 'b698b49caf14f97a717afd6...
Delete your paper-api and paper-server dirs, then apply again
Delete your paper-api and paper-server dirs, then apply again
I did try this, didn't seem to work, but deleting whole folder and re-cloning from github seemed to do the trick.
I also have to do this periodically. I don't really know why either.
Because paperweight is an ever evolving tool and requires build config changes in order to work, you can just delete the build.gradle files for the same effect (without trashing the existing internal repos, useful if you're a dev)
seems to explain it. I had some weird build.gradle error but didn't think about that. I will try it the next time. Thanks.
Expected behavior
1.20.5 should be mojang mappings
Observed/Actual behavior
its spigot mappings
Steps/models to reproduce
download latest 1.20.5 dev from website
Plugin and Datapack List
N/A
Paper version
N/A
Other
No response
Not sure what you're looking at but the patched paper jar that the bootstrapper dumps out is 100% mojang mapped
Not sure what you're looking at but the patched paper jar that the bootstrapper dumps out is 100% mojang mapped
its spigot mapped, look: https://file.io/N5w17GS49ow2
is this a jar that you actually downloaded or a jar that you compiled yourself?
is this a jar that you actually downloaded or a jar that you compiled yourself?
compiled from paper github https://ibb.co/DR2rPMK
Yea, that is not a jar downloaded from our site, you build the jar wrong
Expected behavior
Yaml itemstacks are broken (for books)
Observed/Actual behavior
[11:54:29 ERROR]: [org.bukkit.configuration.serialization.ConfigurationSerialization] Could not call method 'public static org.bukkit.inventory.meta.ItemMeta org.bukkit.craftbukkit.inventory.SerializableMeta.deserialize(java.util.Map) throws java.lang.Throwable' of class org.bukkit.craftbukkit.inventory.SerializableMeta for deserialization
java.lang.NullPointerException: Cannot invoke "java.lang.Bool...
its looking for some "resolved" tag in the book, this tag ig is new to 1.20.5
can you please provide an 'afflicted' yaml file
can you please provide an affected yaml file
its hard to do, since its loading many files in the background, and for some reason the itemstack exceptions are in the background and untracable
its an unboxing issue
this.generation = SerializableMeta.getObject(Integer.class, map, CraftMetaBookSigned.GENERATION.BUKKIT, true);
if this returns null (which is expected sometimes), its cast to an int which causes exception
Yes, but I wanted to have an affected config file so I can know if any more need touching up
I managed to pinpoint the issue, its a signed book created by a plugin, so it only has these fields set in the yml:
'27':
==: org.bukkit.inventory.ItemStack
v: 2586
type: WRITTEN_BOOK
meta:
==: ItemMeta
meta-type: BOOK_SIGNED
display-name:
lore:
ItemFlags:
PublicBukkitValues:
title:
author:
pages:
6e31f38 Fix book meta lacking resolved tag from older v... - electronicboy
its not fixed, the error is with the generation tag, not resolved
looks like both are affected, this is why i asked for a yaml file
this.resolved = SerializableMeta.getBoolean(map, CraftMetaBookSigned.RESOLVED.BUKKIT); // Paper - General ItemMeta fixes
Integer generation = SerializableMeta.getObject(Integer.class, map, CraftMetaBookSigned.GENERATION.BUKKIT, true);
this.generation = generation != null ? generation : 0;
This is the proper fix
looks like both are affected, this is why i asked for a yaml file
I managed to pinpoint the issue, its a signed book created by a plugin, so it only has these fields set in the yml:
'27': ==: org.bukkit.inventory.ItemStack v: 2586 type: WRITTEN_BOOK meta: ==: ItemMeta meta-type: BOOK_SIGNED display-name: lore: ItemFlags: PublicBukkitValues: title: ...
also, whats the best way to disable auto remapping? its breaking plugins
java.lang.ExceptionInInitializerError: null
at CalendarEvents (2).jar/me.nikl.calendarevents.EventListener.<init>(EventListener.java:41) ~[CalendarEvents (2).jar:?]
at CalendarEvents (2).jar/me.nikl.calendarevents.EventsManager.<init>(EventsManager.java:45) ~[CalendarEvents (2).jar:?]
at CalendarEvents (2).jar/me.nikl.calendarevents.CalendarEvents.onEnable(CalendarEvents.java:43) ~[Calendar...
also, whats the best way to disable auto remapping? its breaking plugins
java.lang.ExceptionInInitializerError: null at CalendarEvents (2).jar/me.nikl.calendarevents.EventListener.(EventListener.java:41) ~[CalendarEvents (2).jar:?] at CalendarEvents (2).jar/me.nikl.calendarevents.EventsManager.(EventsManager.java:45) ~[CalendarEvents (2).jar:?] at CalendarEvents (2).jar/me.nikl.calendarevents.CalendarEvents.onEnable(CalendarEvents.java:43) ~[CalendarEvents (2).jar:?] at org.bukkit.pl...
Please use the Discord for support outside of server issues. This is something the plugin has to fix
Please use the Discord for support outside of server issues. This is something the plugin has to fix, as per our various announcements in the past
Add a system property to disable remapping. Also I cannot join the discord since im banned for no reason and my appeals are ignored.
[PaperMC/Paper] New branch created: advntr/itemname
d25906f Add itemName components (Resolves ##10467) - electronicboy
I'm not sure if I'm missing any conventions here, feel free to replace
This is generally a spigot issue due to them removing empty stacks from LootCommand#dropInWorld due to their own mangling of ItemStacks, should be easy to patch, just needs a few minutes of testing than I can commit to right now
Expected behavior
Should build
Observed/Actual behavior
net.kyori:adventure-bom:pom:4.17.0-SNAPSHOT was not found in https://papermc.io/repo/repository/maven-public/
Steps/models to reproduce
I tried updating repo to https://repo.papermc.io/repository/maven-public/
tried updating lombok, tried switching to java 21, still unworking
Plugin and Datapack List
N/A
Paper version
N/A
Other
No response
In a fork or paper itself?
You need to add
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") // TODO - Adventure snapshot
to subprojects.repositories in your root build.gradle.kts
Can be removed when a stable adventure version for 1.20.5 is released.
also its weird how bukkit still has legacy materials yet breaks enchantment/particle/potioneffect enums every minor update
Expected behavior
In 1.20.4 it was possible to use itemMeta.addItemFlags(ItemFlag.values()) to hide all item tooltips.
Observed/Actual behavior
The item tooltips are still present, and the returned item will cause an error while chunk saving, entity saving or using /paper dump item: https://pastebin.com/raw/sWPARh80
Steps/models to reproduce
Just get the "broken" item using something like
@EventHandler(priority = EventPriority.MONITOR)
public void listen(final @...
Expected behavior
When a plugin fails to remap the remainder continue to remap and load as normal
Observed/Actual behavior
When a remapping failure occurs no plugins are loaded
Steps/models to reproduce
New Paper 1.20.5 Build 10 Server
Add Plugins one of which does not remap correctly
Boot server
No plugins are loaded
 is shading classes multiple times, they should fix that/join paper-dev for help.
The version of PlaceholderAPI you are using also contains unsupported parsing code, though I think they fixed that in an update. The same applies to InventoryRollbackPlus and WanderingTrades. Make sure you are up to date (!) and if they still don't work, report it to the plugin authors: https://forums.papermc.io/threads/important-dev-ps...
This is not about a failure in remapping, this is about the server not loading any other plugins afterwards.
Accepted, machine is looking into it, should be a fast fix.
Expected behavior
Item serialization to yaml should work
Observed/Actual behavior
java.lang.IllegalStateException: List must have contents; List must have contents
at com.mojang.serialization.DataResult$Error.getOrThrow(DataResult.java:275) ~[datafixerupper-7.0.14.jar:?]
at org.bukkit.craftbukkit.inventory.CraftMetaItem.serialize(CraftMetaItem.java:1719) ~[paper-1.20.5.jar:git-Paper-"37b3891"]
at org.bukkit.craftbukkit.inventory.CraftMetaPotion.serialize(...
Expected behavior
Remapped libraries
Observed/Actual behavior
Libraries are not mapped when loaded through the Paper/Spigot Library Loader
Steps/models to reproduce
Use the spigot/paper library loader and remapping in manifest
Plugin and Datapack List
RDQ
Paper version
1.20.5
Other
No response
c4a1cd1 Fix issue with empty lists in adventure predicates - Machine-Maker
Just to note, doing this to an itemstack without also adding information for the tooltips to hide WILL NOT change the itemstack. In order for the hide to actually be saved, there must also be some data for it to hide. Except for the HIDE_ADDITIONAL_TOOLTIP which IS saved regardless.
Please provide example code on how to generate this item stack.
This is a issue-rich time for paper, creating replication code would be great to get such issues sorted out quickly.
Closing this, 1.20.5 is out in expeimental phase and ItemMeta#setEnchantmentGlintOverride
Please provide example code on how to generate this item stack. This is a issue-rich time for paper, creating replication code would be great to get such issues sorted out quickly.
It would be nice if there was some kind of debug message when an itemstack is failed to serialize, that outputs its nbt? Its very difficult to determine which item is failing serialization/deserialization
Then provide the yaml file failing (I presume this is another victim of "storing Itemstacks in Yamlconfiguration is dumb")
Then provide the yaml file failing (I presume this is another victim of "storing Itemstacks in Yamlconfiguration is dumb")
I can't, its an itemstack in memory that IDK what it is attempting to be serialized, can some debugging be added? would make things 100x easier
And how are you getting this item stack into memory???
You must have some clue where this is coming from...
Expected behavior
Command to not error and give you the player head
Observed/Actual behavior
When command is run this error is given: Malformed 'minecraft:profile' component: 'Not a string; Player name contained disallowed characters: '''
Steps/models to reproduce
Run Command: `give @p minecraft:player_head[minecraft:custom_name='"Basketball"',minecraft:profile={name:"",properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZ...
4491ac0 respect hard list size limits in ItemMeta - Machine-Maker
I was able to dump some of the problematic area (unhandledTags):
unhandledTags: {minecraft:can_break->Optional[AdventureModePredicate{predicates=[], showInTooltip=false}], minecraft:can_place_on->Optional[AdventureModePredicate{predicates=[], showInTooltip=false}]}
java.lang.IllegalStateException: List must have contents; List must have contents
at com.mojang.serialization.DataResult$Error.getOrThrow(DataResult.java:275) ~[datafixerupper-7.0.14.jar:?]
at org.bukkit.cra...
Adds a simple disguise api that also makes sure that invalid entity data, not belonging to the type that is faked, is filtered.
It also adds a server generator module to reduce maintenance of the entity data filter.
TODO:
- [ ] figure out how to get teams working with real teams, client side ones worked in my fork
- [ ] remove test plugin code
- [ ] comment paper-server-generator
- [ ] discuss if common generator code should be move to a separate module to reduce duplications
Okay perfect, great news for you then, this is already fixed in https://github.com/PaperMC/Paper/issues/10473.
Update and try again, lemme know if I can close this on latest.
aed7dca Fix overly strong name validation in player heads - kennytv
due to mojang moving logic around the arrow itemstack will now get removed before the event is even called. easiest way to deal with this seems to just give the player the itemstack back. This pr also still fixes to desync happening with PlayerReadyBowEvent and EntityShootBowEvent
52ff3b7 Add itemName components (Resolves #10467) (#10471) - electronicboy
[PaperMC/Paper] branch deleted: advntr/itemname
After the initial round of internal discussion, this is a tricky issue.
Remapping every library is annoying given this is mostly used for thirdparty libraries unrelated to minecraft (think kotlin standard library, hikaricp or the likes).
Remapping all of these libraries and their dependencies is a huge waste of disk space and computing power.
This might end up with us having to put some work on the shoulders of said library developers to include a similar "opt-in" to being remapp...
8bd60a8 [ci skip] feature requests are now discussions,... - kashike
[PaperMC/Paper] New branch created: discussions
[PaperMC/Paper] New branch created: fix/discussion-template-file-name
6eb2c3d [ci skip] Fix discussion template file name - NoahvdAa
It seems that spigot explicitly clamp the radius to 0.
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/nms-patches/net/minecraft/world/level/Explosion.patch#36
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/nms-patches/net/minecraft/world/level/Explosion.patch#57
be53945 Rewrite reflection in library loader jars - jpenilla
[PaperMC/Paper] New branch created: library-reflection
I think this might fail on versioned/multi-release classes?
82a8012 [ci skip] adjust projects workflow for label ch... - kashike
We have recently replace RequirePlugins with PluginControl. We monitor server restart, to ensure that PluginControl doesn't "blow up." If one allows auto-restart, it is straightforward to script to check that it starts with whatever logic is desired.
and if that plugin somehow happen chance blows up?
We have recently replace RequirePlugins with PluginControl. We monitor server restart, to ensure that PluginControl doesn't "blow up." If one allows auto-restart, it is straightforward to script to check that it starts with whatever logic is desired.
61c9c07 Fix CraftMetaBlockState adding extra tags - Machine-Maker
82b7d96 Serialize ItemMeta to SNBT to losslessly save I... - Machine-Maker
[PaperMC/Paper] New branch created: feature/snbt-serialization
Won't be it better to use https://jd.papermc.io/paper/1.20/org/bukkit/Registry.html#MATERIAL (or nms registry) to get the namespaced name instead of enum name?
(Including if we believe rumours that at all goes to items and blocks to be data driven, using the name from registry may be better for long term)
7f2d531 Rewrite reflection in library loader jars (#10608) - jpenilla
[PaperMC/Paper] branch deleted: library-reflection
17e7874 Remap plugin libraries with namespace set to sp... - jpenilla
[PaperMC/Paper] New branch created: remap-libraries-specifying-spigot-ns
Probably, however, out of 90 plugins, the one and only one that just needs to be added so that the server crashes when starting with openJ9 is Spark. So it's obvious that there is a problem with this particular plugin.
Whether it is related to an environment or not, my server is far from being the only one to be affected by this problem (and it is not hosted by a small host that no one knows...). Just type the keywords into Google to find out, in addition to the link I provided above.
I...
Edit : superiorskyblock fixed on his side to change uuid of entities, but the issue is still existing on paper side
88ccd5e Remap plugin libraries with namespace set to sp... - jpenilla
Tested basic remapping of local reobfed plugin.
05308fc Remap plugin libraries with namespace set to sp... - jpenilla
[PaperMC/Paper] branch deleted: remap-libraries-specifying-spigot-ns
Expected behavior
in BaseTag, the method isTagged(T) parameter name is "item" which is confusing, because it also applies to entity types now
Observed/Actual behavior
N/A
Steps/models to reproduce
N/A
Plugin and Datapack List
N/A
Paper version
This server is running Paper version git-Paper-"4491ac0" (MC: 1.20.5) (Implementing API version 1.20.5-R0.1-SNAPSHOT) (Git: 4491ac0)
You are 9 version(s) behind
Download the new version at: https://papermc.io/downloads/pap...
The term "Item" represents more than just minecraft items.
This is perfectly fine.
The term "Item" represents more than just minecraft items.
This is perfectly fine.
mehh, item has a specific meaning in the context of minecraft, but its whatever
Probably a good start https://github.com/PaperMC/Paper/pull/10478 need to address Javadoc and other todos.
With plugins adopting paperweights mapping namespaces in their manifest file in and after paper 1.20.5, incorrectly spelled namespaces previously were simply implied as the spigot namespace.
This commit properly ensures plugin authors are using a known mapping namespace in their manifest, avoiding down the line confusion on incorrect remapping behaviour.
The commit also fixes two incorrect log parameters.
Fix setter.
+ void setDisguiseData(@NotNull io.papermc.paper.disguise.DisguiseData disguiseData);
Just delegate.
+ return reset();
// include(":paper-server-generator")
This is like the item property api but split up into a lot of smaller chunks.
In this case, we replace item meta internally by a property map held on item stacks.
Opinions wanted:
- names
- serialization logic
Expected behavior
Being able to put SWEEPING_EDGE on a Sword / Item.
Observed/Actual behavior
Other enchants seem to work just fine, but when applying SWEEPING_EDGE, it will result in an error: https://pastebin.com/raw/J6kTz7wL
Steps/models to reproduce
Something like
@EventHandler(priority = EventPriority.MONITOR)
public void listen(final @NotNull PlayerJumpEvent event) {
final @NotNull ItemStack itemStack = new ItemStack(Material.DIAMOND_SWORD);
itemSta...
+ AIR(9648, 64), // Paper - air technically stacks to 64
+import org.jetbrains.annotations.Nullable;
I just noticed I used paper-api 1.20.4, hence the DAMAGE_ALL enchant, but the issue still occurs on a 1.20.5 plugin using userdev, even specifying the paperweight.reobfArtifactConfiguration = ReobfArtifactConfiguration.MOJANG_PRODUCTION property.
69a971a Reset component prototype on itemtype change - Machine-Maker
f9397e1 Fix incorrect Commodore mapping of sweeping enc... - Machine-Maker
Maybe it would be better if this was just updated in the pregen's documentation then. Hopefully if someone encounters this problem they will come across this discussion.
showInTooltip should accept a boolean.
Is there any use for this?
What's the use of these two? clearing should be done via an explicit clearPatchedData/resetData method or similar
This should just accept/return PatchedDataKeyMap directly and possibly be moved to ItemStack or a separate interface
This shouldn't be necessary, it'd be nicer to be able to have everything on ItemStack through implementing PatchedDataKeyMap directly (and renaming the methods to get/setData etc. for clarity)
Do we not want some kind of middle man object? So for example people could apply certain changes to multiple item stacks at once? (I would allow people to make their own patch sets)
I am not able to get this to work in vanilla singleplayer 1.20.4. I placed the blocks like in your screenshot and filled the hopper and dropper with the same items. However, nothing happens. The comparator just stays powered all the time.
Are there any additional steps required to get this to work? Is there anything else I should look for other than the power of the comparator?
+ PatchedDataKeyMap fromItem(Material material, ItemMeta itemMeta);
+ ItemMeta toItemMeta(Material material, PatchedDataKeyMap dataKeyMap);
+ boolean showInTooltip();
+ Unbreakable showInTooltip(boolean showInTooltip);
This feels a little bit too ambiguous. Is it removing the patch? Is it removing it entirely? Even if specified in javadoc, it will be often forgotten.
Maybe instead of remove method, it could be:
- set(Key, null) - forces the absence of the data ("!minecraft:tool")
- reset(Key) - removes the patch/resets to vanilla (default) value
- unset(DataKey.NonValued) - forces the absence of the key (no unit value in nms)
clone bad, should be copySomething
What exactly is the bug you are experiencing here? Listening to packets is not part of the Paper API. If something behaves weirdly there or breaks, its due to whatever you or ProtocolLib are doing with that packet. I am also not really able to see any obvious issue in your video.
Generally, the server will send inventory packets more often than required in a lot of cases to reduce the potential of desync, so just the ClientboundContainerSetSlotPacket getting sent while not required is not something that needs to be fixed.
We also would need to rule out that this is a ProtocolLib issue - sometimes just listening to a packet can have weird side effects. You could use a client-side packet logger for that.
So you can wrap around a patched map
There's no clearing here? This is used for declaring itemstacks.
If the remapped version hasn't changed however, there is a good (in my experience 75%) chance that it will work.
I don't think this is a good metric to use if you are basing it off of probabilities. Internals can change at any time even within a minecraft version, that's why they are called internals, and not API. Paper can make changes to internal mechanisms within a version's lifespan. The best way to know that no changes have been made to logic that is unmodified by paper, is the actual minecraft version. That has a 100% chance of changing whenever anything mojang writes changes, and a 0% chance of changing when mojang doesn't change anything.
I know this is already closed but just to let you know that with soft spoon approaching slowly, paper will more and more deviate from spigot. It's just a matter of time at this point :)
Should be formatted like so:
+ @org.jetbrains.annotations.NotNull Builder withCape();
These should all accept a boolean argument.
Expected behavior
Stone in stonecutter input slot
Observed/Actual behavior
No item in stonecutter input slot
Steps/models to reproduce
public void openStonecutterGUI(Player player) {
Inventory inventory = Bukkit.createInventory(null, InventoryType.STONECUTTER, "text");
ItemStack stone = new ItemStack(Material.STONE);
inventory.setItem(0, stone);
player.openInventory(inventory);
}
Plugin and Datapack List
no additional
Paper version
This server is running Paper version git-Paper-334 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 47b2c18)\nYou are 162 version(s) behind\nDownload the new version at: https://papermc.io/downloads/paper
Other
i have also tried setting the item after the inventory is opened, same issue:
public void openStonecutterGUI(Player player) {
Inventory inventory = Bukkit.createInventory(null, InventoryType.STONECUTTER, "text");
ItemStack stone = new ...
Can reproduce this on 1.20.5 (build later)
Expected behavior
1.20.5 introduced new gamerule spawnChunkRadius that can manage how many of spawn chunks should be always loaded. When setting to 0, no spawn chunks should be loaded.
Observed/Actual behavior
Gamerule keeps resetting back to 2 after each server restart.
Steps/models to reproduce
- Set gamerule to different setting than 2 (i.e.
/execute in minecraft:overworld run gamerule spawnChunkRadius 0or/gamerule spawnChunkRadius 0 - Restart the server
- Check gamerule - it resets back to 2 (i.e.
/execute in minecraft:overworld run gamerule spawnChunkRadiusor/gamerule spawnChunkRadius
Plugin and Datapack List
[23:17:10 INFO]: Bukkit Plugins:
[23:17:10 INFO]: - antiRedstoneClock, ChestShop, Citizens, ClearLag, CMI, CMILib, DeluxeMenus, DeluxeTags, DropEdit2, Duels
[23:17:10 INFO]: Factions, FastAsyncWorldEdit, Funkcijos, IllegalStack, InteractionVisualizer, LiteBans, LuckPerms, Multiverse-Core, OldCombatMechanics, PilisV2
[23:17:10 IN...
fbe3c00 [ci skip] update projects workflow configuration - kashike
Can reproduce this with commit 8f7ac62 on a clean server. Does not happen with any other game rules (maxEntityCramming at least)
this is still present in vanilla 1.20.5/6, still nothing from the Mojang devs unfortunately
I probably know what causes this. I added a migration to move the paper config setting to the gamerule, but didn't make it a versioned one, so it runs all the time, constantly using the value from the default world config.
[PaperMC/Paper] New branch created: update/1.20.6
5b962f8 Re-add dropped patches, mojang missed some stuff - NoahvdAa
[PaperMC/Paper] branch deleted: update/1.20.6
[PaperMC/Paper] New branch created: update-upstream
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
666f091c6 SPIGOT-7649: Allow /setworldspawn command in all worlds again
Might be hard coded by the client, cant get any other crafting stations to display items except for ones like furnace and brewing stand (that actually have containers on the server)
812ccb9 fix spawnChunkRadius gamerule resetting - Machine-Maker
Expected behavior
According to the wiki, creatures spawned using a Bucket of <creature> should be marked as persistent and not despawn. Note this seems to be a bug within vanilla Minecraft itself. I have also reported this to Mojang here.
Observed/Actual behavior
Placing creatures via Bucket of <name> doesn't properly give them the persistent tag, leading to them quickly despawning.
The fish didn't spawn with the persistent tag regardless of survival or creative, or whether placing the animal into water that was already there. It doesn't matter whether the item was obtained from the creative inventory, or was an empty bucket that later picked up a fish. It affects buckets of cod, salmon, tropical fish, pufferfish, axolotl, and tadpole.
Steps/models to reproduce
- Place a bucket of <creature>.
- Run
/data get entity @e[limit=1,sort=nearest,type=!player] - Note that the tag "PersistenceRequired" is equ...
handled via conversation
Remove has been split
[PaperMC/Paper] New branch created: pw-163
Are you sure the entities are actually despawning. Setting that tag isn't the only thing the game uses to know if the entity can be despawned.
General changes:
- DataKey -> DataComponentType (legit just went with vanilla names, we can trim names if need be)
PatchedDataComponentMapno longer hasremove, but hasunset, andreset. Which I think make the most sense in this case.- Reset will remove the patch present on the map
- Unset will unset it (so, like
!minecraft:tool)
- ItemStack now implements
PatchedDataKeyMapHolderwhich contains methods likesetDatawhich can be accessed on ItemStack directly, rather than needing to callcomponents()evey time
Builder Types:
- Unbreakable:
Unbreakable.unbreakable().showInTooltip(false).build() - ItemLore:
ItemLore.lore().lore(List.of(Component.text("h"))).build()
It should be noted that there are builder for most components for not-simple future-proofing. Advanced objects that might hold a bit more context to them...
Additionally it helps gain a little more power in the data component API (such has being able to get the style...
Paper should do something with entity handler
Static display entities with no ai should not kill the server
For example, there is a plugin called FartherViewDistance. It can send chunks to players without loading any entities.
It's life saver for now, but it's not enough. Even 15k display entities already drops tps to 16
Discussion Category: Ideas
ce74a14 Fix sealed package check in BytecodeModifyingUR... - jpenilla
[PaperMC/Paper] New branch created: fix-sealed
3fdd094 Fix sealed package check in BytecodeModifyingUR... - jpenilla
[PaperMC/Paper] branch deleted: fix-sealed
https://github.com/CubBossa/Disposables
Made a simple implementation of the disposables idea here since I had need for it in my projects
Discussion Category: Ideas
Expected behavior
ItemFlags set on an ItemStack are persisted and respected
Observed/Actual behavior
ItemFlags are only persisted and respected if the associated data is on the item.
example: Adding ItemFlag.HIDE_ENCHANTS does not get set/persisted if there are no enchantments on the ItemStack
Steps/models to reproduce
- Create and ItemStack
- Set an itemFlag which the stack doesn't have data for (ie ItemFlag.HIDE_ENCHANTS)
- Print out the set flags on the ItemStack
Plugin and Datapack List
Every plugin running is private but here is the list
[09:12:59 INFO]: Server Plugins (4):
[09:12:59 INFO]: Bukkit Plugins:
[09:12:59 INFO]: - EasyCommands, LocalMarket, RPG, YamlSaver
Paper version
[09:13:07 INFO]: Checking version, please wait...
[09:13:08 INFO]: This server is running Paper version git-Paper-27 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 937a67a)
Other
I have a feeling that this is a result of the backend da...
The hide flag is now stored on the enchantments, and so if the enchantments are null, there's nowhere to save them; Looks like we can in part mitigate this by trying to keep the list around more, but, that creates a whole bunch of potential issues relating to stack equality
This is intended, see the last comment in #10473
4ea67ab [ci skip] Remove trailing comma in projects action - kennytv
Added new pot decoration / charged projectiles type.
They definitely disappeared from my aquarium I built, but it's possible they simply died. I'm not sure what specifically you mean by "Setting that tag isn't the only thing the game uses to know if the entity can be despawned." Are you saying the presence of the FromBucket:1b tag or some other tag is enough to prevent it from despawning?
From the wiki:
Tropical fish caught in buckets then released do not despawn, unlike mobs that spawn naturally in their aquatic environments.
Yes, the from bucket check should be enough to prevent despawning.
Any suggestions on how to track whether they're despawning vs dying? Only thing I can think of is that EssX tracks named deaths, but that would require naming them thus messing up the despawning test
Wouldn't this be a great addition to the removal of relocation to provide a straightforward way of getting the version? I mean it would only work from 1.20.(5/6)+ but I guess it's good to include both in the same version so there is a nice and modern alternative.
Expected behavior
Bed explode after trying to use it in the Nether
Observed/Actual behavior
Bed breaks when trying to use it in the Nether
Steps/models to reproduce
Create a server on Aternos.org, use Paper MC software 1.20.6, try to use a bed in the Nether.
Plugin and Datapack List
Vanilla (built-in), file/bukkit(world), paper(built-in)
Paper version
This server is running Paper version git-Paper-28 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 8c058f8)
You are running the latest version
Previous version: git-Paper-25 (MC: 1.20.6)
Other
No response
fa6013d Fixes beds not exploding in the nether - Machine-Maker
3e0eb4a Updated Upstream (CraftBukkit) (#10624) - NoahvdAa
[PaperMC/Paper] branch deleted: update-upstream
Previously the call to getRandomItemWith() was missing the filter for damaged items. This would result in items with full durability being selected for mending.
Previously the call to getRandomItemWith() was missing the filter for damaged items. This would result in items with full durability being selected for mending.
Adds convenience method to get an opposite hand.
Allows this:
EquipmentSlot oppositeHand = hand.getOppositeHand();
Instead of this:
var oppositeHand = hand == EquipmentSlot.HAND ? EquipmentSlot.OFF_HAND : EquipmentSlot.HAND;
Adds a neat way to check for survival & adventure game mode
This is smth along the lines of what I had in mind. https://github.com/Machine-Maker/Paper/tree/feature/RecipeCraftEvent. Not 100% satisfied, its just a mockup pretty much. And it only handles quickmoves atm, not other types of clicks
Not working in 2ร2 crafting
Adds a missing fishing state when the fish is lured and fires an event for it.
Also adds a way to control the fish swimming time towards the bobber.
Adds a way to check whether the chest is blocked (due to the block above / a sitting cat).
CraftEnderChest's upper block check is hardcoded, so this PR uses ChestBlock's one instead (they are identical and the implementation makes no sense to change in the future), but if preferred, the check could be extracted into a separated method and used instead.
#hasColor makes little sense in API context since leather armor always has a color, hence #isDyed
Fixed a missing leather horse armor in javadoc alongside
PaperRegistry needs comments explaining what's going on with storage and getting (/why), otherwise looks good
I'd maybe go the other way, isInvulnerable
4cfd9e2 Expose canReach to mob pathfinding API (#10636) - SoSeDiK
I'd say BlockSearchPlayersEvent
I'd maybe go the other way, isInvulnerable
Sure, either one will do
This method is technically flawed, in that if someone manages to dye the armor with the exact color of 0xA06540 it'll appear as undyed. Is this issue or does it not really matter.
and here?
Also, this is technically duplicate API with getAllowedEditor. Should we deprecate the old one here?
Should we be calling this.ensureNoWorldGeneration(); here?
If you dye grass green, is it truly dyed?
I mean it 1:1 reflects hasColor so I wouldn't say it's an issue here. Just my opinion.
Thats's not how it works. It should update comparator constantly. Like, when hopper tries to get item from dropper it updates dropper => comparator updates. The vanilla hopper logic marks the source inventory as changed even if no item is moved out of it. That causes comparator updates constantly. It not visible in game. I'll send a video.
Possible solution:
Add to the hopper pull method
container.setChanged();
no var please, use a qualified import
Yes but it's craftbukkit's hasColor, which is not really great.
Regardless, it's probably fine. But just something to note.
I accidentally closed an issue. Sorry
Maybe something like?
+ default -> throw new IllegalStateException("Unable to determine opposite hand for hand: " + name());
It's not gonna be a hand, so the end of the sentence doesn't work. Though also: that should be IllegalArgumentException or something, the state one implies the application is in the wrong state to accept a query
+ default -> throw new IllegalArgumentException("Unable to determine opposite hand for equipment slot: " + name());
Something like this?
On a second thought is it necessary to throw an exception? Can't we just return null? Exception seems a little bit overkill, no?
returning null is generally crass, you're performing an operation which is enacting on an illegal argument to itself
Yea sorry it wasn't very clear what kind of update you meant.
The comparator block update issue is already tracked in #8441, thanks for the quick feedback, I'll close this as a duplicate then.
Added name() to the output and changed to IllegalArgumentException.
Initially went with IllegalStateException due to exceptions' javadocs interpretation, they are somewhat vague.
Is there a specific policy regarding vars? I don't see anything in contributing.md and Paper uses it in a bunch of other places similar to this one.
It's a constructor, so it should be obvious what's returned?
It's already noted in the javadoc:
has a color different from {@link ItemFactory#getDefaultLeatherColor()}
#setColor also notes that having "no color" is same as having the default one:
Setting it to null is equivalent to setting it to {@link ItemFactory#getDefaultLeatherColor()}.
Allow checking / forcing Halloween Season/Day via API.
Also makes a tiny "optimization" over vanilla by using the month/day ints directly instead of fetching from enum.
I would much rather we not redirect mojang calls into replacements from the bukkit singleton
Implementation is the same, plus forced enable/disable. The patch should fail in case vanilla changes anything.
Not overriding these kinda makes half of this API (forcing/disabling Hallowing) obsolete.
I generally in the long run want to start moving away from the Bukkit/Server "god" class, and so would generally prefer that we don't move implementation aspects to it
"For not a hand" still sounds weird. Why don't we replace it with "for equipment slot"?
What would be the alternative?
Without it, plugins won't have a common ground to communicate, and in this case it makes no sense to enable/disable Halloween and yet have no according behavior changes.
Create another class and proxy the calls to that; maybe others on the team won't care as much, however
return this.getHandle().connection.connection.proxyAddress instanceof InetSocketAddress inetSocketAddress ? inetSocketAddress : null;
Expected behavior
getPower() should return 1.0 at maximum bow tension
Observed/Actual behavior
getPower() at maximum bow tension returns the value 3
Steps/models to reproduce
run method getPower() in EntityShootBowEvent
Plugin and Datapack List
example plugin for send getPower() to chat
Paper version
This server is running Paper version git-Paper-22 (MC: 1.20.5) (Implementing API version 1.20.5-R0.1-SNAPSHOT) (Git: 8f7ac62)
Other
power is limited to 3.0 and not 1.0
yes, I was a little mistaken
So, this behavior looks like it WAI and that JDs are outdated, the server has an explicit * 3 to the "speed" (what gets referred to as force) in the path from some value which is capped to 1 based upon the use time
Did we check that the javadocs actually work here? The comma being in front on the same line might mess with the javadoc generation.
Is this really needed in the API? This can be re-created in a plugin easily.
Depends. You need to duplicate the perfectly working vanilla system (having another time check, changing equipment on some entities, controlling bat's spawn rules and keeping track of changes in the future) while also not having any communication with other plugins.
I'd love for plugins to be able to add features during Halloween while also providing a ground to control it from one place (Paper's a good source to depend on, unlike some obscure plugin). I don't think maintaining this is much of a pain.
Feel free to close if doomed unwanted though.
Expected behavior
In vanilla or spigot worlds a saved Chunk in a region files has 24 sections
Observed/Actual behavior
In paper a saved Chunk in a region file has 25 sections
Steps/models to reproduce
- Setup server
- Start server
- Open any region file using an NBT viewer
Plugin and Datapack List
none, just the server
Paper version
Other
I'm not sure if this could be considered a bug or if that is intended behaviour, some clarification would be great.
Expected behavior
EntityLoadCrossbowEvent setConsumeItem values should work as follows
true; consumes an item from the inventory
false: does not consume item from the inventory
Observed/Actual behavior
EntityLoadCrossbowEvent item consumption is working the opposite
Steps/models to reproduce
@EventHandler
public void onLoadCrossbow(EntityLoadCrossbowEvent event) {
event.setConsumeItem(false);
}
Plugin and Datapack List
This happens with no plugins installed
With a simple plugin with just the eventhandler above you can get the crossbow to comsume items
Paper version
[15:51:46 INFO]: This server is running Paper version git-Paper-34 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 544ce20)
Other
No response
This seems to be yet another issue caused by mojang moving projectile logic to ProjectileWeaponItem. That area would probably need to be skimmed through since all of that seems rather flawed
@Lauriichan Can you please provide the download to the region file? Feel free to DM @Owen on discord or put it here.
Expected behavior
I expected using Component.translatable(...) would work on Sign blocks. Using server-side translations with GlobalTranslator should show the translated text to the client in a line of a Sign that uses that implementation of Component.
Observed/Actual behavior
In lines that uses TranslatableComponent, it only shows the translation key as text instead of the actual translation from ResourceBundle. I've checked the keys and they're all correct. Styles as color and decorations work well, only the text shown is the problem.
Steps/models to reproduce
Just get a Sign block from a World and try to use Component.translatable(...) to write some of its lines. Update the Sign using the SignSide method.
Here is my code:
MinigameInfo info = minigame.getInfo();
Component[] lines = new Component[4];
lines[0] = Component.text(info.name() ...
Expected behavior
Adding lines of lore to a minecraft:shield in different ticks should work
Observed/Actual behavior
After setting the lore of a minecraft:shield in one tick you can no longer modify or clear the lore in following ticks
Steps/models to reproduce
// excerpt from test plugin using a command system
public boolean runCommand(Player player) {
ItemStack stack = player.getInventory().getItemInMainHand();
ItemMeta meta = stack.getItemMeta();
List<Component> lore = meta.lore();
if(lore == null || lore.isEmpty()) {
System.out.println("lore empty, adding line");
lore = new LinkedList<>();
lore.add(Component.text("This is lore line "+(lore.size() + 1)));
} else {
System.out.println("lore not empty, clearing");
lore = null;
}
meta.lore(lore);
stack.setItemMeta(met...
Looks like after further testing it might be more than just lore and include a lot of other item metadata (including custom plugin data added to the item)
I am able to reproduce this with the code provided with a shield item, not just any random item however.
Do you know where the base temperatures are? Your image of the wiki is dead and the list on https://minecraft.wiki/w/Biome#List_of_biome_climates is empty. If you have a class name, even better.
Discussion Category: Ideas
#I can see it just fine. Are we talking about another list?
Discussion Category: Ideas
woops just realized this breaks behaivour with bows cause someone decided those are not supposed to consume the the itemstack lol
alright should be fixed now
cc0b827 Updated Upstream (CraftBukkit) - Machine-Maker
[PaperMC/Paper] New branch created: update-upstream
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
66fd94322 SPIGOT-7652: Remove remap for SPELL_MOB_AMBIENT which no longer exists ecfa4f973 SPIGOT-7654: ItemStack#isSimilar does not work with empty BlockStateMeta 4460ecc49 SPIGOT-7655: ItemMeta#addItemFlags(ItemFlag.HIDE_ATTRIBUTES) not working when no attribute modifiers set 5d84f48a4 SPIGOT-7653: Update ApiVersion.CURRENT with latest version and include tests
@deadbeef-enc0de I'd appreciate if you could test out what you are doing by running the server linked in this PR with your plugin. I tested with the code you provided to reproduce, but this is an icky area, and it's also possible I created additional unforseen issues.
@Machine-Maker this looks like it did it. I can change lore, custom data, and other data on the item stack.
This was tested with both the Test plugin with the code above as well as the more complex plugin that found it in the first place.
Thanks.
7397d69 move test data to its own sourceset - Lulu13022002
weird, the content of that table doesn't appear for me.
by any chance, would you know where these values are hardcoded?
Discussion Category: Ideas
Ok, fixed the issue this introduced. We are going to keep the behavior of ItemFlag's not saving on itemstacks unless data that they hide is also present.
Add a comment explaining where this logic comes from, cause it's not super straight forward, in fact EnderChestBlock doesn't even use this method even though it does the same logic. I would add a // Paper - diff on change to the link in EnderChestBlock to catch any changes.
Add a comment explaining the general area this logic is taken from.
Timings or Profile link
N/A
Description of issue
Upon examining (after getting rate limited lol), I noticed paper nodes are making mojang api calls upon every player join which was interesting to me as velocity should forward all of this info.
Upon digging deeper I realized this is completely redundant.
ServerLoginPacketListenerImpl#callPlayerPreLoginEvents(GameProfile) gets called on all occasions, upon forwarding using velocity, or just generic standalone paper.
What's interesting is that the this call always gets executed even when it shouldn't need to.
This call ultimately results in either;
#1 The usercache needing to lookup this gameprofile again
#2 A mojang api call (this is the main issue, however saving some CPU usage in case #1 is also nice).
If y...
Added comments. I'm not the best at explaining things, so suggestions welcome
Agree, noted.
I've added sanity checks used in source, and the method grew a bit. I'm not using chest's exact check as it's also somewhat hardcoded in a sense that redundant data is fetched & throw-away objects are created, so instead the method mimics it using the same checks & logic. Not sure if that's acceptable, or if something else is preferred.
I think that the biggest question to me here is over the behavior of complete, if a profile is already completed, why is it doing lookups? I think that the class was generally designed in mind that the profile would be newly created from the API or server and just doesn't check that
Is your feature request related to a problem?
I noticed that paper 1.20.6 has something called "PluginRemapper" now. I don't quite understand yet what exactly it does, but I found it surprising that it casually overwrites the original .jar files in the plugins folder. None of the paper/spigot, forks has done it before, including paper and spigot itself. That's why I find this behavior not ideal: I don't expect the server software to modify other server's executable files in such an intrusive way.
Describe the solution you'd like.
Instead of modifying the original .jar files, I would rather prefer the PluginRemapper to write the modified files somewhere else, e.g. /cache/paper/remapped-plugins, and load modified plugins from there.
Describe alternatives you've considered.
As far as I understand, there's no way to alternate PluginRemapper's behavior to handle this issue at the moment.
Other
Also, I would like to note that when Mohist did a similar thing in the...
Discussion Category: Ideas
The plugin remaps a jar from spigots mappings over to papers (and redirects reflective calls to a tool intended to remap those); I wasn't aware that it modified jars in the plugins folder, that's news to me
(I'd also clarify that mohist wasn't remapping jars, they where downloading a jar off a 3rd party server to replace a jar you installed, entirely different scope of issues)
Discussion Category: Ideas
False alarm, It actually works in the way I described, instead, it writes to plugins/.paper-remapped
Discussion Category: Ideas
Okay, yea, I was correct in my original thoughts, paper does not modify the original plugin jars, they're remapped into a .paper-remapped inside of the plugins folder,; if you have stuff modifying your jars, I'd make sure that you don't have malware on your server
Discussion Category: Ideas
I think that the biggest question to me here is over the behavior of complete, if a profile is already completed, why is it doing lookups? I think that the class was generally designed in mind that the profile would be newly created from the API or server and just doesn't check that
Yup, Iโll push something in a minute
This is a one liner actually,
if (onlineMode && (!isCompleteFromCache || textures && !hasTextures())) {
should be
if (onlineMode && (!isCompleteFromCache || (textures && !hasTextures()))) {
In CraftPlayerProfile#complete(boolean, boolean)
I think that the biggest question to me here is over the behavior of complete, if a profile is already completed, why is it doing lookups? I think that the class was generally designed in mind that the profile would be newly created from the API or server and just doesn't check that
โฆinfo already (fixes #10648)
How does this affect game profiles with outdated info? Havenโt read this but does this prevent game profiles with outdated names / skins from being correctly updated?
How does this affect game profiles with outdated info? Havenโt read this but does this prevent game profiles with outdated names / skins from being correctly updated?
Really all this does is make it so gameprofile checks are fully handled on velocity (having paper do them as well is redundant)
outdated info is, afaik, generally not updated unless something goes out of it's way to do that. There is generally no manner in which this method is called in which we're not just calling complete because we're expecting a new game profile, or that we're trying to recycle something old; I don't think that this will generally have an impact on anything reasonable
outdated info is, afaik, generally not updated unless something goes out of it's way to do that. There is generally no manner in which this method is called in which we're not just calling complete because we're expecting a new game profile, or that we're trying to recycle something old; I don't think that this will generally have an impact on anything reasonable
Indeed shouldn't, you could make the argument that you'd want to validate the gameprofile every time a user swaps sub-servers (which I wouldn't want, as a server owner), but there is very little reason to have this. If a user wanted to stay online with an expired profile they could also just not swap subservers ๐คท
I marked this as low priority, because the fix for this is currently pretty ugly as it would require re-creating specific packets for each player instead of using the same packet data for all players it's being sent to. The reason this same problem doesn't apply to other areas, is that the text is "translated" as it's written to the bytebuf, so after the packet has been created. It's very possible mojang will also change block entities to a similar system in the future, and this is more feasible then. You can see where I got to on this branch.
:)
Discussion Category: Ideas
Looking into the code I don't think it makes sense to address this functionality before we converted the Biome enum to a class (I think this is going to happen). Right now, you cannot directly add this method to Biome so you would have to add it to World. And this is ugly considering its just a temporary "fix" until we get BiomeType.
Discussion Category: Ideas
The missing field is the wind charge damage type locked under the update_1_21 feature flag.
Fix more items desync where items might still disappear on the client for the EntityPlaceEvent and PlayerBucketFillEvent.
Am also running this in a production environment with hundreds of concurrent players without any issues so far
Expected behavior
Applying this attribute should hide weapon damage in tooltip
Observed/Actual behavior
It doesn't
Steps/models to reproduce
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES)
Plugin and Datapack List
N/A
Paper version
This server is running Paper version git-Paper-"0db72ac" (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 0db72ac)
You are running the latest version
Previous version: git-Paper-"8f7ac62" (MC: 1.20.5)
Other
No response
Not a clientside issue because when using 1.20.5 client on 1.20.4 server with viaversion the attributes are hidden correctly
You have to actually set some attributes to hide. The way ItemFlag works has changed, for all except the "additional info" one, you actually have to set some data in order to have the hide flag actually do anything.
You have to actually set some attributes to hide. The way ItemFlag works has changed, for all except the "additional info" one, you actually have to set some data in order to have the hide flag actually do anything.
You can still hide default attributes, viaversion can do it
Stack trace
paste your stack trace or a paste.gg link here!
Plugin and Datapack List
paper 1.20.6 server
kicked client minecraft 1.20.2
kicker client Forge 1.20.1 version of forge 47.1.46
Actions to reproduce (if known)
load a crossbow with a specrtal arrow in paper server mc version 1.20.6 and shoot it at a player. the player will be arrow banned off the server
Paper version
Unknown im not the owner
Other
That's not a Paper issue, probably down due to outdated plugins
The hide attributes flag is stored on the attributes data, so, in order to handle this, you'd need to supply an attribute component, supplying an attribute component, however, will override any default attributes provided by the item itself, so, yes, you can do it, but, not without side effects
The hide attributes flag is stored on the attributes data, so, in order to handle this, you'd need to supply an attribute component, supplying an attribute component, however, will override any default attributes provided by the item itself, so, yes, you can do it, but, not without side effects
How could I do this via plugin? Or do I need NMS
The ItemMeta does not expose the ability to do this via the API (and will be prone to removing it in certain cases). We cannot expose this ability due to the unintended side-effects, and have generally reverted spigots attempt at doing this because it breaks expectations.
Expected behavior
When flying around alone on a server, I expect the chunks that I pass to eventually unload.
Observed/Actual behavior
Once they're loaded, chunks never unload as shown by the /paper chunkinfo command. (inactive)
/paper holderinfo also shows the unloadable, but not unloaded chunks.
Essentials /gc does show a normal count though (around 200 for 1 player)
Steps/models to reproduce
What I did is:
- Create a new server with paper 1.20.4 build 496
- Execute
/paper chunkinfoto get a baseline - Execute
/save-off - Fly around in creative a little
- Execute
/paper chunkinfoagain to see the "inactive" count filling up without it ever going down./paper holderinfoalso shows some important info
Bonus: execute /save-on and watch the unloa...
This behavior is 100% intended by mojang, they don't unload chunks because they can't save them, and there's generally 0 expectation that chunks in a world session are going to be lost
some of the classes here are imported and some use the fully qualified name (even if they are imported)
just use imports for everything, its a class we add so no risk of dum conflicts
I would keep the empty line here and below to have nicer looking diff
MAJOR nit pick but if you name the arugment packet the method looks a whole lot nicer, lol
Tested with:
https://gist.github.com/yannicklamprecht/639acba127a54f5617e1281f099b7aff
Only open part is the discussion for a common generator module
Expected behavior
Commands should not be logged if disabled in spigot.yml (commands.log)
Observed/Actual behavior
Commands are indeed logged
Steps/models to reproduce
disable commands.log in spigot.yml
execute a command
Plugin and Datapack List
[17:31:30 INFO]: Server Plugins (7):
[17:31:30 INFO]: Paper Plugins:
[17:31:30 INFO]: - Commander, HologramAPI, Protect, Tweaks, Worlds
[17:31:30 INFO]: Bukkit Plugins:
[17:31:30 INFO]: - FastAsyncWorldEdit, LuckPerms
datapack list
[17:31:33 INFO]: There are 6 data pack(s) enabled: [trade_rebalance (feature)], [bundle (feature)], [vanilla (built-in)], [file/bukkit (world)], [file/tectonic.zip (world)], [paper (built-in)]
[17:31:33 INFO]: There are no more data packs available
Paper version
git-Paper-37 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 156675c)
Other
Fixed this issue once
https://github.com/PaperMC/Paper/pull/8624
spigot didn't handle this for unsigned command packets
true, /msg for example doesnt get logged unless the syntax is invalid
should i make a pr?
fixed the option commands.log in spigot.yml again
unsigned commands are logged even if command execution logging is disabled
fixes https://github.com/PaperMC/Paper/issues/10658
We should probably move the common generator classes into a separate module to reduce duplications.
this is complicated enough that we prolly want a lil docs page with an example, but that can wait till after its merged and we know the final api design
8aab543 Add RegistryKeys for all other non-server-backe... - Machine-Maker
this is complicated enough that we prolly want a lil docs page with an example, but that can wait till after its merged and we know the final api design
Thought of adding a Java 18+ snippet to the javadoc but a docs page will be better.
f87d71a remove Experimental annotations - Machine-Maker
[PaperMC/Paper] branch deleted: feature/RegistryAccess
5632210 add RegistryAccess for managing registries (#10... - Machine-Maker
There is something weird going on with shields, .setItemMeta() for specifically shields doesn't seem to work?
@ThrowerWay Test with the PR linked above
Is your feature request related to a problem?
My problem is caused by the fact that the blocks are replaced either with stone or with already prepared ones, and I want that the replacement will look natural
Describe the solution you'd like.
I want the blocks that need to be hidden to be replaced by those blocks that are on the bottom or if there is empty, then with the block that is on the side or on top
Describe alternatives you've considered.
I tried using Orebfuscator and decided to switch to RayCastAntiXray and it doesn't have such a feature as I wont
Other
For exmple this is without antixray
This is paper angine mod 1
 (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 0db72ac)
You are 3 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: git-Paper-26 (MC: 1.20.6)
Other
No response
Stack trace
[20:51:10 ERROR]: Error sending packet clientbound/minecraft:disconnect (skippable? false)
io.netty.handler.codec.EncoderException: Sending unknown packet 'clientbound/minecraft:disconnect'
at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:46) ~[paper-1.20.6.jar:git-Paper-38]
at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:20) ~[paper-1.20.6.jar:git-Paper-38]
at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:26) ~[paper-1.20.6.jar:git-Paper-38]
at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:12) ~[paper-1.20.6.jar:git-Paper-38]
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty....
7401313 fix shear drops for wolf and bogged - Machine-Maker
This can be merged into the general logging changes patch that we have. Either author can do that or whoever merges this.
With my plugins: Citizens, CMI, CMILib, DeluxeMenus, FastAsyncWorldEdit, PL-Hide, PlaceholderAPI, WorldGuard
Shows the same thing
there are multiple ways. you can just go inside Paper-Server and soft reset the commit you created, then stash your changes, rebase edit the commit like explained in the contributing.md, stash pop, and then just continue like the contributing.md says
Thanks, but I was more confused about the general logging changes patch
because i couldn't find anything like that
i feel like this is hard to properly implement. what if the block is of the same type? that would basically render the anti xray useless for certain scenarios since the ore would still be shown. and since basically no xray shows stone/netherrack blocks anyways you could just use engine mode 1
Discussion Category: Ideas
Stumbled on that as well. I experienced it without plugins, using runDev via IDE. My client pinged the server fairly early using the mulitplayer serverlist actively spamming the refresh.
Expected behavior
Spawn eggs shouldn't lose data after using them
Observed/Actual behavior
Spawn eggs do lose data after using them
Steps/models to reproduce
- Give yourself a custom spawn egg, e.g.
/give @p chicken_spawn_egg[entity_data={id:"minecraft:cow"}] - Use the spawn egg once and notice how a cow is spawned
- Use the spawn egg a second time and it will now spawn a chicken
Plugin and Datapack List
No plugins or data packs
Paper version
This server is running Paper version git-Paper-40 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 7401313)
You are running the latest version
Previous version: git-Paper-462 (MC: 1.20.4)
Other
No response
Pretty sure that this is purely due to a race condition in the vanilla server init logic, the connection exists before the packets are actually registered or something
Let's hope that it will be fixed soon :)
Replicable. Missing data restoration after consumption in ServerPlayerGameMode#useItemOn
Let's hope that it will be fixed soon :)
It's nothing that harms the server. So no real issues, just a cosmetic problem in the log.
The craftbukkit implementation stores the old and new data patch of an item during ItemStack#useOn(UseOnContext) to properly cancel events via comparison and change detection of the component patch.
However, it uses #getComponentsPatch to fetch the new stack component patch, which always yields an empty patch set if an itemstack is considered empty by the game.
As the restoration of an itemstack's count to its previous state is handled after the entire ItemStack#useOn method, items used in creative mode temporarily have a count of zero, which causes craftbukkit to consider their new component patch as EMPTY even tho said item may have data.
The new patch is applied and, after useOn completes, the count is reset if the player is in creative mode, leading to lost data.
This commit fixes said inconsistency by directly accessing the components of the item via components#asPatch, storing the proper component patch even for an item that temporarily has a count of zero.
Resolves...
7ae2c67 Keep components using single items in creative ... - lynxplay
Expected behavior
shouldn't consume arrow
Observed/Actual behavior
it consumes it
Steps/models to reproduce
cancel entity bow shoot event
Plugin and Datapack List
N/A
Paper version
This server is running Paper version git-Paper-"0db72ac" (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 0db72ac)
You are 5 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: git-Paper-"8f7ac62" (MC: 1.20.5)
Other
No response
Expected behavior
If you have an item with NBT within a shulker serialized into yaml, after deserialization the item should have nbt?
Observed/Actual behavior
All items in the shulker are stripped of nbt (yikes)
Steps/models to reproduce
Serialize itemstack to yml
Plugin and Datapack List
N/A
Paper version
This server is running Paper version git-Paper-"7ae2c67" (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 7ae2c67)
You are running the latest version
Previous version: git-Paper-"0db72ac" (MC: 1.20.6)
Other
No response
[PaperMC/Paper] New comment on issue: #10666 Shulkers loaded from bukkit yml have no nbt on contents
IMO remove/hard deprecate itemstack yaml serialization entirely, its very dangerous.
[PaperMC/Paper] New comment on issue: #10666 Shulkers loaded from bukkit yml have no nbt on contents
Yea, we have been thinking about it for a while.
I don't think there is much saving we can do for you on any of these issues.
[PaperMC/Paper] New comment on issue: #10666 Shulkers loaded from bukkit yml have no nbt on contents
Yea, we have been thinking about it for a while. I don't think there is much saving we can do for you on any of these issues.
Don't worry, luckily this was caught in testing, I plan to migrate entirely away from yaml, however, I worry for others.
Stumbled on that as well. I experienced it without plugins, using runDev via IDE. Server was in startup and my client pinged the server fairly early using the mulitplayer serverlist actively spamming the refresh.
I can replicate that, so it may be the same issue however it's not exclusive to server start up as I've had it occur long after. I cannot replicate it after startup, but I am locally hosting so that's probably why.
b13c7db Add missing experimental field and annotations ... - Lulu13022002
9d8d38d Updated Upstream (CraftBukkit) (#10646) - Machine-Maker
[PaperMC/Paper] branch deleted: update-upstream
i am already fixing this in #9949 though i assume upstream is gonna fix that issue before that gets merged since they are aware of the issue
[PaperMC/Paper] New comment on issue: #10666 Shulkers loaded from bukkit yml have no nbt on contents
@ThrowerWay can you clarify what you mean by "an item with NBT"? I tested this by putting 2 stacks in an anvil and renaming them, then putting them in a shulker. after serializing to yaml and back, they still had the custom names. Did you mean actually "custom" nbt, like in the custom_data component?
please, add to this issuse status tags - type: bug, and version: 1.20.6
0e43d3c Added API to get player's proxy address (#10400) - nostalfinals
54c5ecb Add missing SpigotConfig logCommands check (#10... - NonSwag
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.
816ea9e [ci skip] Update old particle reference in java... - Lulu13022002
21d91ce Prevent profile lookups when unnecessary (#10651) - bridgelol
2a6a5fe Add a way to check whether the chest is blocked... - SoSeDiK
While the code generally looks good, could you elaborate a bit on what the usecase for such a setter is?
At least a setter for anything that isn't just null?
Having a bit of a hard time thinking of a usecase that would have a developer set the allowed uuid but not open the sign editor, given this value is terribly fleeting and is reset when the set uuid player is too far gone.
[PaperMC/Paper] New comment on issue: #10666 Shulkers loaded from bukkit yml have no nbt on contents
@ThrowerWay can you clarify what you mean by "an item with NBT"? I tested this by putting 2 stacks in an anvil and renaming them, then putting them in a shulker. after serializing to yaml and back, they still had the custom names. Did you mean actually "custom" nbt, like in the custom_data component?
Some exact reproduction steps would be good, cause I can't seem to reproduce this.
try upgrading from 1.20.4, by custom nbt i mean, lore, display name, enchants, persistant data container etc.
We did some heavy refactor during a merge session, could you please give your input on our changes, thank you :)
[PaperMC/Paper] New comment on issue: #10666 Shulkers loaded from bukkit yml have no nbt on contents
Can you send some itemstacks serialized into yaml in 1.20.4 so I can test upgrading them?
[PaperMC/Paper] Pull request opened: #10667 Fix hopper pull event being skipped after the first call
Fix Owen's issue with hopper. When the InventoryMoveEvent#getItem/setItem are not called for a hopper pull from another container, the later events are skipped. However the boolean that track this state was never reset afterward.
Looks fine, I like it ๐
Expected behavior
If the server reaches the maximum of players, all other players should be disconnected.
Observed/Actual behavior
e.g. i send 4 players on a velocity server onto another backend server with maximum of 2 players, all 4 players can connect.
Steps/models to reproduce
Setup a network with velocity and two backend servers
set the maximum players of the other server than the lobby to e.g. 2
send more than 2 players to the backend server with the maximum players of 2
Plugin and Datapack List
[00:11:37] [Server thread/INFO]: Server Plugins (8):
[00:11:37] [Server thread/INFO]: Paper Plugins:
[00:11:37] [Server thread/INFO]: - SignedVelocity
[00:11:37] [Server thread/INFO]: Bukkit Plugins:
[00:11:37] [Server thread/INFO]: - CloudNet-Bridge, FastAsyncWo...
Adds a cancellable event that gets fired whenever a dispenser would spawn a entity (mainly useful for projectiles and primed tnt).
Workarounds for this would involve cancelling the entire event per item stack which in my opinion is not the best solution. Another workaround would be to use ASM or similar to manually adjust the source code. Or one could use NMS to manually override the dispense behaviors, which would be more effort over all though.
Mojangs logic is generally not designed to deal with race conditions, and most solutions that I can think of that would deal with this would generally only aid in the potential to cause more harm to a server, especially with such lower player counts. I think that the general solution here would generally be to deal with that elsewhere such as on a proxy
I think a new event for that would be unnecessary
The item dispense event is enough in my opinion
You can easily check whether an item is a spawn egg or a projectile or any other kind of entity when dispensed
Yes, i could do that, but i will only have access to exactly the item using that approach. And for what i want to do i need access to the entity created when dispensed and the dispenser itself. Correct me if i'm wrong, but ItemDispenseEvent only gives access to the item.
And i would need to replicate the entire logic for entity spawning through dispensed items (e.g. eggs, tnt, arrow and so on) for it to be accurate.
The other way that i'm aware of is using ASM or mixins or similar to achieve this or to use NMS and to re-register all the dispenseBehaviors with altered code.
you could listen to the entity spawn event caused by dispensers
Iirc there is just an entity spawn event, no? Haven't seen one specific for dispensers. And iirc the entity spawn event lacks a "reason" or context what spawned the entity or am i missing something here?
Expected behavior
I expect this method to work like on 1.20.4
Observed/Actual behavior
When using the hover event to show item, the vanilla/base item is shown, and no modifications are show (ex: enchantments, display name).
<img width="288" alt="Screenshot 2024-05-06 at 9 32 07โฏAM" src="https://github.com/PaperMC/Paper/assets/20008482/901268f4-b0ec-4411-870a-408b4196f5d2">
Steps/models to reproduce
Test Code:
ItemStack itemStack = new ItemStack(Material.DIAMOND);
itemStack.editMeta(itemMeta -> {
itemMeta.displayName(Component.text("Mr Diamond"));
itemMeta.addEnchant(Enchantment.SHARPNESS, 3, true);
});
TextComponent letsSeeThatItem = Component.text("lets see that item");
BinaryTagHolder binaryTagHolder = BinaryTagHolder.binaryTagHolder(itemStack.getItemMeta().getAsString());
HoverEvent.ShowItem showItem = HoverEvent.ShowItem.showItem(itemStack.getType().key(), 1, binaryTagHolder);
TextComponent textComponent = letsSeeThatItem.hoverEvent(...
i didn't look at the implementation of this so i am not sure if this is possible but perhaps you could expand on the BlockDispenseEvent by adding a getEntity or something similar
BinaryTagHolder doesnt work anymore, you should use ItemStack#asHoverEvent
oooo awesome, ok thank you!
No problem, had the exact same issue the day after release of paper 1.20.5.
Iirc there is just an entity spawn event, no? Haven't seen one specific for dispensers. And iirc the entity spawn event lacks a "reason" or context what spawned the entity or am i missing something here?
Entit#getEntitySpawnReason()
ok, that gets me the reason, but for what i want to do i need to have access to the dispenser too. ANd having to scan every of the 14 blocks around the entity is not an option
i didn't look at the implementation of this so i am not sure if this is possible but perhaps you could expand on the BlockDispenseEvent by adding a getEntity or something similar
EDIT: also you can just relocate the current pr to the master branch you don't to create a new one
Hm, good idea
I think this duplicates a lot of what is proposed in https://github.com/PaperMC/Paper/pull/7377.
I think this duplicates a lot of what is proposed in #7377.
Looks like it. Will still keep this open though, cause the PR you mentioned hasn't been touched in quite some time.
Vanilla expects item components instead of a single nbt compound now. asHoverEvent will handle populating the component map for you.
I tried it, and it works perfectly :) thanks!
I guess you guys can close this issue.
5f2a82a Fix ping event always receiving protocol version 0 - jpenilla
[PaperMC/Paper] New branch created: fix-ping-event
9e51f94 Fix ping event always receiving protocol versio... - jpenilla
[PaperMC/Paper] branch deleted: fix-ping-event
89ad61f Fix hopper pull event being skipped after the f... - Lulu13022002
The idea of adding an entity to the existing dispense event is actually pretty good.
It could return a nonnull entity in every case because the item entity could also be returned.
Addressed theses.
Discussion Category: Ideas
9d827db Correctly compare holders in beacon fix - lynxplay
[PaperMC/Paper] New branch created: bugfix/fix-invalid-holder-comparison-in-beacon-fix
[PaperMC/Paper] branch deleted: bugfix/fix-invalid-holder-comparison-in-beacon-fix
eee55d0 Correctly compare holders in BeaconMenu (#10673) - lynxplay
Just noting here for prosperity, we had a bit of an internal discussion regarding this and generally posit that the better idea would be to make the stack itself store the SNBT and get ItemMeta out of the picture, that way we stay closer to what vanilla is doing here and have something we can almost directly just pass into DFU/DataConvertor without worrying how broken ItemMeta is, especially when it comes to the upgrade path (or complete lackthereof)
Good catch, though I believe it needs to be re-added in the other branch of the if-statement. But you could also drop the if-statement and just do
final LiteralArgumentBuilder<CommandSourceStack> builder = Commands.literal(aliasLiteral)
.executes(redirectTo.getCommand())
.redirect(redirectTo)
.requires(redirectTo.getRequirement())
for (final CommandNode<CommandSourceStack> child : redirectTo.getChildren()) {
builder.then(child);
}
return this.registerIntoDispatcher(new PluginCommandNode(aliasLiteral, plugin, builder.build(), description), override);
Just noting here for prosperity, we had a bit of an internal discussion regarding this and generally posit that the better idea would be to make the stack itself store the SNBT and get ItemMeta out of the picture, that way we stay closer to what vanilla is doing here and have something we can almost directly just pass into DFU/DataConvertor without worrying how broken ItemMeta is, especially when it comes to the upgrade path (or complete lackthereof)
Do you mean a format similar to
item:
==: org.bukkit.inventory.ItemStack
version: 3839
id: minecraft:shulker_box
count: 1
components:
minecraft:container:
- slot: 0
item:
id: minecraft:oak_log
count: 64
- slot: 1
item:
id: minecraft:oak_log
count: 64
- slot: 2
item:
id: minecraft:oak_log
count: 64
- slot: 3
item:
id: minecraft:oak_log
count: 64
- slot: 4
item:
id:...
No, mojang saves itemstacks using NBT still, we'd just align ItemStack itself with that, rather than trying to keep ItemMeta in the mix (i.e. ItemMeta goes, the patch stays as snbt stored against the ItemStack itself, just like mojang does on disk)
5729b29 Update Adventure to 4.17.0 Release - electronicboy
Related to #10405 (and various other console issues, such as being unable to run the jar on windows without a terminal)
There are various libraries relating to our logging + terminal framework which are outdated, updating this stuff may aid with mitigating this. Creating this issue as a reminder unless somebody wants to take over the assignment.
the author of the paper core.. Please read this and fix it, this error is clogging up the console very much(
e21ab95 Update terminal dependencies - electronicboy
[PaperMC/Paper] New branch created: chore/terminal
Need to also look into log4j, but, so far
-
Updated to jline-terminal 3.26.1 - jline, however, has deprecated their jansi provider,
and so, we're going back to JNA. FFM looks interesting, but, might not work on java 21,
and, seems to requore some additional java flags to open stuff up to allow it to work,
however, seemed to work without on macOS? -
added a hackaround to try to migate the terminal issues we're facing on windows, will
probably look towards adding a detection step for PS7 so we can disable the hack, but,
in the meantime, this at least works around the issue.
(Closes #10674)
(Closes #10405)
Cross ref: https://github.com/jline/jline3/issues/952
The command source type for Brigadier commands registered using Paper API.
<p>While the general use case for CommandSourceStack is similar to that of {@link CommandSender}, it provides access to important additional context for the command execution. Specifically, commands such as {@literal /execute} may alter the location or executor of the source stack before passing it to another command.</p>
Implementing this interface allows for easily creating "Bukkit-style" {@code String[] args} commands. The implementation handles converting the command to a representation compatible with Brigadier on registration, usually in the form of {@literal /commandlabel <greedy_string>}.
Vanilla Minecraft includes several custom {@link ArgumentType}s that are recognized by the client. Many of these argument types include client-side completions and validation, and some include command signing context.
<p>This class allows creating instances of these types for use in plugin commands, with friendly API result types.</p>
<p>{@link CustomArgumentType} is provided for customizing parsing or result types server-side, while sending the vanilla argument type to the client.</p>
+ * A component serializer for converting between {@link Message} and {@link Component}.
Might be nice to have a specialized subtype for the single-value resolvers with a resolveSingle method.
Expected behavior
I wish PluginRemapper could be switched off in paper-global.yml or somewhere else, because in version 1.20.6 I found a lot of plugins being switched off due to problems caused by Remapper!
Observed/Actual behavior
[ModernPluginLoadingStrategy] Could not load plugin 'PlaceholderAPI.jar' in folder 'plugins.paper-remapped'
org.bukkit.plugin.InvalidPluginException: java.lang.ExceptionInInitializerError
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:127) ~[paper-1.20.6.jar:git-Paper-53]
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:35) ~[paper-1.20.6.jar:git-Paper-53]
at io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:116) ~[paper-1.20.6.jar:git-Paper-53]
at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(Sim...
Plugin & Datapack List
none
I find that really hard to believe seeing as the error provided is because of plugin loading.
Plugin & Datapack List
noneI find that really hard to believe seeing as the error provided is because of plugin loading.
[13:55:40 ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'LoaderLib.jar' in folder 'plugins.paper-remapped'
org.bukkit.plugin.InvalidPluginException: Cannot find main class `me.loader.Loader'
at org.bukkit.plugin.java.PluginClassLoader.(PluginClassLoader.java:80) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:123) ~[paper-1.20.6.jar:git-Paper-53]
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:35) ~[paper-1.20.6.jar:git-Paper-53]
at io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:116) ~[paper-1.20.6.jar:git-Paper-53]
at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimplePr...
Plugin & Datapack List
noneI find that really hard to believe seeing as the error provided is because of plugin loading.
There are some plug-ins that will lead to a lack of class files after being remapper, this problem will be very serious, not only will lead to the MD5 file has been modified, but also may make the plug-in author think that you may be in the magic of his plug-ins, and some plug-ins are not allowed to be remapper, be removed will be less class files.
You can disable plugin remapping by adding -Dpaper.disable-plugin-rewriting=true to your JVM args, however, this will break any plugins which are using internals which haven't been adopted specifically for paper
if the remapper is breaking stuff, then we'd generally like to be able to have the means to reproduce and investigate this stuff
Stack trace
Forcing a timings report (Waiting 5 minutes cause the same result): https://paste.gg/p/anonymous/8fe00967c3d24d70b17da9c80831912a
Modify a BannerMeta of a Banner with a custom pattern: https://paste.gg/p/anonymous/bca4815e992041d698dbfcf0e5173bfb
Changing the slot of the banner with a custom pattern: https://paste.gg/p/anonymous/c2bdb4fa3a984863ac2750af121287f7
Plugin and Datapack List
Server Plugins (1):
Bukkit Plugins:
- Test
There are 4 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)], [file/many-more-banners-v0.2.2.zip (world)]
Actions to reproduce (if known)
In All
Add a data pack that's add custom patterns (like this)
Timings
Give a banner with a custom pattern (from the data pack "/give @s minecraft:black_banner[minecraft:banner_patterns=[{pattern:'mmb:anchor',color:'red'}]]")
Place the banner and wait to timings collect the d...
From the looks of this, this is generally down to spigot not properly adopting upstream changes for the past 10 years, this is fixable in the long run, but not really sure of a good short term solution here which isn't just replacing this API
Expected behavior
I expect to see a inv with my contents. However I get kicked every time I try to open it.
Observed/Actual behavior
Player got kicked from server
Steps/models to reproduce
inventory.setItem(x, ItemStack);
Plugin and Datapack List
only my own plugin and Spark
Paper version
1.20.6
Other
[10:45:10 ERROR]: Error sending packet clientbound/minecraft:container_set_content (skippable? false)
io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:container_set_content'
at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:53) ~[paper-1.20.6.jar:git-Paper-53]
at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:20) ~[paper-1.20.6.jar:git-Paper-53]
at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:26) ~[paper-1.20.6.jar:git-Paper-53]
at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:12) ~[paper-1.20....
You presumably have a head item with a profile name longer than 16 characters
31502eb Use internals for getting block/entity counts - electronicboy
[PaperMC/Paper] New branch created: timings/use-internals
For a long time I've been meaning to move some of this logic internally as this would allow us to avoid hitting systems like block state snapshots which can create issues as many of the spigot implementations of this stuff are increasingly broken, leading to unexpected crashes during ticking, even if the API cannot properly interact with these such states/items, it's generally more preferable to not crash the server in the course, and just let those interactions fail more gracefully.
1028e02 Do not use optimisations which are not availabl... - electronicboy
40f4c12 And cleanup imports from -server too - electronicboy
Please provide a minimal replication plugin for your issue ^
We cannot debug failures of unknown plugins.
Please provide a minimal replication plugin for your issue ^ We cannot debug failures of unknown plugins.
How can I send it to you?
Presumably have the plugin be open source (e.g. here on github) or provide the jar as is.
forced pushed to better deal with the wrong base so I can reduce the diff noise induced
826d2e9 Add validation to player profile and properties - kennytv
[PaperMC/Paper] New branch created: profiles
Closing as this is most likely a plugin issue, but here's also a PR to add validation in the API https://github.com/PaperMC/Paper/pull/10680
Is your feature request related to a problem?
sometimes I need to stop the server immediately while startup and to do this I need to kill the process but it is not a good way to shutdown the server shutdown
Describe the solution you'd like.
make the server listen for the "stop" command while startup and if the "stop" command is executed, the server immediately shuts down.
Describe alternatives you've considered.
killing the server process in the terminal but it is not a good way to shutdown the server.
Other
No response
Discussion Category: Ideas
sending stop to a sane console while the process is starting up will allow the command to be read as soon as the console is actively starting, adding extra stop points would just be pointlessly invasive for generally 0 gain, as we'd need to figure out how to manage to tear it back down properly in whatever state you're in, which is just not worth it or viable for a process
Discussion Category: Ideas
A optional config option can be added it can be false by default if user make it true than "stop" command immediately kills the Server while sturtup it is not Hard to implement and it is optional so if it breaks anything paper will not be responsible for anything.
Discussion Category: Ideas
it would require us to have logic in order to hijack the console before the actual console takes over, there is just little gain, and that does not solve the logic of how to shut down properly in any such state, the only known state we know how to shutdown from is when the server is ready to start ticking, and by that point, we already have a fully established terminal which will read any existing command you sent to it from (unless, you're using windows)
Discussion Category: Ideas
if you just want to shut down properly from any state with 0 sense, just hit ctrl-c
Discussion Category: Ideas
You cant use ctrl+c if you are not using desktop enviroment and using Server in docker or system service with Web ui.
Discussion Category: Ideas
You cant use ctrl+c if you are not using desktop enviroment and using Server in docker or system service with Web ui.
Discussion Category: Ideas
You can certainly pass SIGINT to a docker container via docker kill.
In fact, it is the default signal sent by docker kill.
Discussion Category: Ideas
PlaceholderAPI is parsing the Craftbukkit package to determine the Minecraft version. However, Craftbukkit package relocation has been removed in recent versions of Paper, so this no longer works. This has been anounced quite a while ago so there was sufficient time to prepare for this change.
PlaceholderAPI has already updated to support this. You currently need to use the dev builds, which you can download here. Using the dev build, PAPI loads fine on latest Paper 1.20.6
I am unable to find "LoaderLib" anywhere online, only a Fabric mod of the same name. We would need that plugin to reproduce the issue.
Expected behavior
Players can spectate entities without getting timed out.
Observed/Actual behavior
Players that spectate entities, without sending other packets (commands e.g.) get timed out after ~30 seconds.
Steps/models to reproduce
- Enter spectator mode
- Left-click target entity or use the /spectate command
- Wait ~30 seconds without sending any other packets to the server (commands e.g.)
Plugin and Datapack List
- Plugins: None
- Datapacks: vanilla, file/bukkit, paper
Paper version
Paper version git-Paper-54 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: f2512b1)
Other
No response
Can reproduce. Does not happen on Spigot or Vanilla.
1b67e02 Fix entity tracker desync when new players are ... - Spottedleaf
Expected behavior
All modifiers added by /attribute are removed upon death
Observed/Actual behavior
The modifiers added by /attribute to still exist after rebirth
Steps/models to reproduce
- run /attribute @s minecraft:generic.armor modifier add 1-0-0-0-0 "" 1 add_value
- run /attribute @s minecraft:generic.armor modifier value get 1-0-0-0-0
- run /kill @s
- Respawn
- Run again /attribute @s minecraft:generic.armor modifier value get 1-0-0-0-0
Plugin and Datapack List
plugins
[10:43:44 INFO]: Server Plugins (0):
datapack list
[10:44:13 INFO]: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
[10:44:13 INFO]: There are no more data packs available
Paper version
version
[10:44:27 INFO]: Checking version, please wait...
[10:44:28 INFO]: This server is running Paper version git-Paper-55 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 1b67e02)
You are running the latest...
Attributes being reset on death is considered a bug by Mojang: https://bugs.mojang.com/browse/MC-179940
Paper generally aims to fix bugs, especially if they are confirmed by Mojang but unfixed.
Stack trace
[paste your stack trace or a paste.gg link here!](https://paste.gg/p/anonymous/ee895ee8a955477fb29e73a49ce0692e)
Plugin and Datapack List
[07:45:04 INFO]: Server Plugins (59):
[07:45:04 INFO]: Bukkit Plugins:
[07:45:04 INFO]: - AdvancedChests, antiRedstoneClock, BetterRTP, *BukkitHiddenSyntaxBlocker, ChatFeelings, ChatGames-Premium, ChestShop, Chunky, Citizens, ClientDetector
[07:45:04 INFO]: CMI, CMILib, CoreProtect, DatabaseDrivers, DecentHolograms, Denizen, EpicElevatorSystem, EpicJoschDEUtils, EpicMarketSystem, EpicPlotSystem
[07:45:04 INFO]: EpicVoteSystem, FastAsyncWorldEdit, floodgate, GSit, HeadDatabase, JumpAndRun, JumpPads, LootConomy, LuckPerms, MineGPT
[07:45:04 INFO]: Multiverse-Core, NBTAPI, NeoPerformance, NexEngine, PlaceholderAPI, Plan, PlotSquared, PocketGames, ProCosmetics, ProtocolLib
[07:45:04 INFO]: PvPManager, SelectionVisualizer, ServerBackup, SimplePortals, SimpleScore, SkinsRestorer, spark, TAB, TabTPS, Vault
[...
3f965d0 Fix property name length check in spigot profile - kennytv
ๅจ1.20.4็ๆฌไธไพๆงๅญๅจๆญค้ฎ้ข
The problem arises when plugins are obfuscated, and it is possible that an obfuscated plugin may not be remapper, which is why it causes noclassfound
If possible, it is recommended that the paper's config can be added to turn off the remapper by default.
If a plugin wishes to not be remapped (and actually runs on a Mojang mapped server!), it can mark itself as such https://docs.papermc.io/paper/dev/userdev#1205
engine mode 1 I canโt use this mod because all hidden blocks are "visible" if, for example, there is andesite or another block around that is not stone, but what if I need to hide blocks in the end world or nether?
Discussion Category: Ideas
[PaperMC/Paper] branch deleted: profiles
7f1a154 Add validation to player profile and properties... - kennytv
Unsupported version, and this is due to a treasure map, not walking around
https://paper-chan.moe/paper-optimization/ - ctrl-f treasure
Expected behavior
Moving an item in an inventory shouldn't change the item data
Observed/Actual behavior
Moving an item with attribute_modifiers:{show_in_tooltip: 0b, modifiers:[]} removes the attribute_modifiers component and the tooltip will become visible
Steps/models to reproduce
- Use the command
/give @p netherite_chestplate[minecraft:attribute_modifiers={show_in_tooltip:0b,modifiers:[]}]to give yourself a custom chestplate which hides the armor info - Pick the item up with your cursor and place it in the inventory again
- Notice how the armor info will now be shown
- You can use
/data get entity @s SelectedItemto see that the attribute_modifiers component was deleted
Plugin and Datapack List
No plugins or data packs
Paper version
This server is running Paper version git-Paper-60 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 4fd58a1)
You are running the latest version
Previous version: git-Paper-40 (MC: 1.20.6)
...
What is your intention when setting that value for the attribute data component? What are you expecting that to do?
Expected behavior
Player slowly loses health upon exiting the border, the damage gradually increasing with the distance traveled
Observed/Actual behavior
Player dies instantly
Steps/models to reproduce
Exit the world border by any means, in the following clip I used an Ender Pearl: https://youtube.com/clip/UgkxpLiVhNci-DqPA0DaZ_em7i99NGBNLSiR?si=q1sc3_W_-WuS4Ns3
Plugin and Datapack List
BisectHosting, Chunky, Graves, InstantRestock, NationsDeathBan, ProtocolLib, ViaBackwards, ViaVersion, voicechat
Paper version
Unsure, all I know is that it's an experimental 1.20.6 build.
Other
No response
I want to hide the custom tooltip from tools and weapons. The only working way I found so far in 1.20.6 was setting the attribute component like this, or is there another way?
I want to hide the custom tooltip from tools and weapons. The only working way I found so far in 1.20.6 was setting the attribute component like this, or is there another way?
By setting the modifiers to an empty list like you are doing in your example, you aren't just hiding the attribute modifiers, you are removing any implicit ones. Various item types have implicit attribute modifiers and if the data component exists on the itemstack, those will be used over the implicit ones. And since you set it to an empty list, the stack will have no attributes at all.
Oh I see. I added the empty list, since the command won't work without specifying a modifier. So I guess 1.20.6 has nothing comparable to /give @p diamond_sword{HideFlags:2} which just hides the attribute tooltip without changing them?
I came across this error, since neither the ItemFlag HIDE_ATTRIBUTES, nor HIDE_ADDITIONAL_TOOLTIPS nor all flags all at once hide the attribute tooltip anymore, which worked in 1.20.4, and I thought this might be the root of the problem.
Anyway, it's still a bug that on a paper server the empty modifier list gets removed completely after interacting with the item, which doesn't happen in vanilla.
if people override it, even if it causes unexpected behavior, we should aim to retain it; This is generally what I'd imagine is one of the many long ongoing battles with how broken ItemMeta is
Addressed issue with experience orbs by filtering them out. Mentioned that exclusion in the JavaDoc.
Additionally found an issue with ElderGuardian when disguising them as a Player on the client side. That happens only when the ElderGuardian is in the water. First thought is the ElderGuardian stream sucking health from other entities. To be sure I need to deobf the client stacktrace.
Failed to handle packet adm@395c0068
java.lang.ClassCastException: class gct cannot be cast to class ckb (gct and ckb are in unnamed module of loader 'app')
at fxy.a(SourceFile:1068)
at adm.a(SourceFile:41)
at adm.a(SourceFile:13)
at zz.a(SourceFile:25)
at bpm.d(SourceFile:162)
at bpq.d(SourceFile:23)
at bpm.A(SourceFile:136)
at bpm.bA(SourceFile:121)
at ffh.c(SourceFile:1275)
at ffh.f(SourceFile:888)
at net.minecraft.client.main.Main.main(SourceFile:265)
That's ClientPacketListener handleEntityEvent
Can't reproduce on the latest build, I slowly gain damage when I move more than five blocks from the border, and it increases when I get further away (until I walk into a second invisible wall), but there is definitely no insta-kill.
39532a1 Fix stacks losing empty attr modifiers - Machine-Maker
Hey, in short, this patch adds option to ignore specific entity (or type of entity) from being damaged by lightning when lightning strikes.
Hey, in short, this patch adds option to ignore specific entity (or type of entity) from being damaged by lightning when lightning strikes.
Hi, thank you for your PR :tada:
Could you please elaborate on the usage of this API over simply listening to the respective events (Combust, HangingBreak, DamageEvent) which all expose the lightning strike entity?
This kind of API seems pretty counter active to the event driven design of the bukkit API.
I would be more in favor of an event fired right before the lighting searches for an entity to hit to configure the parameters for that search or even to specify a specific entity before the search even happens. That seems more useful to me.
Update: I spoke to the server owner and it was just a poorly configured server. My apologies!
Hi, thank you for your PR ๐
Could you please elaborate on the usage of this API over simply listening to the respective events (Combust, HangingBreak, DamageEvent) which all expose the lightning strike entity?
For me it is better to use more "direct" way to somehow ignore other entities than to check with EntityDamageByEntityEvent, of course it could be done just with this event.
I would be more in favor of an event fired right before the lighting searches for an entity to hit to configure the parameters for that search or even to specify a specific entity before the search even happens. That seems more useful to me.
That's good idea, I'll look how could I make it.
Yea, then go with Machines way :+1:
Adding this kind of state to the entity feels very off, an event prior to the lightnings actual strike sounds like the API friendlier approach.
Should I create the event in paper package?
d28ae4d add back CraftPotionUtil rewriter - Lulu13022002
That's ClientPacketListener handleEntityEvent, Player can't be cast to Guardian
Found the reason why. I basically moved away from the entity, the chunk or at least the entities got unloaded.
Due to the state that the disguise data is not persisted on the entity, when loading the entity again it published itself to the client without the disguise info. The client knows the entity uuid only as the disguised type but gets the original one.
I updated the test plugin snippet to reflect the needed change - cache cleaning on death excluded.
It would be way better to persist the disguise data in NBT to avoid manual caching per plugin.
need to figure out generating the SensorTypeKeys in a more type-safe manner
0bd3cb6 Updated Upstream (Bukkit/CraftBukkit) - Machine-Maker
[PaperMC/Paper] New branch created: update-upstream
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
fa99e752 PR-1007: Add ItemMeta#getAsComponentString()
94a91782 Fix copy-pasted BlockType.Typed documentation
9b34ac8c Largely restore deprecated PotionData API
51a6449b PR-1008: Deprecate ITEMS_TOOLS, removed in 1.20.5
702d15fe Fix Javadoc reference
42f6cdf4 PR-919: Add internal ItemType and BlockType, delegate Material methods to them
237bb37b SPIGOT-1166, SPIGOT-7647: Expose Damager BlockState in EntityDamageByBlockEvent 035ea146 SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it
8c7880fb PR-1004: Improve field rename handling and centralize conversion between bukkit and string more
87c90e93 SPIGOT-7650: Add DamageSource for EntityDeathEvent and PlayerDeathEvent
CraftBukkit Changes:
4af0f22e8 SPIGOT-7664: Item meta should prevail...
Is your feature request related to a problem?
Currently, only InventoryMoveItemEvent can detect when an item in Hopper moves.
In that event, it was previously answered in this issue that it is not possible to manipulate the number of items in paper.
https://github.com/PaperMC/Paper/issues/10434
Currently, in Spigot, it is possible to manipulate the number of items in the hopper and connected inventory using this event.
When Hopper operates, the act of manipulating an item is a very important event for the Storage plugin.
By doing so, it is possible to further increase the ways to play RedStone in-game, such as automatic item production equipment.
On the server I manage, White Carpet alone handles 20 billion items.
I created a storage plugin called StorageSign to manage those items.
If it's true, I would like to use paper on the 55 servers I manage to save weight, but due to this I can't use it and I'm having a lot of trouble.
Describe the solution you'd l...
Discussion Category: Ideas
Hello, I am trying to rebase my commit as in method 1, though I am not able to select anything, could you help me please?
This bug appears to be fixed for armor, but it still persists for tools and weapons. Here the used give commands:
/give @p minecraft:diamond_pickaxe[minecraft:attribute_modifiers={show_in_tooltip:0b,modifiers:[]}]
/give @p minecraft:diamond_sword[minecraft:attribute_modifiers={show_in_tooltip:0b,modifiers:[]}]
/give @p minecraft:diamond_horse_armor[minecraft:attribute_modifiers={show_in_tooltip:0b,modifiers:[]}]
These items have the same problem that the data changes after picking it up with the cursor and placing it again in the inventory.
/give @p minecraft:shield[minecraft:attribute_modifiers={show_in_tooltip:0b,modifiers:[]}]
Shields have an even weirder problem, which can be seen with /data get entity @s SelectedItem. After picking it up the first time, the attribute_modifiers component disappears and instead the panner_patterns component with an empty list appears. After picking the shield up a second time, this component also disappears.
a61d58d adjust ItemMeta to distinguish null and empty m... - Machine-Maker
Shields have an even weirder problem, which can be seen with /data get entity @s SelectedItem. After picking it up the first time, the attribute_modifiers component disappears and instead the panner_patterns component with an empty list appears. After picking the shield up a second time, this component also disappears.
This is a separate, more complicated issue. You can open a new issue with this as the subject. It was not fixed in a61d58d
Expected behavior
i create a item with ItemFlag.HIDE_ATTRIBUTES and i expect to not see the the item attributes.
Observed/Actual behavior
Instead i still see them.
i print the item that i save as public object and the item that is in the inventory and i could see the ItemFlag.HIDE_ATTRIBUTES not longer exists.
Console:
[17:34:25 INFO]: ItemStack{BARRIER x 1, UNSPECIFIC_META:{meta-type=UNSPECIFIC, display-name="Reset Effect", ItemFlags=[HIDE_ATTRIBUTES, HIDE_UNBREAKABLE], Unbreakable=true}}
[17:34:25 INFO]: ItemStack{BARRIER x 1, UNSPECIFIC_META:{meta-type=UNSPECIFIC, display-name="Reset Effect", ItemFlags=[HIDE_UNBREAKABLE], Unbreakable=true}}
Steps/models to reproduce
Code:
public final static ItemStack resetEffect = createItem("Reset Effect", Material.BARRIER);
public static ItemStack createItem(String name, Material material) {
return setMeta(new ItemStack(material), name, true, null);
}
public static ItemStack setMeta(ItemStack itemStack...
Closing as "Works as Intended". The HIDE_ATTRIBUTES flag no longer can just be set without also specifying some attributes to hide. They are stored in the same data component and so you can't set one without setting some info about the other.
Stack trace
im not the server owner
Plugin and Datapack List
Actions to reproduce (if known)
No response
Paper version
Paper 1.16.5
Other
heres the clip of some1 using this exploit: https://www.youtube.com/watch?v=WAuJy6LX8FE
srry if my issue is not following the form and rules, but i just needed to sumbit this crash exploit
Generally exploits are to report in the proper discord channel so they are not public immediately. Also, you and maybe the server are on 1.16.5, which is an outdated version. So unless there is a confirmed case for the latest version I don't think there is much to do from Papers side.
Ignoring the fact that there's 0 information to go off of here, 1.16.5 is an unsupported version with many known crash exploits that are already patched in the latest versions. If the crash exploit still works on the latest paper build, please report it using the exploit report channel on our discord.
Hello, I am trying to rebase my commit as in method 1, though I am not able to select anything, could you help me please?
Would probably be best if you ask for help on our discord, github isn't a good place for that.
Added same things as it was previously in LightningStrike nms class, although added predicate, so anyone can define their own behavior. By setting null in setter, default predicate will be used
Please use fully qualified imports as you are modifying a non-paper file
Adding methods for ignoring entities seems wrong. Why not call the event right after the server looks for entities to hit? then you can pass in the entities to the event and let the user add/remove entities
Adding methods for ignoring entities seems wrong. Why not call the event right after the server looks for entities to hit? then you can pass in the entities to the event and let the user add/remove entities
In that case, I think it would make sense to be in LightningStrikeEvent then, though I don't really know how would I put entities there, as this method is called in tick method and I would be unable to get these entities. Though I think having event where you can specify your prediction on what entities do you really want there would be better. Passing a list with entities where you can add own entity could get little bit tricky and would probably require more checks, so making event through which you could make your own selection based on the predicate seems better for me.
- I may said little bit non sense, LightningStrikeEvent is called, before tick method is even called (where you are searching for the entities)
Expected behavior
Suggested by the docs of the method, it should look up all slots in the entire inventory
Observed/Actual behavior
It only looks up the storage content
Steps/models to reproduce
Well... it's just an inconsistency... soo...
Plugin and Datapack List
unimportent
Paper version
1.20.6-R0.1-SNAPSHOT
Other
docs:
implementation:
For me it is better to use more "direct" way to somehow ignore other entities than to check with EntityDamageByEntityEvent, of course it could be done just with this event.
why exactly do you not want to use EntityDamageByEntityEvent? this really seems like a very simple and intended way of doing this. we also don't have an event that gets called for when a zombie is checking for players they can attack, so why add one for this?
3293c93 Fix signed book page serialization - jpenilla
[PaperMC/Paper] New branch created: fix-book-page-serialization
For me it is better to use more "direct" way to somehow ignore other entities than to check with EntityDamageByEntityEvent, of course it could be done just with this event.
why exactly do you not want to use EntityDamageByEntityEvent? this really seems like a very simple and intended way of doing this. we also don't have an event that gets called for when a zombie is checking for players they can attack, so why add one for this?
You could use this event as a more direct way for filtering entities, I could also imagine more features in this event in the future as configuring selection radius which you wouldn't want in EntityDamageByEntityEvent. Event for zombie checking for players which he could attack does not exist though there is more general event for this EntityTargetEvent.
This patch is now almost empty could be moved in the generic upstream annot fix. Same for the api equivalent, the name is not that much relevant now.
Expected behavior
Moving an item in an inventory shouldn't change the item data
Observed/Actual behavior
Moving a shield with attribute_modifiers:{show_in_tooltip: 0b, modifiers:[]} adds banner_patterns:[] to the item components
Steps/models to reproduce
As requestes in this bug report (https://github.com/PaperMC/Paper/issues/10686), here is the new bug report for the shield issue.
- Give yourself a custom shield with
/give @p minecraft:shield[minecraft:attribute_modifiers={show_in_tooltip:0b,modifiers:[]}] - Use
/data get entity @s SelectedItemto confirm that the shield just has this component - Pick this item up with your cursor and place it in the inventory again
- Use
/data get entity @s SelectedItemagain and notice how the shield now also has the component banner_patterns:[]
Plugin and Datapack List
No plugins or data packs
Paper version
This server is running Paper version git-Paper-64 (MC: 1.20.6) (Implementing API version 1.20.6...
Are you able to see, is this fixed by https://github.com/PaperMC/Paper/pull/8235?
This is fixed as of b98d20a8ac9c21789d532652df86638a202093c7. If you register your commands inside the PluginBootstrap, they will be available to datapack functions. Any commands registered outside of there will not be available as they are registered too late in the startup process.
b6b493f Use Brig Dispatcher when Possible - Owen1212055
[PaperMC/Paper] New branch created: brig-command-dispatcher
97eac05 Use Brig Dispatcher when Possible - Owen1212055
ac554ad Updated Upstream (Bukkit/CraftBukkit) (#10691) - Machine-Maker
[PaperMC/Paper] branch deleted: update-upstream
Looks good! I think this should be merged into our existing "More Enchantment API" patch however.
So after a bit of discussion on this, I think we'd be (for now) best of to only
pull changes regarding full release versions.
Snapshot handling is complex, specifically with isAtLeast.
The commits in this PR will keep the logic around, so when we do get to releasing paper for snapshots they can serve as starting point.
Beyond that, see below for changes for request.
Again, thank you for the pr :partying_face:
I think #version should yield the id, not the name.
The name is a lot less usable for any programmatic purpose given its spaces and uncertain format.
The id seems like a more useful version string to default on.
We can certainly expose a #versionName() or something.
Is this needed, given we have the isImplementing logic?
Not needed for non-snapshot version of this PR.
Given how little this class should be used in normal developer workflow, I think it is fine to make this an interface,
expose a single static instance() method or whatever, and then return.
Saves us from double declaring everything.
I think there is little point in exposing this.
Instead, expose protocol and data version on this (soon) interface.
setter
It's quite niche, but is used exactly for that: either to reset the current editor, or to set one without immediately opening the sign screen
getter
Player instance is obtained from uuid, and in some cases only the uuid is needed (e.g. if you just care whether the sign is being edited, or want to get value from Map by uuid). Getting Player isn't that bad for those cases, but since there's setter, getter doesn't hurt
Expected behavior
That the brushed block when turning from suspicious sand/gravel into sand/gravel that it fires the BlockBreakBlockEvent or a similar event.
Observed/Actual behavior
Can't find any event fired when dusted block changes.
Steps/models to reproduce
Grab a dust and a suspicious block and have at it (:
Plugin and Datapack List
[03:21:54 INFO]: - LuckPerms, Mastery, Vault
Paper version
[03:22:08 INFO]: Checking version, please wait...
[03:22:08 INFO]: This server is running Paper version git-Paper-49 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: ac3a547)
You are 19 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Other
No response
[PaperMC/Paper] New branch created: feature/RegistrySet
This API is supposed to introduce an API equivalent to nms' HolderSet and HolderSet$Named.
RegistrySet is the base interface with subtypes in RegistryKeySet and RegistryValueSet. RegistryKeySet is equivalent to a HolderSet filled only with "reference" holders whereas a RegistryValueSet is filled with only "direct" holders. We can safely assume that a HolderSet will only contain 1 type of holder at a time because all the codecs that encode HolderSets require that.
Stack trace
[22:08:33 ERROR]: Failed to handle packet net.minecraft.network.protocol.game.ServerboundUseItemPacket@32d4e0dd, suppressing error
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.Entity.getDeltaMovement()" because "entity" is null
at net.minecraft.world.entity.projectile.FishingHook.pullEntity(FishingHook.java:599) ~[paper-1.20.6.jar:git-Paper-68]
at net.minecraft.world.entity.projectile.FishingHook.retrieve(FishingHook.java:502) ~[paper-1.20.6.jar:git-Paper-68]
at net.minecraft.world.item.FishingRodItem.use(FishingRodItem.java:33) ~[paper-1.20.6.jar:git-Paper-68]
at net.minecraft.world.item.ItemStack.use(ItemStack.java:596) ~[paper-1.20.6.jar:git-Paper-68]
at net.minecraft.server.level.ServerPlayerGameMode.useItem(ServerPlayerGameMode.java:483) ~[paper-1.20.6.jar:git-Paper-68]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItem(ServerGamePacketListenerImpl.j...
7e48f66 Properly pass requirement on namespaced redirec... - Owen1212055
This still could be used in log messages and other information dumps for further debugging
Ok, will change that
Just I felt that protocol and data versions are a bit just magic values that plugins may find some use for them even on bootstrap, but shouldn't be encouraged to use and should find alternatives, that's why chosed to expose them trough unsafe
Hmmm, yea convincing argument ๐
Alternatively we don't expose protocol version here but simply expose a static getting on the unsave instance or something. E.g. UnsaveValues.get().protocol version()
Exposing it here just feels a bit off, but I agree that I guess protocol and data version might be pretty magic.