Commit graph

5204 commits

Author SHA1 Message Date
Riley Park
b1d8fe74c4 [CI-SKIP] Use GitHub Actions for build status
fixes #4971
2020-12-31 12:56:55 -08:00
PepperCode1
2e7b860b56 Fix harming potion dupe
EntityLiving#applyInstantEffect() immediately kills the player and drops their inventory.
Before this patch, instant effects would be applied before the potion ItemStack is removed and replaced with a glass bottle. This caused the potion ItemStack to be dropped before it was supposed to be removed from the inventory. It also caused the glass bottle to be put into a dead player's inventory.
This patch makes it so that instant effects are applied after the potion ItemStack is removed, and the glass bottle is only put into the player's inventory if the player is not dead. Otherwise, the glass bottle is dropped on the ground.
2020-07-23 14:29:02 -07:00
Aikar
8147d0ec71 Additional Block Material API's
Faster version for isSolid() that utilizes NMS's state for isSolid instead of the slower
process to do this in the Bukkit API

Material#isSolid uses a large switch statement which isn't as performant vs a simple boolean return

Adds API for buildable, replaceable, burnable too.
2020-12-30 19:43:45 -05:00
Aikar
eee1fedc1e Micro Optimize DataBits
There was 2 unnecessary lines of code in a core method used for DataBits
that repeatedly calculated a static value.

We now just precalculate that in the constructor and reuse the value instead.

This is a micro optimization, but this is some of the hottest code in the server so
it should provide some minor gains as well as improve inlining.

Additionally, to further help inlining, mark the DataBits methods as final.
2020-12-30 14:02:44 -05:00
Jason Penilla
b9744db06b Add and implement cancellable TargetHitEvent for when Target Blocks are hit by Projectiles 2020-11-26 00:30:08 -08:00
Automated
b6b18a7b97 [Auto] Updated Upstream (CraftBukkit)
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

