#paper

1 messages ยท Page 8 of 1

rustic folioBOT
#

I would like to point out that either nobody is allowed to have OP or the spawn protection must be set to 0. There is no in-between. This would be a way to allow this intermediate path and keep the server vanilla as much as possible. Because WorldEdit/FAWE and WorldGuard on top only to allow people to build on spawn via "flags". I think that's excessive from my admin and dev point of view

rustic folioBOT
#

I mean, this way you are adding a permissions plugin into the mix.
Something that may also not be present on the "vanilla" server. The plugin "horde" is now 1 plugin instead of 2. Still with the same previously stated issues and now you install one permissions plugin instead of two (WG + WE) to allow builders to make use of a barely functioning protection mechanism.

I digress however, while I personally don't care for this patch, other members might so we can leave this up for discussion.

rustic folioBOT
#

Expected behavior

Adjusting the config option ticks.per.mob-spawner should effect how often spawners tick/how often mobs are spawned from them.

Observed/Actual behavior

Setting this value to any number appears to have no effect.

Steps/models to reproduce

Set the number to default of 1 or 2 and then compare by setting it to a high number of 50.

Plugin and Datapack List

No plugins, clean paper server

Paper version

version
[03:46:06 INFO]: This server is running P...

rustic folioBOT
rustic folioBOT
#

I was able to reproduce this on a new world with a simple test case:

@EventHandler
public void on(AsyncStructureGenerateEvent e) {
    e.setBlockTransformer(new NamespacedKey(this, "hey"), new BlockTransformer() {
        @Override
        public @NotNull BlockState transform(@NotNull final LimitedRegion region, final int x, final int y, final int z, @NotNull final BlockState current, @NotNull final TransformationState state) {

            return current;
        };
    });...
rustic folioBOT
#

There exists an item duplication error associated to this issue: vid coded a quick bandaid that disabled block place/breaking on the server while we look at a more permanent solution: jar

Are you using the newest lootin version from spigot (or the discord fix from earlier), in a world that hasn't been generated yet and set
`use-new-structure-generate-liste...

rustic folioBOT
#

Is your feature request related to a problem?

I want to send virtual blocks (tile entities, here: Skulls/Player Heads) to the individual clients, without changing blocks on disk.
There is already the very promising experimental API Player#sendBlockChanges(Collection) and a Player#sendMultiBlockChange(Map).

The problem however is that the latter is not sufficient for tile entities, only for simple blocks that require no special block state.
The former feels sufficient, however ...

rustic folioBOT
rustic folioBOT
#

Expected behavior

Successful connection to server

Observed/Actual behavior

Connection failed. Please try again or contact an administrator

Steps/models to reproduce

https://github.com/PaperMC/Paper/assets/107011324/0309e72a-0479-4ad3-81bf-591f0bd73e81

Plugin and Datapack List

Plugins:
TCPShield, ViaBackwards, ViaVersion
Datapacks:
There are 8 data pack(s) enabled: [vanilla (built-in)], [file/coordinates hud v1.2.2.zip (world)], [file/real time clock v1.1.2.zi...

rustic folioBOT
rustic folioBOT
#

Oh, so you're saying that the method that takes in a Collection<BlockState> is actually not supporting the block states and is only used as a convenience type for (Position, BlockData)? Then I'd argue that the method is even misleading and would deserve a javadoc hint at least.

I don't know how old that overload is already, but maybe it would even make sense to have a behavior change on that method, then? Because basically if I take a BlockState snapshot and would use that method to ...

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

Expected behavior

According to the documentation:
https://docs.papermc.io/paper/reference/global-configuration#logging_log_player_ip_addresses
This option to false would stop logging of player IP addresses to console and logs.

Observed/Actual behavior

According to the documentation:
https://docs.papermc.io/paper/reference/global-configuration#logging_log_player_ip_addresses
This option to false would stop logging of player IP addresses to console and logs, but is stopped workin...

rustic folioBOT
#

Is your feature request related to a problem?

Currently, the API does not have any way of getting information about the reason a chunk was loaded, by what (load ticket type), and at what level it was loaded (entity ticking, redstone ticking) (ticket level). This would be really useful information for debugging and administration purposes. Especially to quickly find what is causing lag, where, and who made it, that would be really useful. Currently, this is only possible with workarounds ...

rustic folioBOT
rustic folioBOT
#

Welcome to paper :tada:

Thank you for first first PR to the project!
Your patch change was incorrect as it did not update the patch index numbers, I fixed that for you.
Make sure to check up on the CONTRIBUTING.md file.

Additionally, I changed the nullability of the passed colours to NotNull.

Beyond that, the changes look good tho :)
Can you review my changes to make sure this still fits what you were hoping to get merged :)

rustic folioBOT
#

With a heavy heart, I'll close this PR after some more discussion.
The spawn protection logic exists, but is by far enough to protect your spawn.

If you want builders to be the only ones building and changing your spawn, you'll need a proper plugin like WG anyway.
The fact that WG requires WorldEdit is, to that degree, annoying and I am unsure if you can lobby them to bundle some form of "minimal region selection" bs, but it doesn't change the fact that this permission flag is not useful...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Some of the diff in the server patch can be moved back to the patch that created it, such as simple renames, like the hasExactIngredients but that doesn't have to be done now, can be done before merging.

We also need to make it clear that mutating the stack within the Predicate provided in the create method does not support mutating the stack in an way. I don't want to open that can of worms, and I also don't want to copy the itemstack each time that predicate might be called.

rustic folioBOT
#
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MeFisto94 <MeFisto94@users.noreply.github.com>
Date: Fri, 22 Mar 2024 01:11:48 +0100
Subject: [PATCH] Make Player#sendBlockChanges support actually updating the
 BlockEntity


diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 206520f6f20b2e48b1eefdd4edb26510b88e4c92..c3776d5bb7fae624979ffc2f73bf266966acf81d ...
rustic folioBOT
#

Hey!
Whenever I code plugins, I must choose between saving my game data via PersistentDataContainers or a separate solution.
Normally, I prefer the PersistentDataContainer since you don't have to worry about the data being saved by the Minecraft server.
However, if you want to store larger objects with PersistentDataContainers it gets quite handy to store all the data.

That is why I have implemented PersistentDataObjects. They are added to PersistentDataContainers and implement seriali...

rustic folioBOT
#

Welcome to paper ๐ŸŽ‰

Generally, i can see the need to delay serialisation. Iirc we actually chatted about this a while back.

A major major problem I have with this, is the fact that we are now leaking instances and their respective plugin class loaders into the server state. This means that, if plugin A stores it's persistent data object on player 1, plugin A dies or gets disabled, we now have the server hold onto an object created from a class that is loaded from plugin As class loader even ...

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

I'd say a major reason the pre teleport events are useful is for plugins that wish to have display entities or armor stands ride on players, but of course doing so breaks if another plugin attempts to teleport with using the passenger flag. You could work around it using these pre teleport events and temporarily dismounting and remounting, but allowing them to add the flag in would make the process much smoother. Not really sure if there's really a reason against allowing flag modification - ...

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

Expected behavior

Bees are exiting the hive basing on their ticksInHive value (it have to be greater than 2400). When we skip ticks, let's say 2400, the ticksInHive should increase by 2400 and the bee should exit hive, but it doesn't.

Observed/Actual behavior

ticksInHive isn't modified and we still have to wait 2400 ticks even they theoretically passed

Steps/models to reproduce

  • Place the hive/nest block and some flowers, spawn a bee and wait until it collect nectar a...
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Not a problem, but this helps a lot with servers with big world sizes

Describe the solution you'd like.

A config option in paper-world-defaults.yml that would disable saving chunks to the disk if InhabitedTime is 0
Chunks would still be generated and sent to the player, but if InhabitedTime is 0, the server just doesn't save them to the disk

Another config option that would be useful is do not save chunks that are past the border
I...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

So, there's been an ongoing issue with Bukkit and anvil inventories that seems to have persisted for quite some time. It's been rather frustrating, to say the least. Essentially, when attempting to create an anvil inventory using Bukkit's createInventory method, things just don't function as expected.

The crux of the problem lies in anvils created this way ending up as type CraftInventoryCustom instead of the expected CraftInventoryAnvil. ...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I got this error when i try to test the EnchantItemEvent: https://pastes.dev/b5KQ0vJydM seems paper doesn't check if the itemmeta is null but it shouldn't be null in the first place for the item i tested (a sword) seems the amount is zero in that case. This is done using the new withType method on the ItemStack. You should probably override this method in the Craft impl too to avoid converting a CraftStack into an api one with this method.
The code is just: e.setItem(e.getItem().withType(Mat...

rustic folioBOT
#

Expected behavior

Changing the maximum length of the page, and max number of bytes in a page to -1 should allow for the player to use these books without these limits.

Observed/Actual behavior

The "Book too large!" kick seems to activate no matter what the config options are set to, page-max seems to work with all positive numbers up to 2147483647 so it is set to that, but the maximum length of page seems to be unchanged no matter what is in the config.

Steps/models to reprodu...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

2024-03-25 19:03:20,574 main WARN Advanced terminal features are not available in this environment
[19:03:20] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853]
[19:03:20] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.1 by Eclipse Adop...

rustic folioBOT
#

Is your feature request related to a problem?

It is currently impossible to get the base temperature of a vanilla Biome from its enum type.
These are hardcoded values used by the internals of the server that are however not exposed through the API.

As specified by the Minecraft Game Wiki:
image

###...

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: api/allow-self-unlist
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

CraftBukkit, Spigot, and Paper have all, for a long time, made changes to the server that changes the behavior to differ from the vanilla game. This is not always wanted by some server owners (see https://github.com/PaperMC/docs/issues/21 and https://github.com/PaperMC/docs/pull/326).

One solution would be to introduce the concept of multiple different configuration presets:

  • the "recommended" preset, which would be what our current configuration becomes
  • the "vanilla behavior" preset,...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: pw-gradle-update
rustic folioBOT
#

Expected behavior

The player would be kicked when floating for over the set value of 80 ticks .

Observed/Actual behavior

The player is not kicked when floating for over 80 ticks .

Steps/models to reproduce

Create a simple client mod that sets player.abilities.allowFlying to true (even indirectly). Join a paper server in the survival gamemode and float for over 80 ticks (4 seconds) next to a block. you will not be kicked. Go 2-3 blocks away from any other blocks and wait for 4...

#

im sure if this isnt added someone will want it, but a "best performance" preset that optimizes things at the cost of breaking vanilla features would be good. of course some settings exist that might need to be fine-tuned by a server owner based on hardware or player behavior, but these settings could be excluded.

i also just wanted to throw this out there, even if it might be a bit out of scope, but if its possible to create presets your own presets (which im sure someone will have some r...

#

im sure if this isnt added someone will want it, but a "best performance" preset that optimizes things at the cost of breaking vanilla features would be good.

This just reminds me of the various optimisation guides over the years which don't really document what a recommended setting they suggest does, or some server owner followed it blindly and now some mechanism doesn't work because they explicitly disabled the very thing they're testing, etc...

rustic folioBOT
#

Expected behavior

Get dropped items normally, or throw a more appropriate exception

Observed/Actual behavior

[19:18:21 ERROR]: Error occurred while enabling KioCG-TEST v2021 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.craftbukkit.v1_20_R3.CraftWorld.getHandle()" because "this.world" is null
        at org.bukkit.craftbukkit.v1_20_R3.block.CraftBlockState.getDrops(CraftBlockState.java:359) ~[paper-1.20.4.jar:git-Paper-462]
        at org.buk...
rustic folioBOT
#

Is your feature request related to a problem?

Not really, rather general code style

Describe the solution you'd like.

When working on a Jetbrains plugin I was positively surprised about how nice the plugin system works. I came across two patterns that I would love to use in Minecraft development and wanted to throw them in as ideas here.

Disposables:
A simple interface like Closable and AutoClosable, offering a void dispose() method. The dispose method is not similar to ...

rustic folioBOT
#

Thank you for the suggestion!

I am unsure if implementing either of these suggestions is something I personally think benefits the API enough to justify the tremendous amount of diff we'd have to maintain.

Disposable
The existing code does not care for the concept of object lifetimes on a fundamental level.
A world is managed completely different from a plugin or entity.
There is already events for this if plugins care for it. Implementing a observer like approach that automagicall...

rustic folioBOT
#

This is a weakness of Mojang's "anti-cheat". The same bypass is possible on vanilla servers, and is most likely due to slime blocks, ladders, or similar blocks.

Paper generally does not fix issues with the vanilla anti-cheat. Even if this specific issue was fixed, there are many other flight cheats that can easily bypass the built-in checks. And it is not really feasible to maintain what would essentially be a Paper Anti-Cheat.

The general recommendation is to simply install one of the...

rustic folioBOT
#

Backport some relevant stuff from the generators branch that fit into the main branch

  • Mark the bundle item as experimental, the sounds are so there are no reason to not mark them
  • Add PinkPetals#getMinimumFlowerAmount, like MachineMaker said in the original PR any int property that doesn't start from zero should have a minimum method (exception is the composter caused by the levelled interface).
  • Deprecate MemoryKey#SNIFFER_EXPLORED_POSITIONS, this key use the wrong generic type ...
rustic folioBOT
#

I get your point, there is actually no reason this should be part of paper explicitly. Especially Disposable could be a pretty nice library on its own. Here is btw the jetbrains explanation of how Disposable works. They use them in combination with their event system and listeners can be linked to a disposable to restrict their lifetime to that object too (for example a world specific listener to a world i...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

If you disable gravity and friction for an item spawned in the air and give it either an upward or downward velocity, it should fly at a constant speed forever in the chosen direction, provided there's enough space.

Observed/Actual behavior

The item will start to reduce it's velocity on the y-axis. It does this until there is no more movement on the y-axis. This should not happen since gravity or friction should not be affecting the velocity at all.

Steps/mod...

rustic folioBOT
#

Is your feature request related to a problem?

There is currently only one event that handles when player quits from the server, the PlayerQuitEvent. Unfortunately that event only works for players that were able to successfully connect to the server. Currently there is no event that is letting users handle disconnects from the server during the login phase.

Describe the solution you'd like.

We can add an event like LoginDisconnectEvent that lets plugin access the connection d...

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

Is your feature request related to a problem?

--forceupdate doesn't work multithreaded and it's too slow for updating big worlds. updateing 15k*15k world took 30 minutes.

Describe the solution you'd like.

make the world updater update chunks parallel not sequentially.

Describe alternatives you've considered.

there is no alternatives.

Other

have a good day.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Players sometimes connect to an old IP they found in chat and get met with "This server requires you to connect with Velocity."
I'd like to configure the message, as very little players know what that means.

Describe the solution you'd like.

I suggest a new field in the messages section of paper-global.yml that makes this configurable.
The code containing the message is found in 0774-Add-Velocity-IP-Forwarding-Support.patch

D...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Only the respective PlayerInteractEvent should be called

Observed/Actual behavior

When a player tramples farmland, the BlockFadeEvent is called.

Steps/models to reproduce

Cancel the BlockFadeEvent and trample farmland

Plugin and Datapack List

Paper Plugins: CityBuild, Commander, Protect, Tweaks, VanillaBans, VanillaMSG
Bukkit Plugins: FastAsyncWorldEdit

There are 5 data pack(s) enabled: [trade_rebalance (feature)], [bundle (feature)], [vanilla (bu...

#

https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/dc7d31b00d121c486660fafc9d6b4eb38e9db76d#nms-patches%2FBlockSoil.patch

This event call has existed for 6 years now, while not the best event for the operation, I'm not sure removing it is a good idea, especially as it covers missing usecases. Maybe a more accurate event could be substituted, but, this will likely not change

rustic folioBOT
#

The proposal suggests that nothing should happen if the config already exists and the argument is added. This, in my opinion, can be confusing in two ways:

  1. The player adds it to an existing server, expecting the e.g. vanilla config to take effect, but it doesn't.
  2. The player has the argument when initially setting up the server, but then removes it, expecting Paper to use the default configuration, while it keeps the pregenerated profile-based configuratuon.

While I don't have an...

rustic folioBOT
#

This patch fixes https://github.com/PaperMC/Paper/issues/10022 and https://github.com/sachingorkar102/Lootin-plugin/issues/24

When using WorldGenRegion#setBlock on a block position where a BlockEntity exists it doesn't remove the old one, this creates a broken state in the world and makes the clients crash due to an internal server error.

To fix these issue, I'm removing the BlockEntity when WorldGenRegion#setBlock is set (to fix new worlds) and I've changed the LevelChunk#tick method t...

#

This patch fixes https://github.com/PaperMC/Paper/issues/10022 and https://github.com/sachingorkar102/Lootin-plugin/issues/24

When using WorldGenRegion#setBlock on a block position where a BlockEntity exists it doesn't remove the old one, this creates a broken state in the world and makes the clients crash due to an internal server error.

To fix these issue, I'm removing the BlockEntity when WorldGenRegion#setBlock is set (to fix new worlds) and I've changed the LevelChunk#tick method t...

rustic folioBOT
#

The entry is added only to the pendingBlockEntities map, by default if there is something in the real blockEntities map it stays there (at least for ProtoChunks)

The issue is that if we use the AsyncStructureGenerateEvent with a block transformer it's going to access the BlockEntity and so WorldGenRegion creates it, but if that block is later changed the old block entity is still there because it's not removed from the blockEntities map

Check WorldGenRegion#getBlockEntity

#

@electronicboy I found another issue related to this (even if it's not the same) so I'm going to make another PR to fix it

Basically, if a Sculk Sensor is in a broken state (Block and Block Entity aren't right) the vibration system makes the player crash, this PR doesn't fix it

`net.minecraft.ReportedException: Ticking player
at net.minecraft.server.level.ServerPlayer.doTick(ServerPlayer.java:856) ~[main/:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.tick(ServerGa...

#

cleaning up the diff is moreso just accepting that the thing is going to look at bit messy, i.e. reverting the indentation changes;

I was hoping that the tick logic would get to the block entity before it blew up, will probably have to just make the server check that the blockstate is valid for any block entity sets during loading in order to remove them earlier

Yes, that's a better way to do it, do you want me to add that in this PR or another one?

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Don't send packet if client not really set item in slot.

Observed/Actual behavior

Video

Steps/models to reproduce

Listen for ClientboundContainerSetSlotPacket and fast click item in any inventory

Plugin and Datapack List

Bukkit Plugins: FastAsyncWorldEdit, ProtocolLib, SkydustryCore, Terra, Vault, ViaBackwards, ViaVersion

Paper version

This server is running Paper version g...

rustic folioBOT
rustic folioBOT
#

Expected behavior

I expect to see the event cancel.

Observed/Actual behavior

The event is firing twice, that leads to an ItemStack duplication.

Steps/models to reproduce

I'm not sure if it's the right place to report code problem for spigot seeing the template.
In any case, here is the code to reproduce this issue :

public class TestClickBug extends JavaPlugin {

    @Override
    public void onEnable() {
        Bukkit.getPluginManager().registerEvents(new Lis...
rustic folioBOT
rustic folioBOT
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:
f02baa38 PR-988: Add World#getIntersectingChunks(BoundingBox)
9321d665 Move getItemInUse up to LivingEntity
819eef73 PR-959: Add access to current item's remaining ticks
c4fdadb0 SPIGOT-7601: Add AbstractArrow#getItem
be8261ca Add support for Java 22
26119676 PR-979: Add more translation keys
66753362 ...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

The string should disactivate. The disarming mechanic is used as an activation method for a cobblestone farm [https://www.youtube.com/watch?v=zHM2ydgLzQs] (lava flows down onto the string, activating the mechanism over and over)

Observed/Actual behavior

The string in singleplayer becomes deactivated, on Paper it breaks and drops

Steps/models to reproduce

In singleplayer (or a server with some other engine): Place 2 tripwires and a string in between, shear th...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

I expect InventoryDragEvent being called, as it does with other game modes

Observed/Actual behavior

When in creative, instead of calling InventoryDragEvent at the end of the drag as usual, one InventoryClickEvent is fired per slot dragged into

Steps/models to reproduce

public class DragIssuePlugin extends JavaPlugin implements Listener {

  @Override
  public void onEnable() {
    getServer().getPluginManager().registerEvents(t...
rustic folioBOT
#

adding a config option generally offers a level of commitment beyond just having something sitting around for a while, otherwise, we'd need to investigate putting it as part of the forceUpgrade pathway so that we can tell people to just run that before we remove it, but, that seems meh

I didn't check how the forceUpdate flag works in the code but that sounds like a good idea, it's something that doesn't run everytime a chunk loads and it's a thing that servers with corrupted worlds would...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

I'd like to be able to access and edit the item entities a player drops when they die (not just the ItemStacks) - for example, to mark them as "owned" by another user, changing their despawn time, moving them in the game world, etc - things not possible with the itemstack list exposed by the death event.

This was possible for a time with https://github.com/PaperMC/Paper/pull/7650. However, this change was reverted due to plugin incompati...

rustic folioBOT
rustic folioBOT
#

Why only for Player? I think it would be more useful to have more a generic event like EntityDeathDropItemEvent, at least because I also needed it yesterday (and because in (Item/Entity)SpawnEvent it is currently impossible to get which mob's death led to the spawn of this Item entity).

Another idea is to add method like getCauseEntity() to ItemSpawnEvent which will return the Entity that led to the spawn of this Item (a dead entity, or the entity who threw it (player (from...

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

Serializing multiple items to bytes isn't trivial, so often beginners fall into the trap of using output IO streams and Bukkit serialization instead, so these provide helpful extra methods to deal with item arrays.

Also kept the serialization methods exposed in API as a sort of textbook example/nudge in the right direction of what should be used instead of object streams

#

hundreds of gigabytes? I have a temporary way to reduce the save file size, you can using MCA_Selector to remove any extra chunks, this is the safest and quickest way, no doubt about it, unless you end up deleting chunks with buildings in them. and then figure out a way to squeeze Cesium_Storage_Format into your server (just kidding, Cesium is still in the testing phase and probably not suitable for server integration).
try reducing the server's render distance to prevent loading unnecess...

rustic folioBOT
rustic folioBOT
#

I'd propose additionally wiring it into the SysoutCatcher or similar, so that it nags authors to stop using it. As demonstrated by the SysoutCatcher, an effective way to get plugin authors to stop using something is to get half their userbase to nag them about it.

not instantly, that would be meh, at least give people one cycle to notice the deprecation

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Hello, we're currently having some issues due to the amount of iron golems in our players' farms. They have large quantities of Iron Golem Spawners and the Iron Golems do not despawn (contrary to Monsters).

Describe the solution you'd like.

Add an option to make the iron golems despawn.

Describe alternatives you've considered.

I've tried with plugins such as ClearLag but if players simply don't load the entities they won't get cle...

#

Is your feature request related to a problem?

Hello, we're currently having some issues due to the amount of iron golems in our players' farms. They have large quantities of Iron Golem Spawners and the Iron Golems do not despawn (contrary to Monsters).

Describe the solution you'd like.

Add an option to make the iron golems despawn.

Describe alternatives you've considered.

I've tried with plugins such as ClearLag but if players simply don't load the entities they won't get cle...

rustic folioBOT
#
[PaperMC/Paper] branch deleted: shade-filtered-jar
rustic folioBOT
rustic folioBOT
#

My server was set up before the map was generated.
<paper-world-defaults.yml>
feature-seeds:
generate-random-seeds-for-all: true

<spigot.yml>
seed-ancientcity: 200xxxxx
seed-buriedtreasure: 103xxxxx
seed-desert: 143xxxxx
seed-endcity: 103xxxxx
seed-fossil: 143xxxxx
seed-igloo: 143xxxxx
seed-jungle: 143xxxxx
seed-mansion: 103xxxxx
seed-mineshaft: 158xxxxx
seed-monument: 103xxxxx
seed-nether: 300xxxxx
seed-ocean: 143xxxxx
seed-outpost: 1657xxxxx
seed-portal: 342xxxxx
seed-s...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Somebody who can tonguetangulate better than me would be appreciated, but, generally;
This logger is owned by the Minecraft server software, for logging plugin messages, you should use a Logger from within your own contexts, i.e. Plugin#getLogger(), or create a logger for your Class (i.e. slf4j) in order to retain contextual information which is used for identifying the source of messages

rustic folioBOT
#

Expected behavior

Eyes of Ender should point to strongholds regardless if they are outside the border because this is how it occurs in the vanilla game.

Observed/Actual behavior

Eyes of Ender don't point to strongholds if they are outside the border, only if they're inside.

Steps/models to reproduce

  • Change the World Border Size to like 1000 (something out of the stronghold ring)
  • Throw an Eye of Ender
  • Now try changing the World Border to something within a stronghold l...
rustic folioBOT
#

After a bit of discussion, I'll have a look at simply porting this check to a plugin that can perform this check via command.
Maintaining this fix in paper for a single issue caused by a shitty spigot api implementation is rather annoying, so a plugin for people affected by this seems more friendly.

I'll leave this open in case my timeline tomorrow explodes and I don't find the time for this soon.

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: api/allow-self-unlist
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

The text components on the item are correctly upgraded to 1.20.4, regardless of if there is quotes around true/false text components.

Observed/Actual behavior

The item appears to have no name/lore if quotes are present around a true/false. While the quotes were technically still considered incorrect before 1.20.4, older versions were less strict and rendered names and lore fine.

Steps/models to reproduce

On a 1.20.2 server, /give yourself 2 items:
/give...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I don't think listed is a descriptive enough word to be used alone to describe this kind of API. Along with my msg about the listProfile method name, the various update names should be changed to be like sendTabListLatency, sendTabListDisplayName, etc.

Additionally, there is no method to remove a profile, only disable it's listed status. These things are separate and should be controlled separately. Send a fake Profile but also have a separate option for listing it or not. And...

#

I'm closing this as WAI. To be clear, this only happens in the creative inventory screen while in creative mode, not in other regular inventories. The client does indeed send an individual ServerboundSetCreativeModeSlotPacket for each slot to set the contents based on the client drag. The event that is fired for each of those packets is an InventoryCreativeEvent (which is a subclass of InventoryClickEvent).

#

While I cannot replicate the "event firing twice bit", the duplication caused by cancelling the event is works-as-intended. The InventoryClickEvent is actually an InventoryCreativeEvent which is fired for a specific packet the client sends for any interacting with the creative mode inventory while in creative mode. It basically gives the client full control over all the items in all the slots. This packet doesn't contain any information about what kind of click or action it was as the...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

I suggest an API to know if an entity or plugin can do some action. This can be useful when a server use a protection or anti-cheat plugin.

The advantage of this API is that it allows you to ignore which plugin is preventing the action. No more need to implement each plugin in maven/gradle + less known plugins will benefit from this API

Describe the solution you'd like.

/**
* Used to know if the given entity can place a block at t...

#
If it's not implement in Paper, the alternative is a free library plugin .

in fact, it is even an obligation for the support of versions prior to the creation of the paper api

I mean, that's long been the issue with stuff like this, either we implement a service inside of paper which lets plugins adopt this, noting that many won't because they still target 10 year old versions of the server software, or, we basically just do what vault did and throw it into a plugin, but, we'v...

rustic folioBOT
#

Ok, I think the correct solution is for getDirection to return the same value regardless of if its an extend or retract, just returning the direction the piston head is relative to the block itself.

However it will break plugins behavior on Spigot. Especially plugins tracking sticky pistons blocks movement as on Spigot the method (for sticky pistons) returns piston head direction for extend and the opposite for retract. It's not ideal though as well because currently on Spigot normal pis...

rustic folioBOT
#

This exposes some functionality of the underlying ChunkTrackingView.

When adding certain objects to chunks, it is often desirable to have actual knowledge as to who is currently seeing this chunk, to selectively send informations to those viewers.

This can be useful for holograms and similar functionality.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: fix-source-jar-for-deobfed-traceelements
rustic folioBOT
#

Introduction

This patch added an API to get the player's proxy address.
It will be useful if the server uses multiple proxy instances that support HAProxy Protocol (frp, nginx, etc.) and wants to know which proxy instance the player uses.

How?

I added a method, which is Player#getProxyAddress. This method returns an InetSocketAddress, if the server didn't enable Proxy Protocol, or the player didn't connect with an HAProxy instance, then it will return null.

Example

...

#

Introduction

This patch added an API to get the player's proxy address.
It will be useful if the server uses multiple proxy instances that support HAProxy Protocol (frp, nginx, etc.) and wants to know which proxy instance the player uses.

How?

I added a method, which is Player#getProxyAddress. This method returns an InetSocketAddress, if the server didn't enable Proxy Protocol, or the player didn't connect with an HAProxy instance, then it will return null.

Example

...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

https://paste.gg/p/anonymous/86b2e3a03c464c0ca3536a398ca806e3

Plugin and Datapack List

Here's my class that extends BiomeProvider and is causing the server to crash.
The crash happens in the getBiome(...) method because vanillaBiomeProvider() calls the method it's in.

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

Actions to reproduce (if known)

No response

Paper version

[15:10:16 INFO]: Checking version, please wait...
[15:10:17 I...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

There is currently no any ways to prevent individual chunks from being saved. This applies to both regular automatic incremental saving and API-based saving.

Describe the solution you'd like.

It would be very convenient to have a ChunkSaveEvent with the ability to cancel this event, or some other mechanism to control saving of chunks. Note that this event should also be called while unloading worlds too.

In addition, a `World#saveC...

rustic folioBOT
rustic folioBOT
#

Stack trace

[11:13:17.302 INFO]: asd[IP hidden] logged in with entity id 16 at ([startup_world]1.5, 4.0, 1.5)
[11:13:19.661 INFO]: asd issued server command: /stop
โ›[33;1m[11:13:19.669 WARN]: Called safeShutdown(wait=false)
java.lang.Throwable: Called safeShutdown
	at net.minecraft.server.MinecraftServer.safeShutdown(MinecraftServer.java:1067) ~[paper-1.20.4.jar:git-Paper-"32bba4b"]
	at net.minecraft.server.MinecraftServer.halt(MinecraftServer.java:1062) ~[paper-1.20.4.jar:git-...
#

You effectively give us nothing really to work with besides a StackOverflow. Usually the Exception gives you a hint where to start looking at. But it's pretty hard for us to figure stuff out without plugins. Besides that you are running on a fork. So you are generally on your own. Try to reproduce with paper and binary search the plugins. Lastly you are most likely running in offline mode. I give you the benefit of the doubt that you are running offline mode for testing.
The fact that the er...

#

@electronicboy Yeah that's the upstream commit I'm referencing, it's the only thing I have to go on at the moment.

@Leguan16 I've just tested in online mode with no third-party plugins or proxy, and I still get the error. I think you mistook placeholderapi for protocollib? I don't have protocollib and only mess with packets when it comes to the tablist. I'm working rn to cut out some more internals.

Ig this issue is partly wishful thinking that somebody just hadn't noticed yet.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

(Typing) I expect this, testing 123 123 123 123:
https://youtu.be/s9xF8NRkRVU

Observed/Actual behavior

(Typing) I get this, testing 123 123 123 123:
https://youtu.be/gUeE7jiia1Q

Steps/models to reproduce

Java 22; typing in consoles is broken on windows with paper, works on Java 21.
Java 22; typing in consoles works fine on windows with bungeecord/waterfall.

Testing on fresh Paper install with no plugins for sanity, same result, borked.

Plu...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Im able to check if a player is sprinting, and set if they are sprinting.

Observed/Actual behavior

Both do not work. If I check if the player is sprinting and I am sprinting, it returns false. it seems the client and server are somewhat out of sync when it comes to this, since after using setSprinting(boolean), the isSprinting() method is updated.

Steps/models to reproduce

Just run either of those methods anywhere, it wont work correctly.

Plugin and Dat...

rustic folioBOT
rustic folioBOT
#

I don't have x86 hardware worth firing up for this, so, span up the windows VM I have sitting around on this arm laptop;

  1. Terminal input inside of windows terminal generally seems kinda janky, using conhost provides a much better experience in general
  2. counter to 1, it seemed to have gotten stuck less, but, it still ends up getting locked up, it's almost as if the terminal stuff is just not reading the input for some reason, if you keep spamming it eventually seems to pick back up aga...
rustic folioBOT
#

I'm no longer sleepy and I have confirmed this on the latest paper (This server is running Paper version git-Paper-478 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 5436d44)) with default config and no plugins.

There must be at least one player online. That player must be moving. It's easiest to trigger if you run /stop while falling but it's not 100% reliable.

Below is another stacktrace with some additional logging I added.

  • 13:22:46.554 The server was interrupt...
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: fix/stackoverflow-on-stop
#

paper previously migrated away from using executeIfPossible as this throws a RejectedExecutionException when the server is shutting down, which is then picked up by the Connection handler object and causes the player to be kicked without the intended disconnection message that comes from commands such as /stop, /restart

This was fine, because previously changes made in spigot would just prevent these packets from being executed anyways. Instead, we'll just use a marker exception to try to ...

#

https://github.com/PaperMC/Paper/pull/10408 - should solve this issue. The patch on our side basically causes an issue as it tries to immediately execute the callback due to the server stopping, which runs off the main thread, which then causes issues because, we're off the main thread, so the packet handler tries to reschedule a callback onto the main thread, which immediately executes because we're stopping...

removing that patch fixes the issue, but, I also implemented an alternative so...

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

Yeah I'll adapt the original patch if there's interest. It's just that I didn't want to touch the Adventure patch if there's no interest.

I've had a look over it again, the only reason this code exists is to support chat preview, which was removed after a very brief existence in minecraft. I don't understand why AsyncPlayerChatPreviewEvent is still being fired if the feature was removed, it's a nonsense event.

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Actually Paper API has two events that are called when an entity is pushed or receives knockback from another entity.
This is good because EntityKnockbackByEntity of spigot doesn't allow non living entities. So I think that may be the reason why this event is marked as deprecated, it's just my idea.

EntityKnockbackEvent is very usefull to handle explosion that doesn't have a source, like an explosion by an Respawn Anchor or artificial exp...

#

The event is deprecated because it duplicates an existing paper event, if the paper events are missing a case, an issue should be filed for that so that can be mitigated, there's no point having multiple events for the same thing

If so, then it occurs to me to create an event that covers explosions with and without a source that includes a @Nullable getSource() method.

#
[PaperMC/Paper] branch deleted: fix/stackoverflow-on-stop
rustic folioBOT
#

We would like to thank you for your contribution here, however, such a feature is a bit too expansive for us to have in the API.
Mainly, we prefer that plugins defer the logic for saving themselves here.

Some PersistentDataContainers are serialized after plugins have been unloaded (e.g. Chunks) which results in ClassLoader Problems
Instead, plugins should try to store primitive data whenever possible, to prevent issues like this.

But as mostly explained by Lynx, this API has some is...

rustic folioBOT
rustic folioBOT
#

It might be useful to create an event that is invoked during an explosion, regardless of where it came from. Mainly, because although I know that there are currently events that are called on similar occasions, however, these events such as EntityExplodeEvent, BlockExplodeEvent and TNTPrimeEvent do not allow modifying explosion values, such as its radius or the push that the entities receive. This does not conflict with what the friend @electronicboy commented. I would appreciate the fe...

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

I think you should return a collection of chunks rather than the keys. If you use the getChunkAt method and pass false as the second argument, it'll just construct the chunk without generating it.

I specifically chose Set because it conveys an important property: There are no duplicates in the returned collection.
An overload method returning Chunks wont be added again. I initially had it but had a convo that made me remove it.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I think this bypasses the isSilent check that exists in the regular logic.

The more I look into this specific issue, the less satisfied I am with fixing it on the server. The correct fix is a client-sided one (as illustrated in the mojira issue). There are other inconsistencies we are creating. The sound now has a set seed and has the exact same pitch for all listeners which isn't the case in vanilla.

I think we should just not fix this as it would be too complicated to fix from the ...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

They aren't magic numbers, they are explicitly derived values that correspond with Chunk Coordinates and commonly represent a lighter way to store data about chunks, (longs vs a Chunk object).

Granted, a CraftChunk is still a pretty small class, but there is at least a non-zero performance impact of the mapping and allocations of sentChunks from the long->chunks and (and players usually have many hundreds of chunks loaded).

I'd still advocate for having both options, but perhaps t...

#

I did clarify on the conversation that I did miss the change to the behavior of getChunkAt, but at least, IMHO, that is part of the headache here, I guess most of my concerns are somewhat mitigated by the fact that we can generally assure that it's not going to create some fun and interesting issues due to world switching if you put the CraftChunk alloc in the correct place

rustic folioBOT
#

They aren't magic numbers, they are explicitly derived values that correspond with Chunk Coordinates and commonly represent a lighter way to store data about chunks, (longs vs a Chunk object).

Granted, a CraftChunk is still a pretty small class, but there is at least a non-zero performance impact of the mapping and allocations of sentChunks from long->chunk (and players usually have many hundreds of chunks loaded).

I'd still advocate for having both options, but perhaps th...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

The thing is, you can't conveniently edit effects that are overlaid from different sources. You can cancel an event and apply your own effect, but this will cause a new event in turn.

Describe the solution you'd like.

Add setDuration and setAmplifier methods

Describe alternatives you've considered.

No alts.

Other

No response

rustic folioBOT
#

Is your feature request related to a problem?

I am running a server in China and I hope that players can enter the game with Chinese names, but they encountered an Internal Exception: java.lang.IllegalStateException: Invalid characters in username in username error when entering

Describe the solution you'd like.

I hope the paper can create a feature in the configuration file that can switch this restriction on and off

Describe alternatives you've considered.

Searching for plu...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

https://pastebin.com/XZtUkSyK

Plugin and Datapack List

[14:02:14 INFO]: Server Plugins (49):
[14:02:14 INFO]: Bukkit Plugins:
[14:02:14 INFO]: - AdvancedRegionMarket, ajLeaderboards, BattlePass, BetterFarming, Chunky, ChunkyBorder, CMI, CMILib, CoffeeProtect, CoinsEngine
[14:02:14 INFO]: CoreProtect, CustomDrops, DailyBonus, DiscordSRV, dynmap, eco, EcoJobs, EcoSkills, ExcellentCrates, FarmLimiter
[14:02:14 INFO]: FastAsyncWorldEdit, GUIPlus, HeadDatabas...

rustic folioBOT
#

Stack trace

https://paste.gg/p/anonymous/8fad62fef9034ffeb1a3b925630335ae

Plugin and Datapack List

projectkorra (addons - jedcore, spirits, projectaddons, spirits - the complete set), chatex, essentialsX, LP, crazycrates, gsit, brewery, tab, placeholderapi, coins

Actions to reproduce (if known)

No response

Paper version

I can't start a server and paste output from /version, but minecraft version is 1.20.1

Other

No response

rustic folioBOT
rustic folioBOT
#

Expected behavior

BlockDropItemEvent should execute for indirectly broken blocks (like if a torch was on top of a stone block and the stone was broken- the torch also gets indirectly broken). Because BlockDropItemEvent has a Player attached to it, it should only occur if the block was broken by a player.

Observed/Actual behavior

When a block is broken indirectly by a player (like if a torch was on top of a stone block and the stone was broken- the torch also gets indirectly broken)...

rustic folioBOT
#
[PaperMC/Paper] New branch created: vineflower-1_10_1
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: vineflower-1_10_1
rustic folioBOT
rustic folioBOT
#

Expected behavior

Since a while i'm developing a plugin which acts as Addon for the plugin TrainCarts.
The purpose is to send minecarts/trains and their passengers between servers in a bungeecord-network.
I didn't update it for a while and now i'm dealing with the following problem:

I'm using the PlayerSpawnLocationEvent to put the player into a minecart (Entity.addPassenger(player)) as soon as he joined the server.

Observed/Actual behavior

Recently i get this error:

`j...

rustic folioBOT
#

Expected behavior

if I schedule something in a scheduled runnable then my scheduled runnable should run in the amout of ticks I specified.

Observed/Actual behavior

the scheduled runnable runs instanly

Steps/models to reproduce

try scheduling something in a scheduled runnable

Plugin and Datapack List

no other plugins

Paper version

[15:50:38 INFO]: Checking version, please wait...
[15:50:38 INFO]: This server is running Paper version git-Paper-451 (MC: 1.20.4) (Imp...

rustic folioBOT
rustic folioBOT
#

Stack trace

[07:07:55] [ServerMain/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[07:07:55] [ServerMain/INFO]: Found new data pack file/Incendium_1.20_v5.3.4.zip, loading it automatically
[07:07:55] [ServerMain/INFO]: Found new data pack file/Nullscape_1.20_v1.2.4.zip, loading it automatically
[07:07:55] [ServerMain/INFO]: Found new data pack file/Stellarity-2-2-0.zip, loading it automatica...
rustic folioBOT
#

Expected behavior

BlockPistonEvent should fire when a piston is activated & return the direction it fired in addition to whether or not it is sticky.

Observed/Actual behavior

The event does not fire as far as I can tell.

Steps/models to reproduce

Listen for BlockPistonEvent, trigger a piston & observe nothing even though the piston clearly fires. The event doesn't fire when blocks are pushed & when blocks are not pushed. The event doesn't fire at all.

Plugin and Datapack...

#

Is your feature request related to a problem?

Not that I know of.

Describe the solution you'd like.

I would like the ability to set the tickrate for a particular world on a server versus a global tickrate. This would enable different worlds to run at different speeds.

Describe alternatives you've considered.

I can't think of any alternatives other than just running multiple servers instead of multiple worlds on a single server.

Other

No response

#

Expected behavior

BlockPistonExtendEvent should fire when a piston is activated even if nothing is pushed.

Observed/Actual behavior

The event does not fire when the piston pushes no blocks.

Steps/models to reproduce

Listen for BlockPistonExtendEvent, trigger a piston which is set up to push air & observe nothing even though the piston clearly fires. The event doesn't fire when blocks aren't pushed.

Plugin and Datapack List

No datapacks & no other plugins.

Paper ver...

rustic folioBOT
rustic folioBOT
#

BlockDropItemEvent does not execute like the documentation says it does:

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

The documentation only mentions that items dropped by indirectly broken blocks will be included in the list from getItems, not that another event will be called for the other blocks, so the current behaviour could seem WAI to me.

rustic folioBOT
#

BlockDropItemEvent does not execute like the documentation says it does:

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

The documentation only mentions that items dropped by indirectly broken blocks will be included in the list from getItems, not that another event will be called for the other blocks, so the current behaviour could seem WAI to me.

That seems extremely strange to me. Especially becaus...

rustic folioBOT
rustic folioBOT
#

Expected behavior

That the lead do not turn into a ghost item.

Observed/Actual behavior

That the item doesn't turn into a ghost item and having to update player inventory after cancelling the event in order for the item to not render as a ghost item.

Steps/models to reproduce

Simply add this listener and just remove the if() clause.

    @EventHandler
    public void onLeash(PlayerLeashEntityEvent event) {
        Player player = event.getPlayer();
        ItemStac...
rustic folioBOT
#

I don't see any server crash happening in that log you sent, only some errors from invalid entities. Since you are also running an offline mode server I'm inclined to just close this here

yes, it does crash, and i can show you the video, as well as the online mode log

video:
https://youtu.be/XCUpb5RJzk8?si=-gS6vIUuIK3DkCcV (it does seem like i am, the client is the one who just got disconnected, but no, it's the server)
log:

[00:02:33] [ServerMain/INFO]: Environment: Environme...
rustic folioBOT
#

Threw together a quick plugin to iterate and process all chunks to find and remove these invalid block entities:

https://github.com/lynxplay/block-entity-bin

People that had their worlds corrupted by the respective bug may use the plugin to fix their chunk data.
Any form of issue regarding the plugin is to be opened on the plugin's github page, not paper's repository.
As with any form of world data shenanigans, backup your data before running this.

#

Threw together a quick plugin to iterate and process all chunks to find and remove these invalid block entities:

https://github.com/lynxplay/block-entity-bin

People that had their worlds corrupted by the respective bug may use the plugin to fix their chunk data.
Any form of issue regarding the plugin is to be opened on the plugin's github page, not paper's repository.
As with any form of world data shenanigans, backup your data before running this.

rustic folioBOT
rustic folioBOT
#

Expected behavior

Items in Inventory are added, and the value of the first argument ItemStack remains unchanged.

Observed/Actual behavior

The total number of items in Inventory remains the same, and the total number of ItemStacks passed in the argument is added to the total number when first passed.
The sample assumes transport from Chest to Hopper.

Steps/models to reproduce

@EventHandler
public void onItemMove(InventoryMoveItemEvent event) {
ItemStack item = event....

#

Expected behavior

The number of items set with Inventory.setItem will be reflected in the game for the inventory that can be obtained with InventoryMoveItemEvent.getSource().

Observed/Actual behavior

Even if the internal variables are treated differently, when you check the game, the changed number is not reflected, and it only performs the normal operation of transporting items one by one to the hopper.

Steps/models to reproduce

https://github.com/eventhandler
public void o...

rustic folioBOT
#

The server generally does not care to validate the state you've modified inside of the scheduler, if you want to modify stuff, you'll have to do it yourself with the scheduler; Such is a fairly typical caveat for inventory related things, there is no real good solution here which doesn't break existing behavior/expectations for this (fairly broken) event

rustic folioBOT
#

This was an unexpected answer because the changes were reflected in Spigot Server.
Therefore, we believe that the problem is caused by a change in Paper's implementation.
What I want to do is keep adding up the items sent by the hopper each time it moves.
Does this mean that it is difficult for me to solve this problem by changing the implementation?

rustic folioBOT
#

Chances are papers optimisations change behavior vs spigot here because there are some expectations, modifying the underlying inventory in the middle before the server performs its state modifications is going to create issues. Modifying the items that the server is trying to move is unsupported behavior here, there is a general expectation that the server is going to wipe your changes, and so you'd generally be better off using the scheduler to run after the event, this is likely not somethi...

rustic folioBOT
#

When I checked with a plugin (EventDebug) that allows you to check event calls, it appears that Hopper is only calling InventoryMoveItemEvent.
Let's talk about actual implementation, but which event can be used to make it possible?
Or is there currently no event implemented in Paper to make such changes?

#

There is no different event, modifying data as the server modifies it is unexpected behavior which we cannot support.

Maybe somebody else on the team will decide to invest some time into this, but, as it stands, what you're doing there is generally unsupported under the general "don't modify stuff as the server is doing so"

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Please feel free to test this branch and ensure that all legacy commands work the same. So, just load your server and ensure that all commands (with plugins) seem to be working correctly. This includes stuff like namespaced commands, etc.

There is now a jar attached to the PR body.

I've done some extensive testing and everything works without exceptions
Things I've tested include:
plain old bukkit commands that use Plugin#getCommand to register
commands from paper plugins t...

rustic folioBOT
#

Expected behavior

Loaded addon

Observed/Actual behavior

https://pastebin.com/Jvh8H5r5

Steps/models to reproduce

Fix it pls

Plugin and Datapack List

advancedlogin
eco
ecoarmor
essentials
libreforge
litebans
mbedwars
multiverse core
oldcombatmechanbics
spawn
viabackwards
viaversion
worldedit

Paper version

[09:54:43 INFO]: This server is running Paper version git-Paper-488 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 908b814)
You ar...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I made those changes as we were preparing this for a merge today.

We need to clone both, your proposed changes would end up with an unmodifiable view returned by getSentChunkKeys (one that is updated when the player moves) while getSentChunks is a normal clone.

Additional, a view is a dangerous thing given the fact that the server maintained set is not save for concurrent access. Callers would have to clone the returned view when trying to use it off the main thread, otherwise they'll run i...

rustic folioBOT
#

I made those changes as we were preparing this for a merge today.

We need to clone both, your proposed changes would end up with an unmodifiable view returned by getSentChunkKeys (one that is updated when the player moves) while getSentChunks is a normal clone.

Additional, a view is a dangerous thing given the fact that the server maintained set is not save for concurrent access. Callers would have to clone the returned view when trying to use it off the main thread, otherwise...

rustic folioBOT
#

Did I miss anything in the java docs regarding this being supposed to be a view?

It wasn't even a view in the initially proposed pr given it used Set.copyOf, which constructs an array based set.

This would also still not fix the issue that youd have getChunkKeysSent returning a view while getChunksSent would not. We could work around this with a transforming collection, but I honestly do not see the point of this being a view in the first place?

You'd save yourself a single internal clone ...

#

Is your feature request related to a problem?

In my plugin I sometimes use Player#setAllowFlight() for a few abilities, like allowing players in cobwebs to climb around. However this sometimes causes conflicts with other plugins that add features like /fly.

Describe the solution you'd like.

Similar to the method Player#hideEntity(Plugin, Entity), the setAllowFlight method could also take a plugin as a parameter, enabling flight for a player if at least one plugin enables flight...

rustic folioBOT
rustic folioBOT
#

Did I miss anything in the java docs regarding this being supposed to be a view?

It wasn't even a view in the initially proposed pr given it used Set.copyOf, which constructs an array based set.

Idk what documentation you referred to, nothing in this PR at least goes indepth of the dangers that using a view on a different thread poses.

To clarify, I am referring to the modifications proposed by @Vrganj, in his PR wherein the methods ar...

#

I'll bring up the use of view again in todays merge party regarding this.

Especially in regards to server state, a plugin incorrectly using this method and potentially screwing over the server terribly feels, at least to me, worth the "cost" of copying the open hash set once.

The long boxing is a good spot, will be included.

rustic folioBOT
rustic folioBOT
#

I'm not sold on the format for the config with this change. There are several options that I can think of that I'd prefer

despawn-ranges:
    monster:
        hard:
            xz: 30 # or "horizontal"
            y: 5 # or "vertical"
        soft: 20 # just putting a numerical value would mean it applies to both (as it does now)

or

despawn-ranges:
    monster:
        hard: 30
        soft: 20
        soft-y: 5 # basically the `-y` value wouldn't even be in...
rustic folioBOT
rustic folioBOT
#

Alright, talked it over with the view vs non view thing with some of the team.
Generally, my argument "protecting someone from getting the set, storing it and then using it off thread" is somewhat weak, agree with you on that end.

The argument of "api precedent" however, is what we are going to base the decision of copying the set on.
There is little to no views, as said early, on the API that directly reference internal server state (as in java Collection views, Entity interface being a...

rustic folioBOT
#

As you already said, this does not currently "work", as the distanceSqrt still takes into account the y diff.
Given we already have changes to basically every line in this section, I think it would be fair to just completely rewrite this logic
in a new paper block without consideration of keeping old code around/minimizing diff (given that this isn't minimal diff either, every line is touched beyond the two discard calls).

This would also heavily improve the variable names, making th...

rustic folioBOT
rustic folioBOT
#

Sounds reasonable. Discourse over the matter is good enough for me. It's not that significant of a difference in terms of performance for most users, anyway. ~and I can always reflect/nms into it if i need to, har har har~ I just wanted to bring up the topic to make sure it gets its due consideration before us committing to any given API contract.

#

image

What's weird is the API in 1.19 did say it would call the event multiple times unless I'm misunderstanding it. It says "Both items will have an event call" when describing a torch on top of a stone block. So I guess somewhere down the line the "fix" someone made for it was merging the dropped items in the #getItems() list. (Because yes, I did test it in 1.19 and it does in fact, not execute mult...

rustic folioBOT
#

Yeah, afaik, those docs haven't been correct for a while (hence the change to the javadocs in the latest version). Keeping track of blocks broken indirectly is not simple. Right now, the way the items work, is any ItemEntity that is added to the world in the "block breaking" logic is then included in the BlockDropItemEvent items list. So that's why it captures drops from indirect block breaks.

rustic folioBOT
#

Expected behavior

the iron golems should go through the water as seen in the video from an singleplayer world of the farm

https://github.com/PaperMC/Paper/assets/47952472/6e3294e3-e7d9-4f38-a2bc-c94ac62d5a7f

Link to schematic for the farm: https://www.mediafire.com/file_premium/yazr5bqfsotxk65/Iron_Farm_Castle.litematic/file

Observed/Actual behavior

the iron golems will be stuck at the edge of the drop

Steps/models to reproduce

Link to schematic for the farm: https://ww...

rustic folioBOT
#

Expected behavior

Sniffer responds to pathfinding; i.e. API returns true if appropriate and Sniffer makes its way to the target

Observed/Actual behavior

Sniffer does not respond to pathfinding; API always returns false

Steps/models to reproduce

test plugin code:

public final class TestPlugin extends JavaPlugin implements Listener, CommandExecutor {
    class SnifferCommand extends Command {
        public SnifferCommand() {
            super("sniffer");
        ...
#

Is your feature request related to a problem?

Probably related to #10442.
Related to #6862.

As Minecraft moves into the future, more and more of the new mobs are mostly controlled via the new systems instead of the old ones that the current Bukkit Goals API abstracts over, and the inability to control them from the Paper API is more glaring.

Describe the solution you'd like.

A new abstraction (or perhaps retrofitting the existing one) for controlling mob behaviours

Describ...

rustic folioBOT
#

Stack trace

---- Minecraft Crash Report ----
// I feel sad now :(

Time: 2024-04-20 23:37:23
Description: Exception in server tick loop

java.lang.StackOverflowError: Exception in server tick loop
	at java.base/java.lang.String.charAt(String.java:1517)
	at com.mojang.brigadier.StringReader.peek(StringReader.java:76)
	at net.minecraft.nbt.TagParser.readList(TagParser.java:144)
	at net.minecraft.nbt.TagParser.readValue(TagParser.java:138)
	at net.minecraft.nbt.TagParser.rea...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

yes @NBS-Paste as @electronicboy mentioned, that's indeed the Vanilla behavior there.

This question has been asked many times in paper-help Discord and my friend Kyle has made a simple plugin that allow entity to exist for an extended period of time without player within range,

https://hangar.papermc.io/Kyle/Otherside/

The source code can be viewed publicly and this "should" make most portal farm works (given that the entity is then transported back relatively quickly)
...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: fix/large-packets
#

Previously, PacketEncoder assumed that a packet value larger
than the protocol limit would be compressed to become smaller
than the protocol limit. However, not all packets will compress
below the protocol limit.

To try to better handle this, we will run the large packet handler
when the packet size is above the protocol limit when the packet
has a large packet fallback to avoid a case where the packet
does not compress below protocol limit (at which point, it is
too late to run the...

rustic folioBOT
#

Expected behavior

This settings should work and ignore duplicate UUID instead of deleting entity

    duplicate-uuid:
      mode: silent
      safe-regen-delete-range: 0

(also tested safe-regen-delete-range: 1)

Observed/Actual behavior

When I paste twice the same item_frame it deletes it and send an error in the console

[15:36:41 WARN]: [EntityLookup] Entity uuid already exists: a8d8f021-32a9-4f0a-bc6b-e3be5bdd6f6e, mapped to EntityItemFrame['Item Frame'/...
rustic folioBOT
#

Is this going to include support for resourcepacks?

Resource packs are client-side only. The server can already send resource packs to the client using the server.properties configuration or the API.

I meant that you can for example add the resource pack to you plugin jar and set it in the plugin-yml and the server is going to automatically send it to players and merge the different resource packs form plugins.

#

Is this going to include support for resourcepacks?

Resource packs are client-side only. The server can already send resource packs to the client using the server.properties configuration or the API.

I meant that you can for example add the resource pack to you plugin jar and set it in the plugin-yml and the server is going to automatically send it to players and merge the different resource packs form plugins.

No. You can already do that using the [API](https...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: ver/1.20.4
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: fix/large-packets
rustic folioBOT
#

Is your feature request related to a problem?

Mojang has for whatever reason removed the (+NBT) item lore tag in 1.20.5 instead of just renaming it to (+Data).
This makes it impossible to easily tell if, for example, a chest you have in your inventory has stuff in it or not.
Also with this weird change, Mojang created a new parity issue, as Bedrock has the (+Data) tag.

Describe the solution you'd like.

When updating Paper to 1.20.5, instead of following Mojang, just rename ...

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

Expected behavior

When teleporting an axolotl using both vanilla commands and with Skript, to a location with a modified pitch. The pitch should be retained in the axolotl.
Changing the "Rotation" NBT of the axolotl has the same results

Observed/Actual behavior

Axolotl's location and yaw are updated but not pitch. However, when leaving the server (my localhost) and joining back, the axolotl is updated to the pitch. For vanilla teleport command, Skript teleport, and changing the Ro...

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

looking at the implementation of the brain system across versions, it seems stable enough that short of mojang nuking the system out of nowhere in a future update, there's not much risk in doing a mostly 1:1 exposure of the API?

the one (1) thing that concerns me is that the set of available tasks tends to fluctuate a decent amount, but mostly in the direction of adding tasks/splitting existing tasks into multiple flavours
tasks in general are a bit weird from an API perspective because t...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT