#paper

1 messages · Page 6 of 1

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

  • Whenever a dispenser dispense a bucket of water into a nether portal, the BlockDispenseEvent should trigger

Observed/Actual behavior

It does not trigger the BlockDispenseEvent.

Steps/models to reproduce

Testplugin:

    @EventHandler(priority = EventPriority.HIGHEST)
    public void onBlockDispense(BlockDispenseEvent event) {
        this.getLogger().log(Level.INFO, String.valueOf(event.isCancelled()));
        this.getLogger().log(Level.INFO, ...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Requires testing

Did some basic testing. I only tested the number format on the score and not on objectives. But the original code in my first commit was tested on the objective in another plugin as well. (Because that code is used in a paper fork of mine as of right now) I would assume that works.

Getting (and therefor converting the format back) works as well (which can be sen by the output in the console)
Some further testing might be required but as far as I can see everything wo...

rustic folioBOT
#

Expected behavior

The CustomModelData tag should be persistent for the item.

Observed/Actual behavior

The tag is removed upon any update to that item slot.

Steps/models to reproduce

Give yourself an item with the CustomModelData tag

Example: /give @s minecraft:honey_bottle{CustomModelData: 1b}
Check that there is tag data present using Advanced Tooltips or /paper dumpitem
Move the item to another slot in your inventory
The CustomModelData tag is removed from the ite...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

While certainly valid, I am unsure if fixing this is worth it.
You can fix this by literally just using /give @s minecraft:honey_bottle{CustomModelData: 1} and would be just fine.
The b suffix, indicating a byte value, would be lost as well in the current item meta system which would the same issue as #7631 and not quickly resolved either.

So even if we fix this, your item stacks would then be changed by the bug #7631 describes.
The way easier solution here is to just not suffix the n...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Partial fix was merged in 692db0c81d7637faedd055631b0774461c13d8e6, as stated above this means items spawned in this way will convert to minecraft:honey_bottle{CustomModelData: 1} once going through the item meta system.

This is then a duplicate of https://github.com/PaperMC/Paper/issues/7631.
The pushed commit however prevents that data from being lost (now it is just changed) so this issue is considered closed with a "duplicate in 7631" attachment :)

rustic folioBOT
rustic folioBOT
#

Expected behavior

  • Using an RNG Algorithm like Xoroshiro128PlusPlus works fine
RandomGenerator rng = RandomGenerator.of("Xoroshiro128PlusPlus");
Bukkit.getLogger().info("Number: " + rng.nextInt());

Observed/Actual behavior

  • Using an RNG Algorithm like Xoroshiro128PlusPlus does not work
  • Only the Legacy Algorithms like Random and SplittableRandom work

Steps/models to reproduce

  • Create Basic Plugin
  • Run Server
  • See Error
[08:56:32 ERROR]: ...
rustic folioBOT
rustic folioBOT
#

@Owen1212055 I think I have been troubled by this problem for a long time, probably for about a month. Today I discovered the same problem again in a new world, that is, in certain locations in the ancient city, Sculk Shrieker will recover after being destroyed. After multiple attempts, a prompt to disconnect from the server will appear. Likewise, jumping or flying move state changes near these locations will disconnect the server. I hope the PaperMC can fix this bug as soon as possible.

...

rustic folioBOT
rustic folioBOT
#

Expected behavior

Paper manage to download the dependencies at start.

In my behavior redisson 3.25.2 with all peer dependencies could be downloaded.

Observed/Actual behavior

Paper manage to download the dependencies at start.

In my behavior redisson 3.25.2 with some peer dependencies are downloaded but not with all.

Steps/models to reproduce

  1. Create a simple java project with maven/gradle
  2. Add following dependencies
implementation("org.apache.maven:maven-re...
#

known issue internally

diff --git a/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java
index 9af07d168..70f352630 100644
--- a/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java
+++ b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java
@@ -73,6 +73,7 @@ public class MavenLibraryResolver implemen...
rustic folioBOT
#

I'm concerned that it seems this value could be reset every tick in the SwellGoal#tick method. So if you set the swell dir to 1 and the creeper didn't have a target, it would immediately get set back to -1. Can you outline some examples or usecases where the API setting the value does have an effect? If there are such examples, then the behavior should probably be more documented in the javadocs.

rustic folioBOT
#

You're right about the value being reset every tick in the goal, it may be better to just have a fix for Creeper#setIgnited(false) instead of allowing the swelldir to be changed. The reason I hadn't noticed was because I wrote my own custom creeper goal.

Haven't tested it yet, but something like this?

    @Override
    public void setIgnited(boolean ignited) {
        getHandle().setIgnited(ignited);
        if (getHandle().getSwellDir() > 0 && !ignited)
            getHandle...
#

Expected behavior

The chunk to generate/load without issues.

Observed/Actual behavior

Chunk system error when generating the chunk: https://pastes.dev/H3ujZPDylz

Steps/models to reproduce

  1. Download and add the attached datapack. It generates a world full of structures with a camel with LastPoseChange of less than 0: cameeelll.zip

  2. Start the server.

  3. Server will crash as soon as it tries to generate...

#

if the sole intent for exposing a method is to fix the behavior of another method, it would make more sense to just fix the OG method, imho; if this had some unexpected side-effect, that would be a different matter, but, that doesn't sound to be the case?

I'm not 100% aware of all the implications here, however, nothing against also exposing a value even if its only real use would be inside of custom AI or whatever

rustic folioBOT
#

Stack trace

https://paste.gg/p/anonymous/01c13516f8854d5a875b373b5580e155

Plugin and Datapack List

[18:01:15 INFO]: Bukkit Plugins:
[18:01:15 INFO]:  - Analyse, AntiPopup, AreaShop, ChangeSlots, ChatItem, Chunky, ChunkyBorder, Citizens, CMCEvents, CMCLinkManager
[18:01:15 INFO]:  CoreProtect, CrashClaim, CrashPayment, CreativeManager, DecentHolograms, dynmap, dynmapHider, DynmapWaystones, Essentials, EssentialsSpawn
[18:01:15 INFO]:  Fan...
rustic folioBOT
#

CraftLimitedRegion loads and stores entities in the protochunk and doesn't parse the entities from NBT each time. This requires that a new instance of CraftLimitedRegion is created each time before passing it to an api consumer and then saving/clearing it afterwards.

CraftStructureTransformer was creating a single instance for an entire structure place which was causing entities to be deleted so no structures would spawn entities.

Demo to cause the issue. Just add this listener ...

#

This is most likely caused by one of your plugins doing something off the main thread they shouldn't. One of the more likely causes is playing a sound to a world asynchronously which plugins like to do without realizing that in most situations, its not a thread-safe operation.

We added more specific checks for sounds in 1.20.4 that will show the offending plugin, but as you are on an earlier version, there is no way to be sure what plugin caused the issue. If you have a plugin which you k...

rustic folioBOT
#

Expected behavior

Running /place structure ... with some structure that spawns entities like a village should spawn valid villagers.

Observed/Actual behavior

The villagers spawned still have some generation flag set restricting the valid API to use on them.

Steps/models to reproduce

  1. Create a test plugin with 2 event handlers setup as below. You need to add one passthrough EntityTransformer

@EventHandler
public void onEvent(ChatEvent event) {
    final Col...
#

Expected behavior

AsyncStructureGenerateEvent has transfomers for modifying added entities or placed blocks in EntityTransformer and BlockTransformer. The world interface provided should be RegionAccessor to reflect that structure generation can happen to WorldGenRegion and ServerLevel.

Observed/Actual behavior

These functional interfaces provide a LimitedRegion to interact with the world during that process. This reflects an incorrect implementation by upstream whi...

rustic folioBOT
#

Block/EntityTransformer for AsyncStructureGenerateEvent need to accept World and LimitedRegion instances because structure generation can happen to both ServerLevel and WorldGenRegion instances.

Fixes https://github.com/PaperMC/Paper/issues/10124

I also changed the constructor param type for CraftLimitedRegion so this doesn't happen again. We will catch this issue at compile time then.

rustic folioBOT
#

Stack trace

log: https://pastebin.com/raw/hCTZNtas

Plugin and Datapack List

Datapack:vanilla,file/bukkit
Plugin:none

Actions to reproduce (if known)

https://www.youtube.com/watch?v=cNlSxx07x2M

  1. get /give @p shulker_box{BlockEntityTag:{LootTable:"^"}} 1
  2. place shulker box

Paper version

This server is running Paper version git-Paper-318 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 9271ee7)
You are running the latest version
Previous versio...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Yes! We want to make than one shulker can't summon more than 3 other shulkers when a shulker bullet hits him. But currently there's no way to get the "parent" shulker and, for example, allow or cancel spawning of new shulker based on parent's PDC value.

Describe the solution you'd like.

Add cancellable ShulkerDuplicateEvent, that contain a getParent method and, if it's easy to do, getBullet.

Describe alternatives you've consi...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

[12:04:31] [Netty Server IO #1/ERROR]: Packet encoding of packet ClientboundSetEntityDataPacket (ID: 86) threw (skippable? false)
io.netty.handler.codec.EncoderException: java.io.UTFDataFormatException: encoded string (".$$aaaa...aaaaaaa") too long: 65537 bytes
	at net.minecraft.network.FriendlyByteBuf.writeNbt(FriendlyByteBuf.java:612) ~[?:?]
	at net.minecraft.network.FriendlyByteBuf.writeItem(FriendlyByteBuf.java:657) ~[?:?]
	at net.minecraft.network.syncher.Entity...
rustic folioBOT
#

The javadoc for BlockDropItemEvent is at best misleading, at worst just plain wrong.

Called if a block broken by a player drops an item.

No, it's also called for just breaking glass with your fist (with an empty item list)

This event will also be called if the player breaks a multi block structure, for example a torch on top of a stone. Both items will have an event call.

No, all items broken because of immediate block updates will have their drops contained in this event's li...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

When broke an beehive(or beenest) in creative mode, the item is generated in the center

Observed/Actual behavior

when you broke the beehive(or beenest), the item was generated in a strange location, not in the center.

Steps/models to reproduce

2024-01-05_19 54 46
![2024-01-05_20 19 20](https://github.com/PaperMC/Paper/assets/98388174/320a5788-480d-4da1-83f9-992810b6228...

rustic folioBOT
#

Is your feature request related to a problem?

I am trying to apply potion effects to players outside of water when there is a nearby conduit in water, but currently there is no good way to test for an active conduit trying to give effects.

Describe the solution you'd like.

A BlockApplyEffects event, for beacons and conduits, containing a getBlock() method and a getPower() method for the size of the conduit prismarine structure or beacon pyramid.

This event would be called ...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Currently, Minecraft waits a tick before syncing effect visiblity/glowing. This is noticeable when adding entities into the world with effects. So, this main logic moves the dirty effect logic into the actual updating logic. This causes effect visibility to be updated correctly.

Additionally, mob effects are not correctly added when read from NBT due to their attributes not being applied. This is a problem for entities that have effects already added before being ticked for the first time....

rustic folioBOT
#

I like the concept for this event. I think the name probably needs some work to further distinguish it from BeaconEffectEvent which is fired for each player an effect is being applied to for beacons.

We have a similar PR open for spawners adding SpawnerPlayerSearchEvent, allowing plugins to change how spawners detect players in range and I think a similar approach for this would be good.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

[WorldGuard]'Decorated Pot' does not have the intended protection
https://github.com/EngineHub/WorldGuard/issues/2054

Describe the solution you'd like.

it will need support from the server itself. likely worldguard will immediately protect it once spigot/paper/etc add proper events for

Describe alternatives you've considered.

↑↑👆↑↑

Other

https://github.com/EngineHub/WorldGuard/issues/2054
I'm now stopping others from brea...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Using /whitelist add on an offline player adds that user to the whitelist.

Observed/Actual behavior

Vanilla gives back error "That player does not exist"

Steps/models to reproduce

Execute /whitelist add in any Paper version besides 1.20.4

Plugin and Datapack List

[18:04:18 INFO]: Server Plugins (0):

Paper version

[18:03:41 INFO]: Checking version, please wait...
[18:03:42 INFO]: This server is running Paper version git-Paper-196...
rustic folioBOT
#

Stack trace

[13:36:26 ERROR]: Packet encoding of packet ClientboundSoundPacket (ID: 102) threw (skippable? false)
io.netty.handler.codec.EncoderException: String too big (was 65525 characters, max 32767)
        at net.minecraft.network.Utf8String.write(Utf8String.java:35) ~[paper-1.20.4.jar:git-Paper-381]
        at net.minecraft.network.FriendlyByteBuf.writeUtf(FriendlyByteBuf.java:694) ~[?:?]
        at net.minecraft.network.FriendlyByteBuf.writeUtf(FriendlyByteBuf.java:690) ...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Hitting a decorated pot (or any of the other blocks mentioned) will call a ProjectileHitEvent. This allows you to get both the hit block and the projectile, and the projectile will provide the shooter.

Is there anything that is missing that could be provided by having a specific event for breaking blocks with a projectile? It seems to me that the current ProjectileHitEvent would provide all the information a protection plugin needs, but maybe I am missing something.

rustic folioBOT
rustic folioBOT
#

Expected behavior

When a block is mined- including shulker boxes as well as ores and blocks like stone and netherrack, they normally drop and don't despawn until the 5 minute timer runs out. As we have no plugins that affect drops- and have removed all plugins from the server during testing, the default timer should apply to dropped items.

Observed/Actual behavior

Mined items are not dropping in a specific chunk section in our world.
We don't know if it's happening in other loc...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

This was originally mentioned by Prototype464 in issue #7347. It's been 2 years since their inquiry into this. As they have stated, it would be great to make some datapacks per-world. For example, applies something like Terralith to a resource-only world. I will note the end goal here is well-put by Prototype464 in their issue.

Describe the solution you'd like.

The ability to use datapacks per-world on a server. For exampl...

#

This is slightly more feasible with the introduction of the configuration stage. That essentially means the player leaves the server and re-joins, but to the client it is just a loading screen.

No such API exists for putting a client back in that configuration phase as of yet and it can't be added very easily without reworking a lot of the changes craftbukkit has made over the years to how players are created. It's possible, but not tomorrow and probably not the next day.

rustic folioBOT
rustic folioBOT
#

You could, but it doesn't just affect Paper, the issue is in both vanilla server and modded too. So now everyone needs to develop a plugin or a mod (vanilla can't do anything, except manually editing whitelist.txt). Whitelist is also the only blocker from random people joining.
I could develop something for my modded server, sure, but I am sure there are plenty people who don't even know what the problem is or where to write about it or how to fix it.
Besides, the broken version includes 1....

rustic folioBOT
#

Expected behavior

Plugins should be disabled and world saved when something bad happens with main thread (cause by plugins).

Observed/Actual behavior

https://github.com/PaperMC/Paper/blob/07b956e3a30d9cd192111829b59bdf4372f128b1/patches/server/0365-Improved-Watchdog-Support.patch#L114

As of Java 20 Thread#stop always throws UnsupportedOperationException what interupts emergency server stop process when main thread got stuck(mostly by plugins), so plugins will not be disabled...

#

Adds a removal reason to EntityRemoveFromWorldEvent. The RemovalReason enum mirrors the NMS Entity.RemovalReason, except that the methods shouldDestroy/shouldSave are renamed to willDestroy/willSave. Due to the chunk system rewrite, unloaded entities are not set as removed with RemovalReason.UNLOAD_TO_CHUNK, so currently if the removal reason is not set and the entity is inaccessible, it'll default to RemovalReason.UNLOAD_TO_CHUNK as the removal reason.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

The Block Update Chain should not be triggered by other blocks placed when BlockPlaceEvent is cancelled.

Observed/Actual behavior

The Block Update Chain is triggered by a block placed even though the BlockPlaceEvent is cancelled. This leads to some blocks breaking when set with worldedit or triggering redstone signals (e.g in protected areas with worldguard)

Belows case: The redstone torch can trigger the update chain of minecraft. It is an indirect block updat...

#

Expected behavior

https://youtu.be/agOU5IlBhx0

Observed/Actual behavior

https://youtu.be/6R92BRV-_do

Steps/models to reproduce

  1. Fill your inventory with dirt (/give @p dirt 6400)
  2. Go into third person with F5
  3. Use /kill
  4. See items being spread out way too far

Plugin and Datapack List

No plugins.

Paper version

git-Paper-381 (MC: 1.20.4)

Other

I'm pretty sure vanilla has a thing where if you die of fall damage after falling for very long it spreads...

#

As far as I can tell, this is a feature, not a bug. I found an issue reporting that items stopped flying farther away here: https://bugs.mojang.com/browse/MC-156766. It was then reported fixed, meaning that items are supposed to fly far away on player death regardless.

The reason you saw the change when you updated, is that we fixed a long-standing bug that craftbukkit/spigot created by not making the items spread far out.

Here is it in 1.3.2, spread out far just will a /kill.
!...

rustic folioBOT
rustic folioBOT
#

It's a little trickly. hideEntity and hidePlayer do the same thing right now, and hidePlayer has existed WAY longer and plugins rely on that completely removing the Player from connected clients. If we reversed course and made it so it didn't completely remove other players, then vanish abilities would be broken as any client would still know that player was online.

Since just separate tab list hide was added pretty recently by mojang, I think new API is better for that instead of ch...

rustic folioBOT
#
[PaperMC/Paper] New branch created: feature/RegistryAccess
rustic folioBOT
rustic folioBOT
#

Expected behavior

When fire spreads, BlockSpreadEvent should get executed.

Observed/Actual behavior

BlockSpreadEvent does not get executed when fire spreads.

Steps/models to reproduce

Register event:

   @EventHandler
    public void onBlockSpread(BlockSpreadEvent event) {
        Bukkit.broadcast(Component.text(event.getBlock().getType() + ""));
    }

Place down blocks like planks that are burnable. Set fire to the burnable blocks and observe as the fire spre...

rustic folioBOT
rustic folioBOT
#

Adds an unsafe method for getting the underlying colour definitions for spawn eggs, based on the entity type. I recognise this is probably a fairly niche thing, but it can be useful to have a consistent way of getting some colours for entities when doing certain visual effects.

I've added this to UnsafeValues as it's accessing data directly from the SpawnEggItem class rather than reading data from an individual ItemStack's meta, although I'm happy for it to be moved somewhere more appropri...

rustic folioBOT
#

Expected behavior

For ItemMeta implmentations such as BlockStateMeta to not add default NBT data/have a way to clear that data.

Ideally BlockStateMeta/ArmorStandMeta/whatever other implementations have this issue could automatically exclude the NBT value if it's the default, but assuming that's impossible to do without breaking backwards-compatibility in some way, making the setters nullable/some clear method (maybe even one to automatically check and remove default values?)...

#

We could add something to BlockStateMeta to clear the block state, which would just remove the BlockEntityTag entirely, but we don't control what is inside of that tag. That is just the full serialized BlockEntity. But doing that automatically doesn't seem feasible. Each BlockEntity type has it's own "default" nbt values so we'd have to create some way to know what the defaults were based on the type, and that is a massive pain to maintain.

rustic folioBOT
rustic folioBOT
#

Yeah a way to clear these values would be great as well, mentioned the default value thing since getBlockState seems to return the default state even when the item doesn't have that NBT at all, so I assume it is available somewhere - but don't know how hacky are the internals there, so if a method to clear would be better that's good as well.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Generally, I think this method needs a bit of a larger discussion, I already touched on this when this PR was proposed to paper, imo this logic barely deserves to live in the API, at best in UnsafeValues, tho that is just my opinion.

Has there been discussion about that ever since?

Having access to Bukkit's setTitle(String) via the InventoryView class and Paper's title(Component) via UnsafeValues doesn't sound like a reasonable thing to do. Both methods should be in one place....

rustic folioBOT
rustic folioBOT
#

After manually patching in the async catchops into 1.20.2, it appears to have been thito's fancywaystones plugin calling async playsound. Remedy for anyone with an identical set of circumstances should just be updating that plugin.

[15:20:47] [FWIO/ERROR]: Thread FWIO failed main thread check: play sound
java.lang.Throwable: null
	at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:14) ~[paper-1.20.2.jar:git-Paper-"931781c"]
	at org.bukkit.craftbukkit.v1_20_R2.CraftWorld.playSound...
rustic folioBOT
#
[PaperMC/Paper] New branch created: contrib-guidelines
rustic folioBOT
#

Despite all issues this can cause when called on InventoryClickEvent

We don't want to add more API that is inherently broken. I'm leaning towards deprecating the setTitle(String) method with the notice that it is just broken and shouldn't be relied upon.

I wasn't aware of any desyncs and other glitches that may happen.

Yeah, they certainly exist as lynxplay pointed out. Double-clicking to collect items of the same type just doesn't work.

If we can show that cancelling + chan...

rustic folioBOT
#

Generally, I think this method needs a bit of a larger discussion, I already touched on this when this PR was proposed to paper, imo this logic barely deserves to live in the API, at best in UnsafeValues, tho that is just my opinion.

Has there been discussion about that ever since?

Having access to Bukkit's setTitle(String) via the InventoryView class and Paper's title(Component) via UnsafeValues doesn't sound like a reasonable thing to do. Both methods should be in ...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

My reason for thinking this is a good thing to have, is it allows client-side mods to take advantage of the vanilla commands for pasting schematics and such.

Schematic paster mods typically already have this logic for by placing blocks, which is now gonna be easier with the block interaction attribute.

Just donno, I seriously do not know servers that would even use setblock/fill over FAWE, which has been the standard in general for stuff like this.

#

Schematic paster mods typically already have this logic for by placing blocks, which is now gonna be easier with the block interaction attribute.

They didn't yesterday in chat when someone was asking about this for Litematica support. I don't think the printer functionality is built-in anymore. Plus, printing is still different from pasting all at once.

rustic folioBOT
#
[PaperMC/Paper] branch deleted: contrib-guidelines
rustic folioBOT
rustic folioBOT
#

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:
63c208dd Remove no longer used import
70be76c7 PR-958: Further clarify deprecation of TAG_CONTAINER_ARRAY
ae21f4ac PR-955: Add methods to place structures with block/entity transformers
e3d960f2 SPIGOT-7547: Remark that Damageable#setAbsorptionAmount() is capped to a specific value
b125516c Fix typo in R...

rustic folioBOT
#
[PaperMC/Paper] branch deleted: update-upstream
rustic folioBOT
rustic folioBOT
#

Expected behavior

I can change the player's name during AsyncPlayerPreLoginEvent by using setPlayerProfile(Server#createProfileExact(uniqueId, name))

Observed/Actual behavior

I can't change the player's name, he connects to the server with the initial name anyway,

Steps/models to reproduce

@EventHandler(priority = EventPriority.LOWEST)
public void handleEvent(AsyncPlayerPreLoginEvent theEvent) {
	theEvent.setPlayerProfile(Bukkit.createProfileExact(UUID.randomUU...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: a
#
[PaperMC/Paper] branch deleted: a
#
[PaperMC/Paper] branch deleted: up
rustic folioBOT
#

This pull request exposes the getBaseSeedId methods from crop blocks.
This makes it possible to get the corresponding seed to its block representation.
E.g. Material.POTATO for minecraft:potatoes

I don't know about the name getBaseSeedId. I named it like that cause its the same as the name from the server. Maybe there is a better name for it tho.

#

Is your feature request related to a problem?

If a plugin adds an entity as a passenger to a player and then a plugin tries to run Player#teleport (with no TeleportFlags) the player is not teleported and the PlayerTeleportEvent is not called.

The context of my issue is that I have chat bubbles which use Text Display packets to show player's messages above their heads - however due to the issue they are unable to teleport until the chat bubbles disappear automatically.

Describ...

rustic folioBOT
#

I'm not a fan of this. This type of API should wait until Material is split up into ItemType and BlockType, and then a subtype of BlockType can be made for CropBlockType that has such a method.

Putting it on BlockData just seems like a hack to work around that. No nms BlockState or API BLockData is required to make the mapping.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

We don't want to add more API that is inherently broken. I'm leaning towards deprecating the setTitle(String) method with the notice that it is just broken and shouldn't be relied upon.

I mean, I understand that reliability of this method is questionable, is there anything that can be done on the server-side to fix it?

Also wouldn't call these methods "broken" - they do serve a purpose and can occasionally break when used in the wrong place, or at the wrong time. This applies to numbe...

rustic folioBOT
#

is there anything that can be done on the server-side to fix it?

I don't know, and I don't really care to try and hack a solution in to fix some of the issues. The game's protocol just flat out doesn't support changing titles without re-creating and re-sending the entire inventory open packet which makes the client create a whole new screen and change to it.

Based on my quick understanding of how double-click works, it is tracked on the client, and if the current screen sees 2 clicks ...

rustic folioBOT
#

I would remove the nms name and apinote comment from the fields. I agree that the nms one isn't really needed there and the apinote I think is just better off only at the top of the class, so that it is easier to browse downloaded API source in IJ as a user

A lot in the generator can be re-used for similar ones in the future, but abstracting those parts out is better done later. just so that's on the radar

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: generators
rustic folioBOT
#

Expected behavior

Setting hopper-amount to 10 makes the Composter added 10 times, or 20, or 30, etc.

Observed/Actual behavior

It just adds by 1 like regular players.

Steps/models to reproduce

Modify spigot.yml config, set hopper-amount to 10.

Plugin and Datapack List

None.

Paper version

Current: git-Purpur-2124 (MC: 1.20.4)*
Previous: git-Purpur-2120 (MC: 1.20.4)

  • You are running the latest version

Other

For the life of me I could not find a way to report...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

The intended solution for your case is to just use the TeleportFlag.EntityState.RETAIN_PASSENGERS flag. Why don't you want to use the specific flag for this case? Another solution to your suggestion would be to add new flags called DISCARD_PASSENGERS, DISMOUNT_PASSENGERS etc. to teleport the player and either dismount or remove the mounted entities in general.

The issue is that I have no way of guaranteeing that every other plugin is going to add the RETAIN_PASSENGERS flag.

F...

rustic folioBOT
#

Potential successor of #9408

This takes the same general sense of that PR, however makes it much safer in terms of shutdowns, unloads, etc, at the cost of having a thread per world dim store. In theory, this could easily be a shared single pool thread pool, I debated on using a shared more general pool however guaranteeing the safety of writes to this would require much more diff vs what is done here.

#

PME assumes a movement is occuring, not that a movement will occur, so, generally, no, it should not, as otherwise plugins would be processing effectively the same general intent twice

Having a pre event was always somewhat of a consideration, a hindered event as was proposed elsewhere gets a bit weird when all of the existing API around this stuff just returns a boolean with no real pre-existing causes. This was something that was on my todo list elsewhere, I think I started something w...

rustic folioBOT
rustic folioBOT
#

There are reasons I can think of why the original patch was dropped:

  1. Mojang made some code changes in order to optimize the networking performance in 1.20.2, as some of these changes were similar to a collection of patches had already existed in Paper, resulting in the removal of these patches.
  2. AbstractEventExecutor.LazyRunnable had been deprecated since the release of Netty 4.1.92 (see https://github.com/netty/netty/issues/13335)

Although there is an alternative mechanism prov...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Has this been tested? I can't connect to the server.

Oops.

Yes this has been tested and indeed was working, but I was testing out @electronicboy 's suggestion (which causes the player cannot connect to the server) and accidentally pushed that code change as I was out of focus for a bit.

Now this PR should work fine just like from the beginning and I have to be careful next time. Thank you for catching me up!

rustic folioBOT
rustic folioBOT
#

This pull request adds a PlayerPreTeleportEvent. Resolves #10168

Currently WIP because there are some things that need to be figured out. For example where we want the event to be called in each case. It is currently called where I think it makes the most sense. If we want to call it earlier, it needs some serious refactoring at some places and sometimes it really does not make sense to call it earlier.

Also do we want to add a EntityPreTeleportEvent?

What also needs to be di...

rustic folioBOT
#

Expected behavior

When a mob's goals are entirely removed via Bukkit.getMobGoals().removeAllGoals(entity), they should have no target or pathfinding. The mob should sit idle until acted upon by an external force such as a player.

Observed/Actual behavior

When a Guardian (or Elder Guardian) is out of water, they jump around. This happens when removeAllGoals is used on the mob. As a point of reference, this also happens when the mob is given slowness as well. The only way to prev...

rustic folioBOT
rustic folioBOT
#

Modifiability

I think that it doesn't needed in this event, so just call it with a cloned Locations if necessary. IMO the main purpose of this event is to "notify" plugins that a player will be teleported, and they need to prepare him for this (for example, as in my case, remove all passengers or setSpectatorTarget(null) if he is in spectator game mode).

rustic folioBOT
#

Is your feature request related to a problem?

When the number of players reaches dozens of people, the high simulation distance cannot be afforded. My simulation distance is 5.
And then Monsters outside of simulation distance do not disappear randomly.
Peper has an option for this
Hopefully it would be nice to separate the Y-value checks separately.
For example, monsters can be configured to disappear outside of 128 from the player's Y value.The X and Z values disappear beyond 80.
(...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

[14:23:52 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH  - git-Paper-389 (MC: 1.20.4) ---
[14:23:52 ERROR]: The server has not responded for 50 seconds! Creating thread dump
[14:23:52 ERROR]: ------------------------------
[14:23:52 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[14:23:52 ERROR]: ------------------------------
[14:23:52 ERROR]: Current Thread: Server thread
[14:23:52 ERROR]:       PID: 26 | S...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Modifiability

I think that it doesn't needed in this event, so just call it with a cloned Locations if necessary. IMO the main purpose of this event is to "notify" plugins that a player will be teleported, and they need to prepare him for this (for example, as in my case, remove all passengers or setSpectatorTarget(null) if he is in spectator game mode).

I agree here. This event should be solely for "preparation" purposes and to make stuff more compatible with other plugins.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Right now, if you want to restrict block modifications, you need a heavy plugin like CoreProtect, etc. I would like to make a plugin that detects when a block is replaced, and stop it.

Describe the solution you'd like.

A new class called BlockModifyEvent, the event would contain a property for the block, the old state, and the new state, and a cause enum, which can be one of the following:

  • Block type change
  • Block property change...
#

Block entity data change

I'm not sure what this means. Anytime what changes on a block entity, anything that is stored in NBT? that means every single tick, it would fire for every furnace because the burn/fuel time is stored in NBT. Anything any inventory changed, including anything hopper-related. We already have intense events for those in the InventoryMoveItemEvent.

Handling every single possible event for blocks changing is extremely hard to maintain

While this might be true...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Ok so, I am working on the changes right now and the more I am working on the EntityPreTeleportEvent the more I get the feeling that this is bigger than just a few calls.
For example, the Event initially doesn't have a TeleportCause I can use. Should I create a new Enum, do we use the PlayerEvent.Cause enum (This would not really make sense) or do we just leave it?

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: a
#
[PaperMC/Paper] New branch created: b
#
[PaperMC/Paper] branch deleted: a
#
[PaperMC/Paper] branch deleted: b
#
[PaperMC/Paper] New branch created: b
#
[PaperMC/Paper] branch deleted: b
rustic folioBOT
rustic folioBOT
#

I have searched some posts and found the problem has been persisted for a long time, as discussed in this SpigotMC post.
The anvil inventory instance created by server.createInventory is a instance of CraftInventoryCustom, which as this post states, it is not a real AnvilInventory and can not cast as well. Additionally, it does not invoke PrepareAnvilEvent.
The biggest missed function of this is ...

rustic folioBOT
#
[PaperMC/Paper] New branch created: asyncsaveddataio
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: ppc64le/sqlite
#
[PaperMC/Paper] branch deleted: fix/clientbrand-v2
rustic folioBOT
#

When a plugin listens to the EntityAddToWorld and EntityRemoveFromWorld events, I don't believe there is currently any method of directly obtaining which world the entity was actually added to/removed from. Using event.getEntity().getWorld() works in many cases, but not all. Specifically, when an entity is teleported from one world to another, the location of the entity is updated prior to the removal event being called. This means that when an entity goes through a nether/end portal or is ...

#

When a plugin listens to the EntityAddToWorld and EntityRemoveFromWorld events, I don't believe there is currently any method of directly obtaining which world the entity was actually added to/removed from. Using event.getEntity().getWorld() works in many cases, but not all. Specifically, when an entity is teleported from one world to another, the location of the entity is updated prior to the removal event being called. This means that when an entity goes through a nether/end portal or is te...

rustic folioBOT
rustic folioBOT
#

Expected behavior

Flying Ender Pearl triggers ' EntityMoveEvent ' event

Observed/Actual behavior

The Flying Ender Pearl will not trigger the ' EntityMoveEvent ' event

Steps/models to reproduce

Create a simple plugin and listen for ' EntityMoveEvent '
in kotlin, like this :

@EventHandler
fun onPearlFly(event: EntityMoveEvent) {
    if (event.entity.type != EntityType.ENDER_PEARL) return
    println(event.to)
 }

Then enter the game, throw the Ender Pearl...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

This paper end comment doesn't have a start comment. But all this can be on a single comment on the changed line or a multi line comment inside the method.
Also this commit is kinda mangled so i'm sorry if i don't catch all the stuff you changed

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: a
#
[PaperMC/Paper] branch deleted: a
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

When a block with an item frame on it is destroyed the item frame will also be destroyed. It is my understanding that this event is supposed to fire when that happens, and it does, but I expect the event.getItems() method to return an array containing the item frame that is being dropped.

Observed/Actual behavior

The event fires twice, but the event.getItems() method returns an empty array both times.

Steps/models to reproduce

  • Place an item frame on a ...
rustic folioBOT
#

Sure, it certainly doesn't hurt to clarify things. I added a note to the javadoc in the EntityRemoveFromWorld event. Though I don't believe it's necessary to note it in the EntityAddToWorld event. While I did add a getWorld() method to the EntityAddToWorld event as a precaution, this issue mainly pertains to the EntityRemoveFromWorld event, and I can't think of a scenario where the world would differ from the entity's world when the EntityAddToWorld event is being fired.

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: a
#
[PaperMC/Paper] branch deleted: a
rustic folioBOT
#
[PaperMC/Paper] New branch created: a
#
[PaperMC/Paper] branch deleted: a
rustic folioBOT
#
[PaperMC/Paper] New branch created: a
#
[PaperMC/Paper] branch deleted: a
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: a
rustic folioBOT
#
[PaperMC/Paper] branch deleted: a
rustic folioBOT
#
[PaperMC/Paper] New branch created: a
rustic folioBOT
#
[PaperMC/Paper] branch deleted: a
rustic folioBOT
#

Expected behavior

Flying entities calling EntityMoveEvent while flying to a destination.

Observed/Actual behavior

EntityMoveEvent was not called when a flying entity was going to a destination.

Steps/models to reproduce

// Make sure to register the listener.
@EventHandler
public void onEntityMove(EntityMoveEvent event) {
    if (event.getEntity().getType() == EntityType.PARROT) {
        Bukkit.broadcastMessage("Parrot moved.");
    }
}

In game, spawn a...

rustic folioBOT
#
[PaperMC/Paper] New branch created: a
rustic folioBOT
#
[PaperMC/Paper] branch deleted: a
rustic folioBOT
#

Expected behavior

Calling an Entity's setLootTable should... well, set the loot table.

Observed/Actual behavior

I am spawning an Entity that I immediately call setLootTable(LootTables.EMPTY.getLootTable()); on. Spigot docs say I should set to null, but this doesn't seem to have any impact on the drops of the entity, while setting to empty does.

On Spigot, this works as I expect, the entities spawned do not drop anything.

On Paper, with the same configuration (theyre launch...

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: a
#
[PaperMC/Paper] branch deleted: a
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable.

It should be noted that this decision does not promise all future exploits will be configurable.

paper-global.yml:

unsupported-settings:
    allow-unsafe-end-portal-teleportation: true

With hard forking on the future, we are hoping to open Paper up to more groups of peop...

rustic folioBOT
#

I believe this would be beneficial to the project, given the considerable amount of time I've spent assisting people in the Paper-help channel. It is indeed a frequently requested feature, and since @Owen1212055 has volunteered to maintain it, there should be no issue!

It would just be part of the unsupported settings, receiving similar treatment to bedrock breaking and TNT duping. 👍

rustic folioBOT
#

Is your feature request related to a problem?

Negative. I'm just posting it here because I couldn't find the right place for it.

Describe the solution you'd like.

Not sure if this is the right channel for it, but...

Today I learned about this:

_"C++ got this nice extern C thingy that makes the compiler use C-style linkage for parts of your code.
and java has ways of calling c-style native libraries.

that's how it interacts with your operating system and other stuff"_

...

rustic folioBOT
#

Hey, thanks for raising this!
The team is already aware of the multiple ways to call native code in java.
In general, modern java is approaching native performance, so the benefits aren't as big as they once were, so the overhead and complexity isn't worth it.
It makes much more sense to improve or replace existing java code with better java code, like the team has been doing for a decade now with great success.

Note that paper already utilizes native code for some things, in particular...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I just generally wanted to say,

A large part of the reason why the projects within this space can thrive and exist, like forge, fabric, etc; is because they rely on the Java code being decompilable and runnable in many places, the fact that we can modify mojang code (either at runtime or beforehand), effectively, is what allows these projects to add in their hook points and such to easily expose to mods, plugins, etc, to carry their goals on without impacting vanilla code too much, as, for...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

The behaviour here is kind of weird.
This is not really a max, barely a soft maximum.
It is a weird way to set one part of the computation algorithm used to determine the ticks till next arrow removal.

I think we'd be better off if we expose a setter for said tick time till next removal.
Plugins wanting to change the value for e.g. 40 arrows can do that in the removal event by setting said value to e.g. always 20 ticks or 1 second.
Or compute their own logic.

We'd need to look into ...

rustic folioBOT
#

Needs consideration for

a) CREATIVE and CREATIVE_ADV only apply to inside the creative inventory. not normal player inventory of a player that is in creative.
b) no creative category nor tags are rendered.pain
c) "unify that advanced is kinda

Scratch that ---
computeTooltipLines(Player, TooltipFlag...)
with Flags CREATIVE and ADVANCE.

Callers may pass none, one or both to combine the two.

#

Needs consideration for

a) CREATIVE and CREATIVE_ADV only apply to inside the creative inventory. not normal player inventory of a player that is in creative.
b) no creative category nor tags are rendered.pain
c) "unify that advanced is kinda

Scratch that ---
computeTooltipLines(Player, TooltipFlag...)
with Flags CREATIVE and ADVANCE.

Callers may pass none, one or both to combine the two.

#

Needs diff on change e.g.

diff --git a/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
index 963a59615..4f31dfa64 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
@@ -191,7 +191,7 @@ public class ConduitBlockEntity extends BlockEntity {

     priva...
rustic folioBOT
#

Maybe a blockextinguishevent and a playerblockextinguish event? Both events could extend some event to be able to listen to it

On Jan 27, 2024 at 7:28 PM, <Jake Potrebic @.***)> wrote:

@Machine-Maker requested changes on this pull request.

Looking at how extinguishing happens, I no longer think this event is appropriate for it. Extinguishing candles can happen due to no...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Custom tipped arrows have this annoying issue where they show the incorrect potion durations in the lore. The shown duration is the actual duration divided by 8. This is likely because a developer did the math to divide a potion duration by 8 when made into a tipped arrow for the lore, even though the supplied duration for a custom arrow is not actually divided.

Describe the solution you'd like.

Make tipped arrows show the correct durat...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Gone for the Adventure style or similar way. Hopefully that's what you meant @lynxplay.
JavaDoc is missing now, will add it later. Brainstorming welcome.

Sus stew.
Normal, Normal Advanced, Creative, Creative Advanced.

<img width="670" alt="Bildschirmfoto 2024-01-28 um 16 26 14" src="https://github.com/PaperMC/Paper/assets/1420893/aee53ca9-d6ab-42e8-9145-9d5385938ead">

 @EventHandler
    public void onPlayerInteract(PlayerInteractEvent interactEvent) {
        if (intera...
rustic folioBOT
rustic folioBOT
#

Stack trace

https://paste.gg/p/anonymous/d5696a39d2414aba8e70d8b8058fd81c

Plugin and Datapack List

[14:25:12 INFO]: Server Plugins (7):
[14:25:12 INFO]: Bukkit Plugins:
[14:25:12 INFO]: - BlueMap, Essentials, EssentialsChat, FarmingUpgrade, mcMMO, RHLeafDecay, WorldEdit

[14:33:13 INFO]: There are 2 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)]
[14:33:13 INFO]: There are no more data packs available

**NOTE - Crash still occurs with all plugi...

rustic folioBOT
#

This does not really seem to provide much value when you can just do

OfflinePlayer op = ...
if (op.getPlayer() instanceof Player player) {
  // ...
}

at best you will save one line for one line, every other case isn't really excusable

I mean I think that is the nature of if<insert> methods. See Optional#ifPresent for example and people still use it.

rustic folioBOT
#

This does not really seem to provide much value when you can just do

OfflinePlayer op = ...
if (op.getPlayer() instanceof Player player) {
  // ...
}

at best you will save one line for one line, every other case isn't really excusable

I mean I think that is the nature of if methods. See Optional#ifPresent for example and people still use it.

I don't see how it makes sense to compare OfflinePlayer with Optional, one is mean...

rustic folioBOT
#

I must admit that I did not have your way in mind for that case. But I don't think that this method is useless at all either and certainly not redundant.
You said that this would save one line but especially if my code just needs one line its super handy to have such a method.

For example you generally work with OfflinePlayer and write a friend system and someone sends a friend invite it looks better (my opinion) if you use

OfflinePlayer op = ....

op.ifOnline(player ->...
rustic folioBOT
#

I get the second part of your message, but I don't understand the first part. As far as I know, once the repo restructure happens there will be a patch per class, so it won't be another patch and you might also have too many patches (I don't know how many classes Paper modifies) for github and since I don't add a new class i also won't add a new patch. But starting to argue with the fact that "githubs folder can't manage it" or "the maintenance effort of the patch", really?

But as I alrea...

#

Yes, really. We use GitHub and manage the project on GitHub, the fact that we cannot even view the patches folder is a pretty hefty deal, and until we hard fork, that is going to be an annoying problem to contend with. With the new layout, patches will be organized into a folder tree, so that we don't have over 1000 patches in a folder, and then we'll be able to manage it.

In that time, either patches should be merged into other patches, or they need to further justify their worth to the p...

#

Not to be rude or something but I feel like this is a "I just want to contribute something" kind of deal. Is getting rid of like two lines of code worth the maintenance?
I also don't think it's worth adding something like this since as previously mentioned you can already write code that only executes if the player is online.
But, the decision is not up to me, and again, I am sorry if I came along rude with this first sentence.

#

This is getting a bit out of hand, so here's some closing words: As emily said, the benefit to this is relatively small. Patch formats aside, adding such helper methods to API for saving the braces and line breaks of an if statement in fairly niche use-cases isn't worth adding another method you have to scroll through. Appreciate the thought anyways

rustic folioBOT
#

Not to be rude or something but I feel like this is a "I just want to contribute something" kind of deal.

No. It is not just a "I just want to contribute something" case. I have already said above that I just wasn't aware of the instance of check and later I expanded my argumentation with a use case. I already admitted that, if you don't want to expand this particular API because its implementation sucks, is another good reason.

isOnline does not promise that a player is actually c...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

This pr currently breaks BlockExplodeEvent since it only gets called when the entity in the explosion is null, I'll fix this soon.

Are you sure? I did not look too much into the code, but aren't you mixing up the entity that exploded with the entity that caused the entity/block to explode? I think the one you have added is in the DamageSource...

No, prior to the commit I just made, to differentiate whether to call an EntityExplodeEvent or BlockExplodeEvent, Explosion.java would ...

#

This pr currently breaks BlockExplodeEvent since it only gets called when the entity in the explosion is null, I'll fix this soon.

Are you sure? I did not look too much into the code, but aren't you mixing up the entity that exploded with the entity that caused the entity/block to explode? I think the one you have added is in the DamageSource...

No, prior to the commit I just made, to differentiate whether to call an EntityExplodeEvent or BlockExplodeEvent, Explo...

rustic folioBOT
#

:tada: Welcome to paper, thank you for your first PR!

I have yet had time to test this or go through the rest of the affected code, but I added some general questions that popped into my mind on the first read-through.

The diff you need in Explosion is kind of ugly, depending on your answers to the questions we might have to look for a better way to implement this.
Manually checking for the damage source being bad_respawn_point seems not too future proof.

rustic folioBOT
#

Expected behavior

Moving minecart:
Using /execute at run tp ~10 ~ ~ with a moving minecart should quickly move it 10 blocks east, before it would continue to move like normal (works with normal vanilla Minecraft)

Falling creeper:
Executing /execute at run tp ~ ~ ~ on a creeper that is falling from the sky should leave it falling like nothing happened, because it doesn't modify the creepers position at all (also works fine with vanilla Minecraft)

Observed/Actual behavior...

rustic folioBOT
rustic folioBOT
#

This is a small cleanup of the events (mostly paper ones) with some redundant stuff that comes often when reviewing event pr (like annotating the constructor as Internal, formatting etc.). The server changes is just an update to use the right methods that probably didn't exists yet at the time the event was made and some other minor things.

rustic folioBOT
#

Adding the same field or class name that is already linked is redundant and means they can become wrong if the reference itself is renamed

Moving non-final fields below final fields isn't necessarily a 'standard' convention, but still a nice one to keep here

I feel like the handlers should instead all be made lowercase to follow java conventions, since the list object is not constant

... I also stopped looking after API patch 260 because my browser can't handle opening more lol

#

Wouldn't this just require more changes to hurt() in LivingEntity? It seems like all the existing logic in there would just have to be implemented twice, since the entity "causing" the event is still the person who ignited the block. I know that this avoids having unintended side effects with other parts of the code but I don't see a way it could be implemented cleanly without just mostly duplicating the logic.

#

Well that is exactly the point tho.

Vanilla does not consider the "igniting entity" the causing entity of the damage.
This PR should not change this. The logic in LivingEntity#hurt acts on the causingEntity of the damage source, which should remain null for explosions from e.g. respawn anchors.

You are merely supposed to hijack the DamageSource to pass through the entity that ignited the block so that the API event can expose it.
Changing what vanilla considers the actual causingEn...

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: pp
rustic folioBOT
#

The function that checks wich blocks should be included in a collision has a special case with blocks that have a "Block" Shape.
If it is a Block, the check wether the block should be included in the collision does not subtract a collision-Epsilon from the bounding box
The Optimized Implementation of paper did not have this special case, wich intruduced non-vanilla behaviour

This PR fixes https://github.com/PaperMC/Paper/issues/9807

#

The function that checks wich blocks should be included in a collision has a special case with blocks that have a "Block" Shape.
If it is a Block, the check wether the block should be included in the collision does not subtract a collision-Epsilon from the bounding box
The Optimized Implementation of paper did not have this special case, wich intruduced non-vanilla behaviour

This PR fixes https://github.com/PaperMC/Paper/issues/9807

rustic folioBOT
#

The code that Vanilla uses is likely a poor copy of optimisations Paper previously had years ago. The problem with this code is that Vanilla is not adhering to the collision system's principles, as the epsilon exists to fix collision bugs. The collision patch also fixes issues with the epsilon in hard entity collisions (i.e boats) as well, which are not going to be reverted.

Really, this should be reported to Mojang.

rustic folioBOT
#

The PR changes the code that is responsible for checking wich blocks to collide with, not collision itself

This is only an problem on Paper currently, and causes noticable non vanilla behaviours as shown in the confirmed issue (https://streamable.com/dibq02)

the collision without epsilon is only used on Blocks with a "Block" Shapes, and would not revert any other collision that follows the epsilon rule

rustic folioBOT
rustic folioBOT
#

Expected behavior

I’m writing a plugin for a functional block with an inventory and I’ve encountered a problem that when you hold down the mouse button on a slot, move it to another slot or behind the inventory, the click is simply not registered. This is not a visual bug and it works with any inventory

Observed/Actual behavior

There is a showcase of problem: (https://youtu.be/SQjU9whcCIo)

Steps/models to reproduce

  1. Take item to cursor
  2. Hold down mouse button on slot
    3....
rustic folioBOT
#

Is your feature request related to a problem?

I was working on a plugin that requires me to listen to when an entity moves and I tested to see if it worked when a player rides it and it didn't fire the EntityMoveEvent for some reason

Describe the solution you'd like.

I would like it to fire the EntityMoveEvent when riding an entity like a pig

Describe alternatives you've considered.

It is possible to listen to the PlayerMoveEvent and check if they are riding the entity but it...

rustic folioBOT
rustic folioBOT
#

Stack trace

It is too long that github not allowed me to submit. so i upload the crash log file.
Uploading hs_err_pid8459.log…

Plugin and Datapack List

None datapacks either plugins. Original Paper Server.

Actions to reproduce (if known)

I just download the lastest paper server (1.20.4) jar to my mac. I try to run it on my computer's java environment. After loading Spark (known from the server log), the app just crash and output the jvm crash log.
It seems to some nat...

rustic folioBOT
#
[PaperMC/Paper] branch deleted: pp
rustic folioBOT
#

Is your feature request related to a problem?

There's no info in InventoryClickEvent javadoc about InventoryDragEvent being called instead when player clicks and drags their cursor. Many developers with no experience with inventory API just don't know this behavior and there's no info about it in the documentation.

Describe the solution you'd like.

Reference InventoryDragEvent in InventoryClickEvent javadoc mentioning the behavior. The @see tag would also be appreciated.
...

rustic folioBOT
#

The EntityMoveEvent fires when an entity that the server controls moves. Its called inside the aiStep() method. As soon as you mount an entity, that entity is no longer controlled by the server but instead completely under the control of the client and the server only validates that movement. The entity basically becomes a "player" as far as the server is concerned.

So while this behaviour might be a bit confusing at first, it is working as expected. I don't think additionally calling a...

rustic folioBOT
#

Adds Event to detect Presses and Releases of Buttons&Pressure Plates.

I know button press can be detected via InteractEvents, but my main motivation was the Release part, which does not have any event. So if you deem it to be too much, I can rework it into something like BlockReleasedEvent or BlockRevertedToDefaultEvent...

#

Not really commenting on the merits of this event, but you can check for the pressing and releasing of pressure plates and buttons using BlockRedstoneEvent, can't you?

Yes, you can... Again, the pressing Part is there for sole parity/symmetry of the event... also as opposed to BlockRedstoneEvent, which is called for dozens other cases, this is only for the presses...

rustic folioBOT
rustic folioBOT
#

Expected behavior

No error, it's just a hidden system file.

Observed/Actual behavior

On server start this error is shown:

Loading libraries, please wait...
[22:29:03 ERROR]: [EntrypointUtil] Directory 'plugins/.DS_Store' is not a jar file, cannot load a plugin from it!
java.lang.IllegalArgumentException: Directory 'plugins/.DS_Store' is not a jar file, cannot load a plugin from it!
	at io.papermc.paper.plugin.provider.source.FileProviderSource.prepareContext(FileProvider...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

[17:32:56] [ServerMain/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[17:32:58] [ServerMain/WARN]: Failed to load datapacks, can't proceed with server load. You can either fix your datapacks or reset to vanilla with --safeMode
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Overworld se...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Having this on a Entity interface feels wrong. player.getPickRadius() will confuse many people into thinking it's a radius of player ability to pickup items. Also, Item already has canMobPickup() and canPlayerPickup() methods, so a having third one with such unclear naming will mess stuff up.

I'd say this better to be abstracted as an interface with getPickupRadius() method (also maybe getItemStack()?), and make related Entity interfaces extend it (I guess it's just Item ...

rustic folioBOT
#

I'd say this better to be abstracted as an interface with getPickupRadius() method (also maybe getItemStack()?), and make related Entity interfaces extend it (I guess it's just Item and AbstractArrow right now).

I'm a bit confused? This doesn't related to picking up items/arrows - it's related to 'picking' entities, such as when you middle click to obtain a spawn egg or attack an entity.

Should this be mentioned in the JavaDocs then? I actually don't know if it should, all I can...

rustic folioBOT
#

I'm a bit confused? This doesn't related to picking up items/arrows - it's related to 'picking' entities, such as when you middle click to obtain a spawn egg or attack an entity.

Oh, sorry, I don't really know the internals. But honestly, then it sounds even more confusing. Even though NMS uses "pick", I think there should be a better term/wording for this, and javadocs are clearly.. unclear of what exactly the parameter is.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is there a reason why the default fallback is the US locale? I'd say if player's locale cannot be parsed, it'd better be something like Locale.ROOT, so we can check for that and act accordingly, like warning a player.

Personally, I would say it is very standard to default to English. I am biased, but defaulting to the server's root Locale seems like it could cause issues

rustic folioBOT
#

Personally, I would say it is very standard to default to English. I am biased, but defaulting to the server's root Locale seems like it could cause issues

Well, there's also Locale.ENGLISH which is used fairly often too, hence the question. Also, the root locale isn't "server's root locale", but rather a neutral one, as stated in its javadoc.

#

I find requireNonNullElse to be rather unwieldy. It was used at the other location because otherwise 200+ patches would have their line numbers changed.

If the maintainers would prefer
this.adventure$locale = java.util.Objects.requireNonNullElse(net.kyori.adventure.translation.Translator.parseLocale(locale), java.util.Locale.US);
here then I'll make that change

#

Is there a reason why the default fallback is the US locale? I'd say if player's locale cannot be parsed, it'd better be something like Locale.ROOT, so we can check for that and act accordingly, like warning a player.

Locale.US is the fallback locale used elsewhere:
https://github.com/PaperMC/Paper/blob/c5d168cef92148a6799141832fdb5f95732c1a38/patches/server/0010-Adventure.patch#L2763
https://github.com/PaperMC/Paper/blob/c5d168cef92148a6799141832fdb5f95732c1a38/patches/server/0010-A...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Ignoring it?

Observed/Actual behavior

Paper is crashing if Mojang has an active fail2ban on the server because of dossing attacks
It needs one player with a Chatmod and active Playerheads in it, textures can't loaded and the server is dead

Steps/models to reproduce

Don't know

Plugin and Datapack List

https://www.curseforge.com/minecraft/mc-mods/chat-heads

I think

Paper version

Latest

Other

Sorry no Log, because I get dossed for a full w...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Display entities tick, but this is unnecessary unless you need them as passengers.

Describe the solution you'd like.

Separate options to disable ticking all four display entities (Display, TextDisplay, BlockDisplay and ItemDisplay) - and, if possible, interaction entities as well.

Describe alternatives you've considered.

I don't believe there are any.

Other

Someone proposed this on the Paper Discord last March, but I d...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

The mentioned error should not occur.

Observed/Actual behavior

I got the following Exception on my Server:

[01:13:16] [Server thread/ERROR]: Entity threw exception at world:-804.5000776586575,46.9375,-232.63654721077813
java.util.ConcurrentModificationException: null
    at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:756) ~[?:?]
    at java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:778) ~[?:?]
    at net.mi...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I've so far been completely unable to reproduce this. I suspect it only happens with specific config settings or only in certain worlds for some reason.
Could you share your configuration files (Bukkit, Spigot, Paper world and global config) in a paste link too? Does it only happen with specific players or in specific locations?

We need something to narrow it down a bit - if we can't reproduce the issue, we can't really fix it.

rustic folioBOT
rustic folioBOT
#

Expected behavior

When you die in vanilla, with immediate respawn enabled, you die, and instantly (or semi-instantly) respawn.

Observed/Actual behavior

In my experience, you kinda fall through the floor for a few seconds prior to respawning.

Steps/models to reproduce

Literally just enable immediate respawn, and die, i used fall damage, but /kill works as well.

Plugin and Datapack List

ViaBackwards, ViaVersion, WorldEdit

There are 2 data pack(s) enabled: [vanilla (bui...

rustic folioBOT
rustic folioBOT
#

Thanks for you response! Sure thing, below are paste links for both global and world configs.

There are 5 of us that play on the server and the crashes occur when any one or number of us are logged in. Doesn't seem to happen in specific locations in our world. It's crashed when we've been in various places in the Overworld and other dimensions.

Global Config
https://paste.gg/p/anonymous/f8c4703f2aef43ea91a92aafcf12380e

World Config
`https://paste.gg/p/anonymous/c3d5fbe9ac89475b8...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

We should probably allow the ability to pass custom MiniMessage instances for this for custom tags and whatnot.

Having an option to pass custom ComponentSerializer in general would be helpful too.

As a side note, this will currently throw an exception if a user uses § in their string. I'm just thinking that there should be some safe railings for this case (like returning a def/null component), or at least some javadoc info mentioning the behavior.