CraftBukkit Changes:
b5e5adc42 SPIGOT-6296: Server crashes when burning something at y-level 0
2020-12-28 16:57:08 -05:00
Jake Potrebic
93a75a9588 Add OBSTRUCTED result to BedEnterResult enum 2020-12-24 12:44:34 -08:00
Automated
0c40a013dd [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2020-12-28 07:11:59 -05:00
Jake Potrebic
43a4ab7b04 added PlayerTradeEvent 2020-07-02 16:14:36 -07:00
Automated
6ac04d87f3 [Auto] Updated Upstream (Bukkit/CraftBukkit)
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:
f4a9ed36 SPIGOT-6273: Expose ItemFrame ItemDropChance through API

CraftBukkit Changes:
72c5e7477 SPIGOT-6273: Expose ItemFrame ItemDropChance through API
2020-12-27 17:07:01 -05:00
Automated
e3c9dfe805 [Auto] Updated Upstream (CraftBukkit)
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

CraftBukkit Changes:
9f2b92e58 SPIGOT-6292: LivingEntity.setNoDamageTicks no longer functions
2020-12-27 16:37:02 -05:00
Mariell
04d4054c16 [CI-SKIP] Deprecate the view distance APIs on Player (#4945) 2020-12-27 12:37:37 +01:00
Shane Freeder
25980711f0 Do not crash from invalid ingredient lists in VillagerAcquireTradeEvent 2020-12-27 11:31:49 +00:00
Toshimichi0915
cfebf1baa7 Fix lead duplication 2020-12-25 01:31:13 -05:00
Matthew Miller
cfd2fcf443 Add API to get Tile Entities in a Chunk by Predicate 2020-12-18 21:24:21 +10:00
Jake Potrebic
5583c8c007 fix book page limit length (#4932) 2020-12-23 14:52:56 -08:00
Mark Vainomaa
ec665f60d2 Expose LivingEntity hurt direction 2020-12-22 22:32:15 +01:00
Shane Freeder
08f196719f Do not perform neighbour updates when using debug stick (Fixes #2134)
CB blindly drops any update flags when recording block modifications,
this causes the debug stick to blindly update neighbouring blocks on usage
in order to control this, we will special case this item, however, this
ideally should be fixed by recording the actual update flags used,
but will induce ABI breaks...

This patch also maintains the behavior of the BlockPlaceEvent, this
behavior will NOT be guaranteed in the future, however.
2020-12-22 22:45:10 +00:00
Automated
855cb5a9b5 [Auto] Updated Upstream (CraftBukkit)
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

CraftBukkit Changes:
6917945f0 SPIGOT-6289: Fix setting entity equipment
2020-12-22 16:02:19 -05:00
Aikar
319895bd9d Optimize Dynamic#get Missing Keys
get was calling toString() on every NBT object that was ever asked for an optional
key from the object to build a string for the error text.

When done on large NBT objects, this was using a ton of computation time building the
JSON representation of the NBT object.

Now we will just skip the value when 99.9999% of the time the text is never even printed.
2020-12-21 11:03:36 -05:00
Shane Freeder
49458cc927 Updated Upstream (Bukkit/CraftBukkit)
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:
6f9fe1d9 #562: Add API to set equipment silently
bcddb754 SPIGOT-6256: Add method to check if the entity is in water

CraftBukkit Changes:
878b4375 #772: Add API to set equipment silently
22d7fcc9 SPIGOT-6256: Add method to check if the entity is in water
2020-12-21 07:56:22 +00:00
Bastian Oppermann
fdaae06cdf Adjust bStats data sending delay (#4914)
Many servers tend to restart at a fixed time at xx:00 which causes an
uneven distribution of requests on the bStats backend. To circumvent
this problem, this commit introduces some randomness to the initial
and second delay.
2020-12-20 16:41:00 +01:00
MiniDigger | Martin
57c5f5e566 Remove Paper's UnsafeUtils (#4913) 2020-12-19 21:14:37 +01:00
Simon Gardling
3ce9dfed51 Fix typo in 0368-Asynchronous-chunk-IO-and-loading.patch 2020-12-17 19:24:11 -05:00
Kyle Wood
37f1ff7069 Update Paperclip (again) 2020-12-18 22:38:18 -08:00
Kyle Wood
d4e3788b39 Update Paperclip 2020-12-18 22:19:36 -08:00
BillyGalbreath
c7c5f0241b Fix CraftSound backwards compatibility 2020-12-17 15:28:31 -06:00
MiniDigger | Martin
6c95759a00 Let some more packets be send immediately, closes #4140 (#4896)
Signed-off-by: MiniDigger | Martin <admin@minidigger.dev>
2020-12-16 23:16:03 +01:00
cakoyo
7a84defae4 Emancipate more features to PlayerHandshakeEvent
* The hostname and socket address was not null when the event fired, but the event does not provide the value, the change allows plugins to use the old value.
* Since `proxyLogicEnabled` will be checked after the event fired, to check the config value will allow plugins to modify it during the event handling.

Signed-off-by: MiniDigger | Martin <admin@minidigger.dev>
2020-12-16 21:43:09 +01:00
Automated
dc04ee87f8 [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2020-12-16 15:26:55 -05:00
Fruxz
459947e6bf Maded Title-Objects directy sendable to targets 2020-10-13 18:49:30 +02:00
ysl3000
11a4045767 Player Chunk Load/Unload Events
Co-authored-by: Mariell <proximyst@proximyst.com>
2020-10-31 23:06:21 +01:00
BillyGalbreath
3e5a38ccf5 MC-4 Fix item position desync 2020-12-14 09:05:29 -06:00
Shane Freeder
c184de4050 Limit auto recipe packets 2020-12-12 23:53:40 +00:00
Automated
7db1d7e79c [Auto] 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:
8f495b8d #564: Add method to get max world size

CraftBukkit Changes:
768d7fc2d #773: Add method to get max world size

Spigot Changes:
628435a8 #103: Add async catchers to Chunk#getEntities
2020-12-12 19:42:05 -05:00
BillyGalbreath
6ce7d63918 Fix curing villager makes equipment disappear 2020-12-08 22:21:54 -06:00
Shane Freeder
c81621d172 Tick inactive goal selectors 2020-12-09 20:31:08 +00:00
MiniDigger | Martin
62c0f6553e fix 4878 by always calling events using bukkit singleton 2020-12-09 21:09:54 +01:00
BillyGalbreath
896033a959 Fix MC-181190 curing zombie villager discount exploit (#4871) 2020-12-08 21:56:22 -06:00
Jake Potrebic
8c473e7fcd deprecate IllegalPacketEvent (#4867) 2020-12-07 23:51:55 -08:00
William Blake Galbreath
d6057372b4 Add #getEligibleHumans to SkeletonHorseTrapEvent 2020-08-23 21:57:55 +02:00
Mariell Hoversholm
889192e8f8 Fix merging spawning values 2020-12-05 14:59:05 +01:00
Jake Potrebic
43d8c6fcd4 Turn off spigot verbose world by default 2020-12-02 20:20:59 -08:00
MiniDigger | Martin
7e7a3d372a Fix Delegation to vanilla chunk gen
This broke in 1.16.1, when upstream changed stuff around and introduced this delegate field.

Closes #4097
2020-11-24 18:58:34 +01:00
Jake Potrebic
1023360683 fixed bug in jvm checker (#4845) 2020-12-04 19:58:24 -08:00
Kyle Wood
08835cda45 Enable Multi-Release plugin jar support
Fixes #4841
2020-12-04 15:57:46 -08:00
Automated
256a700c8d [Auto] Updated Upstream (CraftBukkit)
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

CraftBukkit Changes:
5b747147e Increase outdated build delay
2020-12-03 03:37:01 -05:00
Kyle Wood
233273702f Add warning for servers not running on Java 11 2020-12-02 22:27:03 -08:00
Josh Roy
209f04eab2 Add PlayerShearBlockEvent 2020-08-27 15:39:24 -04:00
Jake Potrebic
e2da9f79e2 added missing default perms 2020-11-16 12:05:51 -08:00