1
0
mirror of https://github.com/PaperMC/Paper.git synced 2024-12-22 17:07:34 +01:00
Commit Graph

2873 Commits

Author SHA1 Message Date
Jake Potrebic
88d76d9fe5
Make Bogged implement Shearable () 2024-06-04 16:26:40 -04:00
Jake Potrebic
79c1ce1844
Add since to deprecated for removals () 2024-06-04 15:40:18 -04:00
Spottedleaf
4f13be937e Do not perform chunk existance check for I/O scheduling
In order to check if a chunk exists, the RegionFile lock
(if the RegionFile is opened) will be acquired. However,
the RegionFile may be performing I/O operations, in which
case will stall the acquire operation.

To ensure that threads scheduling loads do not incur a stall,
we can avoid this check entirely - the RegionFile I/O
thread(s) will eventually perform the exist check itself.
2024-06-03 13:31:41 -07:00
Bjarne Koll
b8f2101c36
Only assign blockstate data if super ctor did not ()
The CraftBlockStateMeta constructor CraftBlockStateMeta(Map) invokes its
parent constructor, which itself invokes deserializeInternal, which is
implemented on CraftBlockStateMeta to read the components and block
entity tag from the passed map.

Field initialization happens after the call to the super constructor,
meaning the current code overwrites the parsed internal data with the
EMPTY defaults.

This is prevented by moving the initialization into its own code block
that can null check the fields prior to defaulting their value to EMPTY.
2024-06-03 10:39:20 -07:00
Jake Potrebic
54fbd0cf0c
clarify what getEntityId actually returns () 2024-06-03 10:20:43 -07:00
Jake Potrebic
ac647513b2
Use RegistryOps in the correct places () 2024-06-02 15:19:17 -07:00
Bjarne Koll
5d8e53d78d
Fix CommandSourceStack#bypassSelectorPermissions ()
The previous implementation would throw a command exception if the
CommandSourceStack had its bypassSelectorPermissions flag set to true,
which is the incorrect behaviour.

Instead, it should only throw an exception if the flag is set to false
and all its other checks "fail" too.
2024-06-01 16:26:11 +02:00
Jake Potrebic
0513374b1f
Fire TabCompleteEvent for legacy commands () 2024-05-31 17:46:42 +02:00
TotalledZebra
3181470ad7
Add entity heal API () 2024-05-30 22:31:45 +02:00
Jake Potrebic
a47e11d464
fix knockback events ()
* fix knockback events

* squash

* handle cancelled event for explosions
2024-05-30 13:17:16 -07:00
Jason Penilla
06e69c8991
Use CommandSourceStack in AsyncPlayerSendCommandsEvent () 2024-05-30 11:32:43 -07:00
Shane Freeder
8e6554a80a
Fix sending disconnect packet in phases where it doesn't exist 2024-05-30 19:05:39 +01:00
Jake Potrebic
0fcf3e347f
Deprecate InvAction#HOTBAR_MOVE_AND_READD () 2024-05-29 14:56:14 -07:00
SoSeDiK
27d2ed84f4
Extend fishing API ()
Adds a missing fishing state when the fish is lured and fires an event for it.
Also adds a way to control the fish swimming time towards the bobber.
2024-05-29 23:45:01 +02:00
Jake Potrebic
efd91e52a6
Add registry-related argument types ()
* Add registry-related argument types

