Commit Graph

3932 Commits

Author SHA1 Message Date
Aikar
e50b4f608d
[Auto] Updated Upstream (Bukkit)
Upstream has released updates that appears 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:
0eaf10f1 Add getObject methods to ConfigurationSection
2019-03-21 06:21:43 -04:00
kashike
2e4520d902 Use proper max length when serialising BungeeCord text component 2019-03-20 21:20:56 -07:00
Shane Freeder
ea855e2b46 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Developers!: You will need to clean up your work/Minecraft/1.13.2 folder
for this

Also, restore a patch that was dropped in the last upstream

Bukkit Changes:
279eeab3 Fix command description not being set
96e2bb18 Remove debug print from SyntheticEventTest

CraftBukkit Changes:
d3ed1516 Fix dangerously threaded beacons
217a293d Don't relocate joptsimple to allow --help to work.
1be05a21 Prepare for imminent Java 12 release
a49270b2 Mappings Update
5259d80c SPIGOT-4669: Fix PlayerTeleportEvent coordinates for relative teleports

Spigot Changes:
e6eb36f2 Rebuild patches
2019-03-20 01:55:16 +00:00
Shane Freeder
0976d52bbd Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Please note that this build includes changes to meet upstreams
requirements for nullability annotations. While we aim for a level of
accuracy, these might not be 100% correct, if there are any issues,
please speak to us on discord, or open an issue on the tracker to
discuss.

Bukkit Changes:
9a6a1de3 Remove nullability annotations from enum constructors
3f0591ea SPIGOT-2540: Add nullability annotations to entire Bukkit API

CraftBukkit Changes:
8d8475fc SPIGOT-4666: Force parameter in HumanEntity#sleep
8b1588e2 Fix ExplosionPrimeEvent#setFire not working with EnderCrystals
39a287b7 Don't ignore newlines in PlayerListHeader/Footer

