Commit Graph

3809 Commits

Author SHA1 Message Date
Zach Brown
aac051e35b
Redo API for vanilla CanPlace and CanDestroy NBT
Now properly serializes and deserializes, is factored into hashcodes and
equality checks, etc

Deprecates the old Material based system and replaces it with a new one
based around NamespacedKeys and NamespacedTags. This allows the API to
extend beyond vanilla and Material enum based properties to datapack
based tags and elements.

Fixes GH-1635
2018-11-21 21:56:52 -05:00
Zach Brown
23a0b8c7bb
Update upstream CB
--- work/CraftBukkit
Submodule work/CraftBukkit e4183e70..f489f0f7:
  > SPIGOT-4494: Remove fix for SPIGOT-3864, better handled by SPIGOT-3879 fix
2018-11-21 21:49:47 -05:00
Shane Freeder
65cc6ba7c4
Fire entity dismount/vehicle events (but supress their cancellation) for player teleportation
Entities must be dismounted before teleportation in order to avoid
multiple issues in the server with regards to teleportation, shamefully,
too many plugins rely on the events firing, which means that not firing
these events caues more issues than it solves;

In order to counteract this, Entity dismount/exit vehicle events have
been modified to supress cancellation (and has a method to allow plugins
to check if this has been set), noting that cancellation will be silently
surpressed given that plugins are not expecting this event to not be cancellable.

This is a far from ideal scenario, however: given the current state of this
event and other alternatives causing issues elsewhere, I believe that
this is going to be the best soultion all around.

