Commit Graph

302 Commits

Author SHA1 Message Date
c6f962ba54 Prevent sending oversized item data in equipment and metadata
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-12-01 12:36:25 +01:00
977543c545 Brigadier based command API
== AT ==
public net.minecraft.commands.arguments.blocks.BlockInput tag
public net.minecraft.commands.arguments.DimensionArgument ERROR_INVALID_VALUE
public net.minecraft.server.ReloadableServerResources registryLookup
public net.minecraft.server.ReloadableServerResources

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Marc Baloup <marc.baloup@laposte.net>
2022-08-01 22:50:34 -04:00
445e9a65fb Added API to get player ha proxy address 2024-04-08 23:24:38 +08:00
3758965f88 Improve tag parser handling 2024-02-05 11:54:04 +01:00
368ca9c145 Fix creation of invalid block entity during world generation 2024-03-30 21:06:10 +01:00
f42abdfad3 Configurable max block/fluid ticks 2024-02-19 17:39:59 +01:00
046fc5171f Add onboarding message for initial server start 2024-03-10 20:10:41 +01:00
e57ad97c91 Add CartographyItemEvent 2024-04-07 16:52:42 -04:00
66ebf93c21 Add BlockBreakProgressUpdateEvent 2024-03-04 22:18:28 -05:00
46c2fbfb74 Reduce allocation of Vec3D by entity tracker 2020-04-27 00:04:16 -07:00
15fcde4b3c Fix NPE on null loc for EntityTeleportEvent
EntityTeleportEvent#setTo is marked as nullable and so is the
getTo method. This fixes the handling of a null "to" location
by treating it the same as the event being cancelled. This is
already existing behavior for the EntityPortalEvent (which
extends EntityTeleportEvent).
2023-12-09 19:15:59 -08:00
893616e851 Dont resend blocks on interactions
In general, the client now has an acknowledgment system which will prevent block changes made by the client to be reverted correctly.

It should be noted that this system does not yet support block entities, so those still need to resynced when needed.
2023-06-27 21:09:11 -04:00
ddbfcd4403 Restore vanilla entity drops behavior
Instead of just tracking the itemstacks, this tracks with it, the
action to take with that itemstack to apply the correct logic
on dropping the item instead of generalizing it for all dropped
items like CB does.
2022-03-22 09:34:41 -07:00
fff5d44a12 Don't fire sync events during worldgen
Fixes EntityPotionEffectEvent
Fixes EntityPoseChangeEvent

Asynchronous chunk generation provides an opportunity for things
to happen async that previously fired synchronous-only events. This
patch is for mitigating those issues by various methods.

Also fixes correctly marking/clearing the entity generation flag.
This patch sets the generation flag anytime an entity is created
via StructureTemplate before loading from NBT to catch uses of
the flag during the loading logic. This patch clears the generation
flag from an entity when added to a ServerLevel for the situation
where generation happened directly to a ServerLevel and the
entity still has the flag set.
2023-11-23 10:33:25 -08:00
a6ef388655 Don't check if we can see non-visible entities 2023-10-21 20:52:57 +01:00
9f09c7a54d Fix missing map initialize event call
== AT ==
public net.minecraft.world.level.storage.DimensionDataStorage readSavedData(Ljava/util/function/Function;Lnet/minecraft/util/datafix/DataFixTypes;Ljava/lang/String;)Lnet/minecraft/world/level/saveddata/SavedData;
2023-09-24 18:35:28 +02:00
d12a537299 Add missing logs for log-ips config option 2023-09-23 01:49:39 -04:00
5688b5cf50 Add slot sanity checks in container clicks 2023-09-11 12:01:57 +10:00
d300049246 Add titleOverride to InventoryOpenEvent 2022-03-04 12:45:03 -08:00
7dcff24771 Fix slot desync
General patch fixing slot desyncs between the server and client that
result from cancelled events/paper introduced logic.

Co-authored-by: Minecrell <minecrell@minecrell.net>
Co-authored-by: Newwind <support@newwindserver.com>
2023-08-23 13:22:09 -07:00
9b0d705d63 Add PlayerPickItemEvent 2021-09-08 21:34:01 +02:00
edb4225d90 Add BlockFace to BlockDamageEvent 2023-08-21 04:36:07 +02:00
53fab9663b Add Listing API for Player 2023-01-11 16:40:39 -05:00
8e05d19854 Configurable entity tracking range by Y coordinate
Options to configure entity tracking by Y coordinate, also for each entity category.
2023-06-27 15:38:18 +08:00
597cb633e8 Properly handle BlockBreakEvent#isDropItems
Setting whether a block break dropped items controlled
far more than just whether blocks dropped, like stat increases
food consumption, turtle egg count decreases, ice to water
conversions and beehive releases
2023-03-04 10:52:52 -08:00
0f4ee39a8e Don't tab-complete namespaced commands if send-namespaced is false
Tab-complete packet is supposed to tab-complete args for commands, but
it also can suggest commands like in version 1.12.2 or lower.