* fix tests
2024-05-29 14:11:52 -07:00
Jake Potrebic
a31dc90741
Several fixes and new api for experience merging/stacking () 2024-05-29 22:58:57 +02:00
Bjarne Koll
ed85aac53c
Flatten namespaced vanilla command alias redirects ()
The brigadier command dispatcher is not capable of executing commands
that redirect more than one.
The exemplary alias 'minecraft:tp' may hence not redirect to 'tp' it
instead has to redirect to 'teleport' as 'tp' itself is merely a
redirect.
2024-05-29 21:47:07 +02:00
Jake Potrebic
7e2b682e54
Fix skipping custom block entity tag () 2024-05-29 21:22:51 +02:00
Jake Potrebic
d9e659a618
Allow firework effects with no colors () 2024-05-29 20:50:44 +02:00
Jake Potrebic
716b868b08
Use RegistryOps for loadAdvancement () 2024-05-29 20:27:29 +02:00
Jake Potrebic
672c07728f
handle BODY slot for non-mobs () 2024-05-29 11:23:51 -07:00
Lulu13022002
84f6e6e0b1
Fix max temper API for llama () 2024-05-29 11:17:56 -07:00
Bjarne Koll
9d6f2cced7
[ci skip] Rebuild patches () 2024-05-28 14:19:41 +02:00
Bjarne Koll
b0c9b9c4d8
Only remove worldgen block entity on changed block () 2024-05-28 11:45:03 +02:00
Shane Freeder
23fe1166d4
Fix missing debug trace 2024-05-27 18:33:34 +01:00
Tamion
347bbe3897
Fix Cancelling BlockPlaceEvent calling onRemove () 2024-05-27 00:03:48 +02:00
Jake Potrebic
b0e3ca43b8
Prevent NPE if hooked entity was cleared () 2024-05-26 23:41:30 +02:00
Lulu13022002
841ab4134d
Fix more item desync when an event is cancelled () 2024-05-26 23:30:45 +02:00
Cross
1b8cdc6d82
Extend Player Interact cancellation to cover Jigsaw blocks () 2024-05-26 22:54:55 +02:00
Jake Potrebic
6649a171dc
Fix BlockStateMeta equals () 2024-05-26 22:49:00 +02:00
Lulu13022002
ac4ee06c01
Fix integer overflow for lag compensating eating check () 2024-05-26 22:35:58 +02:00
Jake Potrebic
9774a52d11
fix and cleanup loot table patches ()
* fix and cleanup loot table patches

* fixes
2024-05-26 12:51:15 -07:00
Lulu13022002
ca50b87947
Clear firework item properly () 2024-05-26 19:57:38 +02:00
Jake Potrebic
a7ae966530
readd itemstack data sanitization ()
* readd itemstack data sanitization

* use autocloseable
2024-05-26 10:56:33 -07:00
Jake Potrebic
4e10fadfdc
reset meta block state on BlockStateMeta#setBlockState 2024-05-25 22:36:55 -07:00
Jake Potrebic
41bee55b53
Fix NPE for color-related metas
Fixes 
2024-05-25 19:55:51 -07:00
Janet Blackquill
f0bd0cca8f
Expose anvil cost in the API () 2024-05-26 01:47:14 +02:00
Jake Potrebic
26e90b9ffb
Fix CraftMetaBlockState for data components ()
This will go on forever...
2024-05-25 16:37:35 -07:00
Lulu13022002
535dca56c2
Fix a few issues with ItemMeta () 2024-05-26 00:58:56 +02:00
jake-brennan714
4fd3ac00b4
[ci skip] Update Player#getListeningPluginChannels Jdoc () 2024-05-25 23:59:01 +02:00
Lulu13022002
dff591d292
Allow to define new map cursor types () 2024-05-25 23:56:44 +02:00
TonytheMacaroni
377733d44c
Use getter/setter on Mob for equipment drop chances () 2024-05-24 19:52:54 +02:00
Shane Freeder
3004717b0e
Do not re-wrap vanilla goals ()
There is no need to rewrap vanilla goals when they're being reregistered,
this breaks some expectations around behavior outside of general
wasting of resources.

Resolves: 
2024-05-24 16:22:41 +02:00
Jason Penilla
5e7b65a9a9
Allow using PluginLoader classpath API from Bukkit plugins ()
Allows using the PluginLoader API without any of the other changes imposed by switching to a paper-plugin.yml.

Used by setting paper-plugin-loader in plugin.yml to the class name of your PluginLoader.

Also allows skipping the libraries field by setting paper-skip-libraries to true (by default both libraries and jars provided by the PluginLoader are added to the classpath).
2024-05-23 13:13:02 -07:00
Jake Potrebic
2a90732677
Remove incorrect logic for Fireball#setVelocity () 2024-05-23 12:48:11 -07:00
Jake Potrebic
6de7a1f052
Improve default item attributes API () 2024-05-23 11:44:07 -07:00
Jason Penilla
d408381c77
Print CommandRegisteredEvent deprecation warnings again () 2024-05-23 10:44:45 -07:00
Jake Potrebic
3de408ee3e
Fix equipment slot and group API () 2024-05-23 10:39:44 -07:00
Jake Potrebic
a9201d4a7d
[ci skip] Move logic in our patches to ItemType/BlockType () 2024-05-23 10:32:02 -07:00
Jake Potrebic
b14958485d
Always show command exception stack traces in logs () 2024-05-22 10:24:09 -07:00