Improvements/suggestions welcome!
2018-11-20 22:39:54 +00:00
Aikar
1f11218c80
[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:
9b4b0a21 Rebuild patches
2018-11-19 06:06:34 -05:00
Aikar
8cd849c64d
[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:
e4183e70 SPIGOT-4491: Fix InventoryMoveItemEvent causing repeated events
2018-11-19 05:01:41 -05:00
Shane Freeder
975491cb8b
Make the default permission message configurable 2018-11-18 19:54:38 +00:00
Shane Freeder
b710cc2e82
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:
689f1565 SPIGOT-4487: Clarify PlayerInteractEvent docs
01ffd1c7 Add Player to BlockCanBuildEvent

CraftBukkit Changes:
1cac9d4f Add Player to BlockCanBuildEvent
2018-11-18 16:52:49 +00:00
Aikar
aae0c12d39
Specify charset explicitly on getBytes 2018-11-17 00:38:35 -05:00
Aikar
d5408369ac
Improvements to Book Size checks
If you downloaded the build before this, delete the settings.book-size
section in paper.yml to get new values.
2018-11-17 00:34:58 -05:00
Aikar
38b6799b58
Book Size Limits
Puts some limits on the size of books.
2018-11-16 23:23:55 -05:00
Aikar
a939b01116
[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:
b1d149cf SPIGOT-4489: NOTE_BLOCK incorrectly has BlockStateMeta
2018-11-15 23:21:38 -05:00
Shane Freeder
a16e1a2fe7
force entity dismount during teleportation
Entities must be dismounted before teleportation in order to avoid
multiple issues in the server with regards to teleportation, while
we now lose the ability for plugins to monitor this specific case
of entity dismount, the alternative is that we allow a cancellable
event, but silently ignore the cancelled status, which might cause
further issues for plugins tracking state

Given that nobody can be relying on the Cancellable state of those
events during teleportation due to the issues that arise from this,
this is a small trade off
2018-11-15 14:29:04 +00:00
egg82
0b9983dfbc Optimize redstone algorithm (#1494) 2018-11-14 22:09:37 -05:00
Aikar
eb21b540d5
[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:
7631ed33 Clarify what "return false" in onCommand does.
2018-11-14 19:11:53 -05:00
Aikar
4cd3e8173c
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-11-13 23:41:46 -05:00
Zach Brown
0ae3b1c14e Update upstream B/CB/S
--- work/Bukkit
Submodule work/Bukkit 3aee9dbd0..0828ce366:
  > Add SpawnReason.SHEARING
  > SPIGOT-4339: Add EntityTransformEvent

--- work/CraftBukkit
Submodule work/CraftBukkit 17ff1e046..c2035aa1d:
  > Add some missing CreatureSpawnEvent.SpawnReason calls
  > SPIGOT-4339: Add EntityTransformEvent

--- work/Spigot
Submodule work/Spigot 947a8e7fd..5696c83c1:
  > Rebuild patches
2018-11-13 23:35:43 -05:00
Shane Freeder
7c8937d0c6
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:
17ff1e04 SPIGOT-4483: Missing EntityInteractEvent call for zombies on eggs
2018-11-12 18:23:24 +00:00
Aikar
5a310cdcdd
[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:
3aee9dbd Add Material BlockData to JavaDocs
2018-11-12 02:46:43 -05:00
Shane Freeder
64c6597d79
Don't allow digging into unloaded chunks 2018-11-11 21:10:37 +00:00
Zach Brown
dcebe229b5
Update upstream B/CB/S
--- work/Bukkit
Submodule work/Bukkit 1627782b..67e91ef7:
  > Fix some incorrectly handled JavaDoc
  > SPIGOT-4478: Update PlayerLoginEvent docs
  > Add API to manipulate boss bar of entities and those created by commands

--- work/CraftBukkit
Submodule work/CraftBukkit ca22de36..3a911828:
  > SPIGOT-4477: Arrows only firing direction of boat
  > SPIGOT-4478: NPE during PlayerLoginEvent recipe manipulation
  > Add API to manipulate boss bar of entities and those created by commands

--- work/Spigot
Submodule work/Spigot 2474d93d..947a8e7f:
  > Rebuild patches
2018-11-11 00:37:59 -05:00
Shane Freeder
8b8e15fb63
Drop extended BlockStateListPopulator and fix SpongeAbsorbEvent handling
This patch, while would have been nice, would just take too much
in order to re-implement it to retain and handle all of the state
changes possible, and complicates retaining state properly

Fix SpongeAbsortEvent handling

Only process drops when the block is actually going to be removed
2018-11-10 05:29:46 +00:00
Shane Freeder
cf772531f4
Cleanup after plugins which don't sucessfully enable
This change closes the plugin via the plugin manager, which disables
the plugin, as intended, but also cleans up after the plugin, preventing
any further errors or issues caused by tasks scheduled by the plugin before
it failed.
2018-11-09 21:46:12 +00:00
Shane Freeder
7e59b6e18e
Further extend BlockStateListPopulator
Upon "real world testing", there was needed and unimplemented methods
on BlockStateListPopulator; This commit (which should fix #1663) aims
to improve the coverage of this class.

We should aim to look into expanding this class down the line, or aim to
improve the servers ability to capture these changes
2018-11-09 18:11:32 +00:00
Aikar
2b9a7d9475
Improve Activation Range by running target rules
This restores monster aggression range back to normal when
Activation Range is less than the monsters aggression range.

This allows an entity to try to acquire targets still during
inactive ticks, which will also then let it go into immunity stage.
2018-11-08 22:43:38 -05:00
Aikar
de3b813dcf
Use Vanilla Minecart Speeds
CraftBukkit changed the values on flying speed, restore back to vanilla

Might help #1658
2018-11-08 21:35:00 -05:00
Zach Brown
16a6e7ee8b
[CI-SKIP] merge profile fill fix into base patch 2018-11-08 18:50:17 -05:00
Black Hole
83e2208266 Fix PreFillProfileEvent (#1661) 2018-11-08 14:33:19 -05:00
Shane Freeder
c6effafca8
Extend BlockStateListPopulator
extends BlockStateListPopulator to suppport checking block types in the
physical world it's representing, allowing for blocks making modifications
to the world to maintain proper state.
2018-11-08 05:45:39 +00:00
Zach Brown
24d5672770
Fix typo in last commit
Woops. db6d9b0522
2018-11-07 23:23:53 -05:00
Zach Brown
db6d9b0522
Update armorstand pose and equipment w/ no tick option
This change allows ArmorStands with ticking disabled to visually update
their equipment and pose properly.

Given the wide range of usage of ArmorStands, I have not changed
their tick loop when their tick is enabled as usual. Doing so may
likely gains in the future, though additional testing would be
needed to ensure nothing breaks.

Fixes GH-1593
2018-11-07 21:27:41 -05:00
Zach Brown
335ab110bc
Update upstream B/CB 2018-11-06 20:20:11 -05:00
MiniDigger
38479436a7 [CI-SKIP] Update artifact information in readme (#1652) 2018-11-06 09:24:32 -05:00
Aikar
0f455f00ed
Use at minimum 2 threads for Data fixers
Per MC-138093 comments, ForkJoinPool uses unlimited threads if
parallelism is ever 1. A 2 core machine will end up with 1
with the change I had previously made, so bumped the min
to 2 so we will never trigger the unlimited thread situation.

This aligns the min back with Spigot, but allows use of more
threads on systems with more cores.
2018-11-05 17:25:08 -05:00
Shane Freeder
f50977c5c4
Restore custom InventoryHolder support
Upstream removed the ability to consistently use a custom InventoryHolder,
However, the implementation does not use an InventoryHolder in any form
outside of custom inventories.

We can take that knowledge and apply some expected behavior, if we're given
an inventory holder, we should use it and return a custom inventory with the
holder, otherwise, create an inventory backed by the intended inventory, as
per upstream behavior.

This provides a "best of both worlds" scenario: plugins with InventoryHolder's
will always work as intended in the past, those without will create implementation
based inventories.
2018-11-05 04:57:31 +00:00
Aikar
88baad1438
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:
e693496c SPIGOT-4467: Improve ExpiringMap
2018-11-03 21:23:08 -04:00
Aikar
1357b23994
Drop Optimize Small Entity Movements patch
Causing too many issues

Fixes #1643
2018-11-03 11:07:24 -04:00
Aikar
a0ecaaedd8
[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:
6924311b SPIGOT-4438: Add choice API to furnace recipes

CraftBukkit Changes:
f0398e44 SPIGOT-4438: Add choice API to furnace recipes
2018-11-03 06:11:32 -04:00
Aikar
e59b331e95
[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:
bc4de176 SPIGOT-4460: Update documentation of Wolf#setAngry
2018-11-03 05:51:30 -04:00
Aikar
aaefc4fbbe
[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:
2474d93d SPIGOT-4462: Catch async chunk regenerate
2018-11-03 05:31:30 -04:00
Zach Brown
b4baf9ce4d
Use empty itemstack, not null in PlayerInteractManager
Introduced in 00a41bca42
Fixes GH-1642
2018-11-03 04:50:42 -04:00
Aikar
00a41bca42
Don't merge player movements (fixes block breaking issues)
Fixes #1640
2018-11-03 00:18:10 -04:00
Aikar
450ed0d75c
Keep players pitch/yaw on vehicle updates - fixes #1628 2018-11-02 23:20:22 -04:00
Aikar
70e091b7d4
Optimize World Time Updates
Splits time updates into incremental updates as well as does
the updates per world, so that we can re-use the same packet
object for every player unless they have per-player time enabled.
2018-11-02 23:14:53 -04:00
Aikar
81e5978088
Many major improvements to Async Chunk Loading
Fixes some bugs with urgent priority, improves priority all
around to optimize blocking chunk requests as much as possible.

fixes casing on the -Dpaper.maxchunkthreads to now be -Dpaper.maxChunkThreads

adds -Dpaper.genThreadPriority=3 -Dpaper.loadThreadPriority=4

lowering thread priorities will help ensure main has more
priority over chunk threads
2018-11-02 23:14:09 -04:00
Shane Freeder
1e39773b53
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

Bukkit Changes:
9d0221aa API to get client side view distance.
9be7f0ea SPIGOT-4395: Additions to PlayerBedEnterEvent.
01e534c6 Minor cosmetic cleanups to imports etc

CraftBukkit Changes:
96c461b3 API to get client side view distance.
e2785f4e Remove note about development build
a8000588 SPIGOT-4395: Additions to PlayerBedEnterEvent.

Spigot Changes:
117d4f7e Rebuild patches
2018-11-03 00:29:57 +00:00
Aikar
6c2709118f
Fix enttiy move merge issues - fixes #1637 2018-11-02 10:08:57 -04:00
Aikar
0b3a5c2669
Revert "Many major improvements to Async Chunk Loading"
This reverts commit dc555f8478.
2018-11-02 09:58:16 -04:00
Aikar
0d2b71039e
Fix compile 2018-11-01 20:16:12 -04:00
Aikar
47b9a5d178
Optimize Small Entity Movement
Optimizes small movements by entities by merging the movement
into the entities next larger movement, until enough movement
velocity has been hit.

This reduces collision detection and able to reduce movement
cpu cost by 5-7%.

The default option of 0.75 seems to provide all the gains without
any noticable behavior change to entity movement.

We have to exclude slimes due to weird jumping animation bugs.
2018-11-01 20:11:31 -04:00
MisterVector
645cfad665
MC-136865: Pass original itemstack for enchantment checks on block break
When an itemstack runs out of durability, the amount is reduced to
0 which then marks the item as invalid. This causes the last unit
of durability to not apply enchantments as the enchantment level
check sees the item as a dud.

keep the clone of the item used to a non empty value so it represents
the item used.
2018-11-01 20:08:18 -04:00