This patch prevents server from sending namespaced commands when player
requests tab-complete only commands.
2023-06-18 12:38:24 +02:00
06b00246a2 API for updating recipes on clients 2021-08-21 17:25:38 -07:00
4c98f21716 Cache map ids on item frames 2023-08-07 12:58:28 +02:00
36ae0bcfea Only capture actual tree growth 2021-08-21 18:53:03 -07:00
a13bff4a5f Folia scheduler and owned region API
Pulling Folia API to Paper is primarily intended for plugins
that want to target both Paper and Folia without unnecessary
compatibility layers.

Add both a location based scheduler, an entity based scheduler,
and a global region scheduler.

Owned region API may be useful for plugins which want to perform
operations over large areas outside of the buffer zone provided
by the regionaliser, as it is not guaranteed that anything
outside of the buffer zone is owned. Then, the plugins may use
the schedulers depending on the result of the ownership check.
2023-06-17 11:52:52 +02:00
31871f6b40 Implement PlayerFailMoveEvent 2023-07-26 20:13:31 +08:00
02819929b6 Add whitelist events 2023-05-14 12:57:15 +02:00
4bb84c46ac Only tick item frames if players can see it
In the event that an item frame cannot be seen by any players, ticking the item frame every tick is unnecessary. This can be a very hot section of the entity tracker when lots of item frames are present on a server, so this reduces the logic which speeds it up.
2023-06-19 15:45:53 -05:00
915f048f00 Fix demo flag not enabling demo mode
https://github.com/PaperMC/Paper/issues/9046
2023-04-07 20:11:17 +02:00
c060f3fae0 Prevent GameEvents being fired from unloaded chunks 2023-04-05 20:15:47 +01:00
16b8d46c1c Prevent causing expired keys from impacting new joins 2023-04-03 08:55:52 +01:00
d0107cc0c0 Treat sequence violations like they should be 2023-03-30 03:13:58 +01:00
3af4592f2a Use single player info update packet on join 2023-01-08 17:38:28 -08:00
bc837647f1 Add missing SpigotConfig logCommands check
Co-authored-by: david <mrminecraft00@gmail.com>
2022-12-08 20:25:05 +01:00
18a23db6f2 Improve PortalEvents 2022-12-15 10:33:39 -08:00
b141cd3d99 Improve logging and errors
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2022-12-14 15:52:11 -08:00
df65fbea3e Player Entity Tracking Events 2022-03-30 18:16:52 +02:00
4d008bb329 Sync offhand slot in menus
Menus don't add slots for the offhand, so on sendAllDataToRemote calls the
offhand slot isn't sent. This is not correct because you *can* put stuff into the offhand
by pressing the offhand swap item
2022-01-14 10:20:40 -08:00
26fe3d0cff Fix premature player kicks on shutdown
When the server is stopping, the default execution handler method will throw a
RejectedExecutionException in order to prevent further execution, this causes
us to lose the actual kick reason. To mitigate this, we'll use a seperate marked
class in order to gracefully ignore these.
2024-04-11 16:37:44 +01:00
0e9f28fe68 Fix async entity add due to fungus trees 2022-03-18 21:30:00 -07:00
012c32fac7 check global player list where appropriate
Makes certain entities check all players when searching for a player
instead of just checking players in their world.
2022-11-22 13:16:01 -08:00
5c260c7e51 Detect headless JREs
Crashes caused by the missing AWT dependency come up in the support channels fairly often.
This patch detects the missing dependency and stops the server with a clear error message,
containing a link to instructions on how to install a non-headless JRE.
2022-10-22 14:47:45 +02:00
4f1619700a Add PlayerInventorySlotChangeEvent 2022-04-24 22:56:59 +02:00
e56f757b1c Correctly handle interactions with items on cooldown 2022-06-16 21:57:02 -07:00
dbfc5fda14 Remove unnecessary onTrackingStart during navigation warning 2022-10-03 20:48:19 +02:00