Commit Graph

2552 Commits

Author SHA1 Message Date
Shane Freeder
b700460999
Convert average tick value in the GUI to the correct granularity 2024-01-24 16:27:32 +00:00
Nassim Jahnke
a4a08b7342
[ci skip] Move chunk system patch a bit back 2024-01-24 17:14:57 +01:00
Nassim Jahnke
d405ff1255
[ci skip] Fixup last commit 2024-01-24 14:05:59 +01:00
Nassim Jahnke
ad2cf68a7f
[ci skip] Move chunk system patch back a bit 2024-01-24 13:42:24 +01:00
Nassim Jahnke
51bef80755
[ci skip] Remove removed patches 2024-01-24 11:55:36 +01:00
Nassim Jahnke
11645e3268
[ci skip] (Mostly) finish adding identifying patch comments 2024-01-24 11:45:17 +01:00
FireInstall
76da4bc683
Expose LootTable of DecoratedPot (#10023) 2024-01-23 15:57:17 -05:00
Jake Potrebic
24dc2bfc50
Add BlockStateMeta#clearBlockState (#10160) 2024-01-23 15:41:47 -05:00
1stGlitch
581b101180
Add world to Entity AddTo/RemoveFrom Events (#10183)
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 teleported between worlds with a command, a plugin listening to the EntityRemoveFromWorldEvent has no way of determining which world the entity was actually removed from (without relying on other events).

To resolve this, I've added the world as a field in the events along with a getter to retrieve it. I also removed an unused import and made the documentation more clear on the event behaviour when chunks load/unload.
2024-01-23 15:17:14 -05:00
Nassim Jahnke
c57d1aa245
Move diffs around to compile without later ones applied 2024-01-23 18:06:51 +01:00
Nassim Jahnke
e66037960b
[ci skip] Move some disruptive patches back 2024-01-23 15:57:42 +01:00
Nassim Jahnke
52619e7a21
[ci skip] Add more patch identifying comments 2024-01-23 14:39:23 +01:00
Nassim Jahnke
484d6bfb4e
[ci skip] Move some disruptive patches back 2024-01-23 12:47:01 +01:00
Nassim Jahnke
25013d9970
[ci skip] Move some disruptive patches back 2024-01-22 21:13:10 +01:00
Nassim Jahnke
9eb0b38157
[ci skip] Add more patch identifying comments 2024-01-22 19:01:10 +01:00
Nassim Jahnke
684319f9c6
[ci skip] Add more patch identifying comments 2024-01-22 18:04:55 +01:00
Nassim Jahnke
27cabc19a0
[ci skip] Add more patch identifying comments 2024-01-21 19:59:34 +01:00
Nassim Jahnke
d9df6bc5e6
[ci skip] Add more patch identifying comments, cleanup 2024-01-21 17:55:04 +01:00
Nassim Jahnke
e9e0bc168d
[ci skip] Add more identifying patch comments 2024-01-21 16:01:04 +01:00
Nassim Jahnke
98e6d20ebd
[ci skip] Add more identifying patch comments 2024-01-21 13:38:50 +01:00
Nassim Jahnke
f7dd304b1f
[ci skip] Add more identifying patch comments 2024-01-21 12:11:43 +01:00
Nassim Jahnke
8d94596e30
[ci skip] Add more identifying patch comments 2024-01-20 23:41:26 +01:00
Shane Freeder
b48d737759
Async world data IO saving (#10171)
Co-authored-by: Cryptite <cryptite@gmail.com>
2024-01-20 22:51:15 +01:00
Pantera (Mad_Daniel)
4a98986e28
Add back Reduce allocation of Vec3D by entity tracker patch (#10179) 2024-01-20 12:26:51 -05:00
Nassim Jahnke
68c3297947
[ci skip] Add more identifying patch comments 2024-01-20 14:25:44 +01:00
Lulu13022002
8e41ef4cc5
Add visual blockdata api for primed tnt (#10146) 2024-01-19 18:01:12 -05:00
Nassim Jahnke
42e88a8b7b
[ci skip] Add more identifying patch comments 2024-01-19 22:13:42 +01:00
Nassim Jahnke
1c956abfbc
[ci skip] Add more identifying patch comments, merge related patches 2024-01-19 17:54:05 +01:00
Nassim Jahnke
eeb6afc435
[ci skip] Add more identifying patch comments, merge related patches 2024-01-19 15:30:44 +01:00
Nassim Jahnke
cc693ce82b
[ci skip] Add more identifying patch comments, merge related patches 2024-01-19 12:55:49 +01:00
Nassim Jahnke
106c67a811
[ci skip] Add more identifying patch comments 2024-01-18 22:00:40 +01:00
Shane Freeder
f61ebdce91
Fix issue with kick event causes being passed improperly 2024-01-18 19:36:08 +00:00
Nassim Jahnke
3e20d3a275
[ci skip] Add more identifying patch comments 2024-01-18 18:57:15 +01:00
Nassim Jahnke
5e73c555bc
[ci skip] Add more identifying patch comments 2024-01-18 15:56:25 +01:00
Nassim Jahnke
94807a1d2e
[ci skip] Minor cleanup and patch merges 2024-01-16 19:27:39 +01:00
Nassim Jahnke
ebf97bdfdd
[ci skip] Add more patch identifying comments 2024-01-16 13:32:52 +01:00
Owen
848a3960f6
Add mob goal generator (#9980) 2024-01-15 14:36:10 -05:00
Nassim Jahnke
0ef59845bf
[ci skip] Add more patch identifying comments, merge related patches 2024-01-15 12:50:31 +01:00
Nassim Jahnke
f9fdedf2d7
[ci skip] Add more patch identifying comments, merge related patches 2024-01-14 17:04:39 +01:00
Nassim Jahnke
93a848c4b9
Readd missed line 2024-01-14 13:51:41 +01:00
Nassim Jahnke
c151c956e0
Fixup AsyncPreLoginEvent patches
Fixes #10165
2024-01-14 13:47:09 +01:00
Jake Potrebic
8657cd91d7
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10164)
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 RecipeChoice.ExactChoice docs
309497c1 Add EntityMountEvent and EntityDismount Event
2fd45ae3 Improve ItemFactory#enchantItem consistency
2b198268 PR-933: Define native persistent data types for lists

CraftBukkit Changes:
771182f70 PR-1327: Add methods to place structures with block/entity transformers
e41ad4c82 SPIGOT-7567: SpawnReason for SNOWMAN is reported as BUILD_IRONGOLEM
76931e8bd Add EntityMountEvent and EntityDismount Event
9b29b21c7 PR-1183: Better handle lambda expression and renaming of classes in Commodore
1462ebe85 Reformat Commodore.java
9fde4c037 PR-1324: Improve ItemFactory#enchantItem consistency
4e419c774 PR-1295: Define native persistent data types for lists
dd8cca388 SPIGOT-7562: Fix Score#getScore and Score#isScoreSet
690278200 Only fetch an online UUID in online mode
1da8d9a53 Fire PreLogin events even in offline mode
2e88514ad PR-1325: Use CraftBlockType and CraftItemType instead of CraftMagicNumbers to convert between minecraft and bukkit block / item representation

Spigot Changes:
864e4acc Restore accidentally removed package-info.java
f91a10d5 Remove obsolete EntityMountEvent and EntityDismountEvent
828f0593 SPIGOT-7558: Deprecate silenceable lightning API as sound is now client-side and cannot be removed
cdc4e035 Remove obsolete patch fetching correct mode UUIDs
49e36b8e Merge related BungeeCord patches
6e87b9ab Remove obsolete firing of PreLogin events in offline mode
5c76b183 Remove redundant patch dealing with exceptions in the crash reporter
3a2219d1 Remove redundant patch logging cause of unexpected exception
2024-01-14 10:46:04 +01:00
Jake Potrebic
17275ffd68
[ci skip] add more comments & move 1 hunk to correct patch 2024-01-13 12:31:02 -08:00
Nassim Jahnke
c0e4697dbd
[ci skip] Add more patch identifying comments 2024-01-13 18:34:33 +01:00
Nassim Jahnke
e84621a9d8
[ci skip] Add more patch identifying comments 2024-01-13 16:35:59 +01:00
Nassim Jahnke
8c8862f3a8
Also check for the actual character length in ResourceLocation validation 2024-01-12 23:33:43 +01:00
Nassim Jahnke
a0ffb57745
[ci skip] Small cleanup to mc utils patch 2024-01-12 21:58:54 +01:00
Nassim Jahnke
f28caff927
Limit ResourceLocation length to nbt string tag length 2024-01-12 19:33:17 +01:00
Jake Potrebic
ec196207c2
Use a ConcurrentHashMap for enum mappings for BlockData (#10161)
This API should be thread-safe as there is no world state
2024-01-12 16:25:12 +00:00
Jake Potrebic
a80d31b1bd
Log command execution exceptions if debug=true (#10130) 2024-01-11 08:15:17 -08:00
Nassim Jahnke
07b956e3a3
Fix tests by disabling them 2024-01-06 19:13:45 +01:00
Nassim Jahnke
f1c5f0198c
[ci skip] Fix typo 2024-01-06 15:11:45 +01:00
Nassim Jahnke
e46276eb71
Fixup NamespacedKey parsing 2024-01-06 15:07:59 +01:00
Nassim Jahnke
570cfb44d6
Validate missed resource location parsing 2024-01-06 09:51:49 +01:00
Jake Potrebic
a58e29db99
Fix a borked update of 'Properly handle BlockBreakEvent#isDropItems' (#10134) 2024-01-05 10:07:43 +01:00
Warrior
25a99b12e8
Fix BlockDestroyEvents effectBlock not being set (#10131) 2024-01-05 01:09:04 +01:00
Jake Potrebic
a93acc4275
Fix EntityChangePoseEvent being called during worldgen (#10120) 2024-01-04 12:55:01 -08:00
Jake Potrebic
8379027ee0
Fix cmd permission levels for command blocks (#7404) 2024-01-04 12:37:59 -08:00
Owen
19a620213f
Fix experience & improvements to block events (#8067)
This is a lot but basically adds a method to disable the dropping of experience and drops experience by default.
This way things that require XP to be dropped manually (via modification), they can drop XP themselves when needed but without touching anywhere else that may drop xp.

It should be noted this causes breakNaturally() to now drop experience.
2024-01-04 15:18:59 -05:00
Nassim Jahnke
7eaff48d7c
[ci skip] Replace some magic values with constant references 2024-01-04 14:38:26 +01:00
Nassim Jahnke
b2a6d575dd
Validate ResourceLocation in NBT reading 2024-01-04 13:55:17 +01:00
Bjarne Koll
259bc76026
Pass system properties to maven repo session (#10117)
The maven repository sessions used by the maven library loader requires
the java.version property to later evaluate the active profiles of
dependencies when downloading them during the plugin loader logic.

This commit fixes this by passing all system properties as a hopefully
future-proof way to provide the required data to said session.
2024-01-04 11:13:12 +00:00
Jake Potrebic
ae001ae6ee
Fix untrack event not being called for all 'untracks' (#10110) 2024-01-03 20:57:49 -08:00
Jake Potrebic
1fa48d140c
include relative flags in PlayerTeleportEvent (#8190) 2024-01-02 20:42:26 +01:00
Owen
509876d26f
Keep fully frozen entities fully activated (#10103)
* Keep fully frozen entities fully activated

* Rebase and switch to isFreezing

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-01-02 11:08:34 -08:00
Jake Potrebic
692db0c81d
fix CustomModelData being removed (#10113) 2024-01-02 19:51:09 +01:00
Jake Potrebic
816bacc2c3
Call EntityChangeBlockEvent for cake eating (#10105) 2024-01-02 19:45:36 +01:00
Jake Potrebic
58e120b77c
[ci skip] Remove extraneous diff added in 1.20.3 update (#10101) 2024-01-02 10:29:53 -08:00
Jake Potrebic
983377b55a
Correctly check if bucket dispenses will succeed for event (#10109) 2024-01-02 09:14:42 -08:00
Spottedleaf
1281f4f552 Make region/lock shift accessors per world
This has been done to ensure that the shifts are not used
until the world object is being constructed, which is before
the global configuration is initialised. There also isn't any
reason for these shifts to be global anyways.
2023-12-30 15:45:24 -08:00
Jake Potrebic
0ae58c09a1
cleanup player death event adventure logic (#10095)
There was a TODO left there regarding the translated death
message being used by plugins to identify the cause of death. This
should be mitigated now because the LegacyComponentSerializer default
implemenation uses our custom flattener which renders vanilla
translatable components to their English representation.
2023-12-29 12:28:58 -08:00
Jake Potrebic
3484ae987a
Call entity_die game event after event cancel check (#10096) 2023-12-29 11:57:32 -08:00
caramel
e56e53f83a
Fix some component bugs in login disconnect packet (#10090) 2023-12-29 20:51:52 +01:00
caramel
5e978d3a3d
Fix Folia scheduler tasks not canceling when plugin disable (#10091) 2023-12-29 01:59:19 +01:00
Jake Potrebic
e4ab50de34
Properly disallow async Player#chat (#8123)
Clarify asynchronous status of AsyncChatEvent
2023-12-28 16:50:06 -08:00
Tamion
2951732742
Add HiddenPotionEffect API (#9910) 2023-12-28 19:38:44 -05:00
Cryptite
b2ffb1b02d
Add PlayerShieldDisableEvent (#9177) 2023-12-29 01:27:34 +01:00
Jake Potrebic
2c3ccb80f0
Add drops to shear events (#5678) 2023-12-28 14:41:07 -08:00
Jake Potrebic
3c0d6aaed9
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10085)
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:
0c7aedbc SPIGOT-7554, PR-954: Add DecoratedPotInventory

CraftBukkit Changes:
53ebb05e3 SPIGOT-7554, PR-1323: Add DecoratedPotInventory
33a2d8773 Ensure that PlayerMoveEvent is always fired where applicable
7df18510f SPIGOT-7555: Don't cast ItemFlags to byte
19aec59ea Use provided case for non-existent OfflinePlayers

Spigot Changes:
e7ce55a3 Remove obsolete PlayerMoveEvent improvements
3e5e22c0 Remove obsolete lowercasing of non existent OfflinePlayer names
2023-12-28 12:47:57 -08:00
Jake Potrebic
8221b085f9
Fix global sound event gamerule not being respected (#8727) 2023-12-27 16:33:05 -08:00
Md5Lukas
c081104395
Add experience points api (#9688) 2023-12-28 00:49:45 +01:00
Alex
88d28d6bdd
Fix long loading screen when refreshing skins (#10026)
Send `ClientboundGameEventPacket.LEVEL_CHUNKS_LOAD_START` when refreshing players after
player profile changes.
2023-12-28 00:22:44 +01:00
Jake Potrebic
a401585cfa
Fix campfire recipes not always outputting full result (#8754) 2023-12-27 15:02:49 -08:00
Jake Potrebic
d1f507fc0e
Don't fire 2 game events for certain cauldron interactions (#8904) 2023-12-27 14:32:39 -08:00
Jake Potrebic
0d6a0c3b28
Fix command block async message (again) (#10082) 2023-12-27 10:30:15 +01:00
Owen
dc621507f5
Catch async usage of playsound (#10021) 2023-12-26 15:00:21 -05:00
Jake Potrebic
f483b38596
fix NPE on EntityTeleportEvent getTo (#10016) 2023-12-26 11:22:41 -08:00
Warrior
4fdda9e583
Keep newlines in outdated client/server message (#10042) 2023-12-26 14:02:22 -05:00
Jake Potrebic
c215ce1858
[ci skip] cleanup patch diff from last commit 2023-12-25 16:47:06 -08:00
Nassim Jahnke
e035fd7034
Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
cc9aa21a SPIGOT-6399, SPIGOT-7344: Clarify collidable behavior for player entities
f23325b6 Add API for per-world simulation distances
26e1774e Add API for per-world view distances
0b541e60 Add PlayerLoginEvent#getRealAddress
5f027d2d PR-949: Add Vector#fromJOML() overloads for read-only vector types

CraftBukkit Changes:
bcf56171a PR-1321: Clean up some stuff which got missed during previous PRs
7f833a2d1 SPIGOT-7462: Players no longer drop XP after dying near a Sculk Catalyst
752aac669 Implement APIs for per world view and simulation distances
57d7ef433 Preserve empty enchantment tags for glow effect
465ec3fb4 Remove connected check on setScoreboard
f90ce621e Use one PermissibleBase for all command blocks
5876cca44 SPIGOT-7550: Fix creation of Arrow instances
f03fc3aa3 SPIGOT-7549: ServerTickManager#setTickRate incorrect Precondition
9d7f49b01 SPIGOT-7548: Fix wrong spawn location for experience orb and dropped item

Spigot Changes:
ed9ba9a4 Drop no longer required patch ignoring -o option
86b5dd6a SPIGOT-7546: Fix hardcoded check for outdated client message
aa7cde7a Remove obsolete APIs for per world view and simulation distances
6dff577e Remove obsolete patch preserving empty `ench` tags
a3bf95b8 Remove obsolete PlayerLoginEvent#getRealAddress
1b02f5d6 Remove obsolete connected check on setScoreboard patch
acf717eb Remove obsolete command block PermissibleBase patch
053fa2a9 Remove redundant patch dealing with null tile entities
2023-12-26 00:18:13 +01:00
EpicPlayerA10
ff7b9b0380
Increase default custom payload channel size limit (#10006) 2023-12-25 12:01:18 +01:00
Jake Potrebic
4adca3d7a3
Update to adventure 4.15 (#10045) 2023-12-25 11:51:44 +01:00
Jake Potrebic
49f9f6f2cd
Add Registry#getKey (#10066)
Some types that have registries support existing without
being in a registry and therefore have no key. This is part
one of supporting that, adding a Registry#getKey(Object) method
to be able to get the key for an object so we can remove Keyed
from such objects.

This also deprecates Keyed#getKey on TrimMaterial and TrimPattern
as these are the 2 offending types currently in the api.
2023-12-23 13:16:27 -08:00
Jake Potrebic
e7e1c8a832
Fix and add new scoreboard API (#10037) 2023-12-23 11:53:07 -08:00
Jake Potrebic
1e7dd72f15
Remove 'fix Vanilla Minecart speed' patch (#10068)
The game uses 0.95d now
2023-12-22 17:44:36 -08:00
Jake Potrebic
b4c9e7e5d4
add missing Experimental annotations (#10012) 2023-12-21 13:13:05 -08:00
Jake Potrebic
d11a58802a
Remove duplicate code in chunk tick iteration (#10056) 2023-12-21 09:15:00 -08:00
Jake Potrebic
45e01a2a78
Use correct max stack size in crafter (#10057) 2023-12-21 09:10:28 -08:00
Lulu13022002
086ca616d8
Fix world border edge collision (#10053)
The collision shape of the border is determined by flooring the min values and ceiling the max values, so the isCollidingWithBorder() function should mirror such behavior.
2023-12-19 21:31:07 -08:00
Jake Potrebic
8c007d90a5
properly read and store sus effect duration (#10050) 2023-12-19 13:31:49 -08:00