Spigot Changes:
cf694d87 Add nullability annotations
2019-03-20 00:31:18 +00:00
Zach Brown
c3c889523f
Stop loading entity bounding boxes from NBT
This may be creating more issues than it's solving
cc GH-1806
2019-03-15 23:25:32 -04:00
Mark Vainomaa
bf2be652f0 Add WhitelistToggleEvent (#1899) 2019-03-13 16:51:42 -04:00
Aikar
988887d2b0
[Auto] Updated Upstream (Bukkit)
Upstream has released updates that appears 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:
f802d0a5 Use TestPlugin for ConversationTest
2019-03-08 23:16:44 -05:00
Aikar
7d843554e9
[Auto] Updated Upstream (Bukkit)
Upstream has released updates that appears 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:
77cbdc61 SPIGOT-4651: MerchantRecipe.setIngredients() allows more than 2 ingredients
2019-03-07 12:36:43 -05:00
Shane Freeder
2828dd1c67 Revert "Don't update snapshot blockstates" (Fixes #1882)
CraftBukkit already checks that we're not trying to copy data
back to the same snapshot, reverting this fixes the ability to
properly update non-snapshot blockstates
2019-03-07 17:21:02 +00:00
Zach Brown
825d17c326
Update upstream B/CB
--- work/Bukkit
Submodule work/Bukkit 96e09e50..0b95b68f:
  > SPIGOT-4650: Charging API for Vex

--- work/CraftBukkit
Submodule work/CraftBukkit f102d882..77ca7ca0:
  > Rebuild patches
  > Improve damage handling of dead entities
  > SPIGOT-4646: Test + fix InventoryWrapper.getContents
  > SPIGOT-4650: Charging API for Vex
2019-03-06 00:46:21 -05:00
Zach Brown
9fdcbf5c9b
[dev] Make init script use different author names
Lets us differentiate whats Vanilla and whats from CB at a glance in IJ.
2019-03-06 00:14:07 -05:00
Phoenix616
2c9924816f
Improve damage handling of dead entities
Manually applied because of upstream patch file issues.
Upstream 73597ed865
2019-03-06 00:00:34 -05:00
Aikar
9f8a17af2a
[Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appears 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:
f102d882 SPIGOT-4647: Properly cancel VehicleDamageEvent
ec17d07d Use getBukkitEntity for ExplosionPrimeEvent instead of creating new one
2019-03-05 00:46:37 -05:00
Zach Brown
ffd51cbe2d
Set Zombie lastTick at start of drowned conversion
Fixes GH-1887

Prior to this change, the lastTick value for zombies would be set to
their initial spawn tick. This caused the drowned conversion process to
immediately occur rather than observing the vanilla delay.

Easy fix, just make sure its set again when the process actually starts.

And no, this change has absolutely nothing to do with the other thing.
That's been fixed and remains fixed.
2019-03-04 02:27:27 -05:00
Zach Brown
814356359a
Fire PlayerArmorChangeEvent for more cases 2019-03-03 15:22:30 -05:00
Aikar
f0d45d4eab
Fix crops not popping when no plugin listens to physics 2019-03-03 12:22:24 -05:00
Spottedleaf
e5f0d0f5dc
Fix World#getChunkAtAsync(Location) variants incorectly calculating chunk x
The blockX needs to be floored before converted to int, as float -> integer
operations are truncation. (i.e -0.5 -> 0, we want -0.5 -> -1)
2019-03-02 18:54:20 -05:00
Aikar
21ee8800f8
Remove left over debug from entity slices 2019-03-02 18:52:16 -05:00
Aikar
7e3169e3de
MC-145260: Fix Whitelist On/Off inconsistency - Fixes #1880
Mojang stored whitelist state in 2 places (Whitelist Object, PlayerList)

some things checked PlayerList, some checked object. This moves
everything to the Whitelist object.
2019-03-02 16:23:06 -05:00
Aikar
40e666b44a
Add config to disable light recalculation optimizations
I really don't know how this could break things with light, but wanted to
let it be an option so we can try turning it off to fix some light bug reports
2019-03-02 16:22:01 -05:00
Aikar
a684cde66b
Handle Excessive Signs in Chunks creating too large of packets
Also adds a limit to stop sending Sign data to client after 500
signs per chunk to limit client lag.

Use -DPaper.excessiveSignsLimit=500 to configure that limit, or -1
to disable the limit and let your players be abused.

fixes #1878
2019-03-02 15:30:00 -05:00
Aikar
420ce3aaed
don't check convert signs boolean every sign save
that lookup isn't "cheap", and synchronizes so cache it to a boolean instead
2019-03-02 15:29:09 -05:00
Aikar
58398da145
Remove outbound string length limits on signs, improve codepoint logic
now 80 chars counts multi sized code points the same so 80 chinese
characters would be allowed too.

Removed outbound limit as it doesn't solve the chunk oversize problem.

proper fix for chunk sending in another patch next.
2019-03-02 15:28:04 -05:00
Zach Brown
40f5a94b8f
Remove unnecessary set init I missed in last 2019-02-28 20:04:14 -05:00
Zach Brown
24fed5a3a5
Fix CanDestroy CanPlaceOn on untagged items 2019-02-28 19:52:12 -05:00
Shane Freeder
025a590fbd Apply sign limits to signs text content 2019-02-28 18:07:14 +00:00
Aikar
3ab6da0e4f
Fix incorrect check on vehicle for auto dismount
This fixes an issue where players are dismounted from their horse on logout.
2019-02-28 02:43:38 -05:00
Aikar
2f8bdbfde8
Fix BlockState hashCode optimization patch performance bug
we missed something in updating this patch and accidently left
hashCode as a 0 value. This caused a pretty nasty performance hit
for BlockStateEnum instances as they would be all a hash collision.

This update fixes that and also promotes the optimizations to cover
ALL cases of Block States, not just enums.

While mojang cached hashCode in 1.13, we can still just use a simple
large prime based hashCode that auto increments guaranteeing no overlap.

Additionally, replace all equals with an identity check.
2019-02-28 01:35:06 -05:00
Aikar
906684ff4f
Fix a sign memory leak 2019-02-28 00:47:57 -05:00
Aikar
b2d7ef4f3c
Strip extra Sign data to/from client - Fixes #1876
modified clients can send abnormally large data from the client
to the server and it would get stored on the sign as sent.

the client can barely render around 16 characters as-is, but formatting
codes can get it to be more than 16 actual length.

Set a limit of 80 which should give an average of 16 characters 2
sets of legacy formatting codes which should be plenty for all uses.

This does not strip any existing data from the NBT as plugins
may use this for storing data out of the rendered area.

it only impacts data sent to and from the client.

Set -DPaper.maxSignLength=XX to change limit or -1 to disable
2019-02-28 00:47:50 -05:00
Aikar
47c6e17d45
Improve reliability of Shapeless Recipe logic
per feedback from @liach about a bug with vanillas previous logic
that we essentially just reverted to. complex recipes could run into
cases where a recipe that does have enough items can be unsatisfied
if the items are in certain orders, making them not truely shapeless.

this scenario doesn't occur in vanilla, but users can load custom recipes.

this improves the logic to do some sorting on the lists to improve
chances of matching the recipes harder ingredients before the easier
to satisfy ingredients.

the likelyhood of someone adding a recipe that still fails this is too
extreme to care about. i doubt mojangs implementation is perfect either.

we can improve this logic more later if we actually get bug reports on it.
2019-02-28 00:45:45 -05:00
Aikar
4785ef6474
[Auto] Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears 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:
96e09e50 Add love mode API to Animals

CraftBukkit Changes:
0f708cbf Add love mode API to Animals
2019-02-28 00:36:39 -05:00
Aikar
ac5b19c55e
Fix Custom Shapeless Custom Crafting Recipes
Mojang implemented Shapeless different than Shaped

This made the Bukkit RecipeChoice API not work for Shapeless.

This reimplements vanilla logic using the same test logic as Shaped
2019-02-27 21:06:04 -05:00
Aikar
9bde06a0ca
[Auto] Updated Upstream (Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Spigot Changes:
3cb9dcb5 SPIGOT-4640: Add debug stick permissions
2019-02-26 05:16:39 -05:00
Aikar
2ced55d05f
Revert "Fix Custom Shapeless Crafting Recipes"
This reverts commit e56f465acd.
2019-02-26 01:25:27 -05:00
Aikar
e56f465acd
Fix Custom Shapeless Crafting Recipes
Mojang implemented Shapeless different than Shaped

Make shaped also support the RecipeChoice API
2019-02-25 21:31:50 -05:00
Aikar
c83601bcff
Add ItemStack Recipe API helper methods
Allows using ExactChoice Recipes with easier methodss
2019-02-25 21:31:39 -05:00
Aikar
32b9e543d9
BlockDestroyEvent
Adds an event for when the server is going to destroy a current block,
potentially causing it to drop. This event can be cancelled to avoid
the block destruction, such as preventing signs from popping when
floating in the air.

This can replace many uses of BlockPhysicsEvent, as this will not fire
with the same velocity as BPE.
2019-02-25 21:26:12 -05:00
Aikar
0a76e7d1aa
Remove redstone checks for BlockPhysicsEvent as it wasnt working, general optimize
Just make it ignore the event fires when no plugin is listening to it.
2019-02-25 21:26:12 -05:00
Aikar
c33018eae2
[Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appears 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:
40cbae42 SPIGOT-4638: Give last registered recipe priority
2019-02-25 19:21:45 -05:00
Zach Brown
1e38743b1d
Update upstream B/CB/S
Also fixes build as a result of an upstream force push

--- work/Bukkit
Submodule work/Bukkit 217dc08d..d13fdf8c:
  > SPIGOT-4637: Add source block to BlockPhysicsEvent.

--- work/CraftBukkit
Submodule work/CraftBukkit acbba8ba..cb98c6ea:
  > Fix line endings in CraftDefaultPermissions
  > SPIGOT-4637: Add source block to BlockPhysicsEvent.

--- work/Spigot
Submodule work/Spigot 75ee78a0c...4165cd8f4 (commits not present)
  > (Manually Added) - Appears to be a result of an upstream force push
  > (Manually Added) - Changed: SPIGOT-4636: Add creative mode NBT permissions
2019-02-25 04:39:24 -05:00
Aikar
158bfbecf3
[Auto] Updated Upstream (Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Spigot Changes:
75ee78a0 SPIGOT-4636: Add creative mode NBT permissions
2019-02-25 03:36:34 -05:00
Aikar
91129b798e
[Auto] Updated Upstream (Bukkit)
Upstream has released updates that appears 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:
217dc08d SPIGOT-4634: Make Inventory iteration behaviour explicit
2019-02-25 03:16:35 -05:00
Aikar
e6fc2d18c3
[Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appears 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:
acbba8ba SPIGOT-4635: Restore shield damage sound
2019-02-25 02:56:39 -05:00
Aikar
73b65f4f8b
[Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appears 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:
4e4cde48 Fix experience reward flag gets lost during MerchantRecipe conversion
2019-02-24 04:56:46 -05:00
Aikar
b4e7e439e4
Missed diff on spigot chunk patch
not much concern over it, it would of just misidentified a corrupt chunk as not corrupt
2019-02-23 16:18:46 -05:00
Aikar
d1b6d22eac
Improvements to Timings concurrency and lookup performance
ConcurrentHashMap synchronizes on .computeIfAbsent even on hits,
so this does a .get(key) first, which most of our use should
be hits, and then falls back to the CHM computeIfAbsent for thread safe puts.

Also improve concurrency on handler and group collections to use a synchronized
list instead of an array deque for concurrency safety.
2019-02-23 16:18:34 -05:00
Aikar
7ab257e4f1
Remove ChunkSection debug - #1302
While these logs indicate something is 'off', we've had no reports
of visible 'issues' with entities, and no one is going to take the
time to debug this farther, so just getting rid of the logs so it's
like its never happening!

Ignorance is bliss.
2019-02-23 12:24:23 -05:00
Aikar
17b58d00d8
Unwrap Event Exceptions
This was a useless exception wrapper that ends up making
stack traces harder to read as well as the JVM cutting off
the important parts

Nothing catches this exception, so its safe to just get rid
of it and let the REAL exception bubble down
2019-02-23 12:17:41 -05:00
Aikar
ddab622b9a
Load correct chunks for spawn chunk loading - Fixes #1866
logic was loading the wrong x/z in block coords instead of chunk coords
2019-02-22 00:02:37 -05:00