Commit graph

1824 Commits

Autor SHA1 Nachricht Datum
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
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
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
Aikar
13d1abf01e
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has only been PARTIALLY tested by PaperMC and as with ANY update, please do your own testing

I've tested basic region file saving as well as our oversized chunks approach.

Bukkit Changes:
e167e549 Clarify MerchantInventory#getSelectedRecipe.
3a1d5b8f Apply default permissions by registration order.
c64cc93f Make tags Keyed
ec037ed7 Added a method to get a list of tags
bfb6ef86 Introduce rotation methods to the Vector class
fc727372 Remove draft API from FluidLevelChangeEvent

CraftBukkit Changes:
6430d9c0 SPIGOT-4632: BlockState location is not fixed
14cd1688 Fix CraftInventoryMerchant#getSelectedRecipe if there is no active merchant recipe.
c24abab7 Load custom permissions after default permissions.
bc99dfe8 Make tags Keyed
6fce004f Added a method to get a list of tags

Spigot Changes:
e5e5c7c6 Allow Saving Large Chunks
e8d3881c Rebuild patches
2019-02-21 22:41:40 -05:00
Aikar
825191f069
Fix loot table restriction when replenish is disabled - Fixes #1860 2019-02-16 18:22:35 -05:00
Aikar
84480114eb
Allow Saving of Oversized Chunks - READ COMMIT DETAILS!!!
Please test this build on a local TEST SERVER before sending to your live server!

PaperMC is not responsible for any data loss to your chunks.

-------------------------------------------------------------------

The Minecraft World Region File format has a hard cap of 1MB per chunk.
This is due to the fact that the header of the file format only allocates
a single byte for sector count, meaning a maximum of 256 sectors, at 4k per sector.

This limit can be reached fairly easily with books, resulting in the chunk being unable
to save to the world. Worse off, is that nothing printed when this occured, and silently
performed a chunk rollback on next load.

This leads to security risk with duplication and is being actively exploited.

This patch catches the too large scenario, falls back and moves any large Entity
or Tile Entity into a new compound, and this compound is saved into a different file.

On Chunk Load, we check for oversized status, and if so, we load the extra file and
merge the Entities and Tile Entities from the oversized chunk back into the level to
then be loaded as normal.

Once a chunk is returned back to normal size, the oversized flag will clear, and no
extra data file will exist.

This fix maintains compatability with all existing Anvil Region Format tools as it
does not alter the save format. They will just not know about the extra entities.

This fix also maintains compatability if someone switches server jars to one without
this fix, as the data will remain in the oversized file. Once the server returns
to a jar with this fix, the data will be restored.
2019-02-15 20:13:38 -05:00
Aikar
ed62690821
Catch all exceptions thrown by chunk loading
If anything throwable is thrown, be sure its caught too.

Because I totally did new Error() out of javascript habit...

This ensures that chunk loading process cant get stuck due to uncaught errors
2019-02-15 18:33:45 -05:00
Zach Brown
0ecc1545dd
Update upstream CB
--- work/CraftBukkit
Submodule work/CraftBukkit a2dd0e303..51c118b1d:
  > SPIGOT-4619: Incorrect packet order for villager inventories
  > Fix EntityPickupItemEvent getRemaining / PlayerInventory#canHold
2019-02-13 09:07:12 -05:00
Shane Freeder
60d222d330
Fix newline inconsistencies from libraries 2019-02-10 21:53:53 +00:00
Shane Freeder
3ddcf052ae
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:
a8887389 Make AreaEffectCloudApplyEvent cancellable

CraftBukkit Changes:
a2dd0e30 SPIGOT-4615: Missing target event for withers
b26fb374 Update outdated spigot link
2b1940ae Make AreaEffectCloudApplyEvent cancellable
2019-02-10 21:17:18 +00:00
Zach Brown
a5172f8d68
Always run server tests 2019-02-07 00:48:17 -05:00
Aikar
7d5b217d83
Fix logic error in async chunk loading
if a chunk load was cancelled after generating stage started
it would short circuit return with a null.

however this skipped the creation of the loadTask, which some code
would then invoke in requestChunk and trigger an NPE.

This then likely left an incomplete corrupt request in the chunk map
which then crashes servers.

It should fix these isseues
Fixes #1775
Fixes #1743
2019-02-07 00:04:29 -05:00
Shane Freeder
182d4f528f
Fix NPE during server initialization from server list pings 2019-02-06 19:15:46 +00:00
Shane Freeder
e952f6ebe2
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:
43b46cbd SPIGOT-4608: Improve quality of MapMeta APIs

CraftBukkit Changes:
c7ba9790 Fix incorrect method descriptor in previous commit
3d19f011 SPIGOT-4608: Improve quality of MapMeta APIs
2019-02-06 02:19:49 +00:00
Zach Brown
8211569c9a
Only enforce CraftPlayer#remove exception on instances of EntityPlayer
Should be more friendly to plugins that dabble in inheriting NMS
entities.
2019-02-05 07:44:36 -05:00
Zach Brown
28cf2696d4
Block Entity#remove from being called on Players
This doesn't result in the same behavior as other entities and causes
several problems. Anyone ever complain about the "Cannot send chat
message" thing? That's one of the issues this causes, among others.

If a plugin developer can come up with a valid reason to call this on a
Player we will look at limiting the scope of this change. It appears to
be unintentional in the few cases we've seen so far.
2019-02-04 23:43:28 -05:00
Aikar
5ae3895105
Fix Async Tab Completion processing
previous logic was super broken and did not truncate your currently typed
part of the input from the suggestions.
2019-02-04 22:39:00 -05:00
Shane Freeder
abba3d113b
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:
bb813f6f SPIGOT-4605: Warn against hacking physics

CraftBukkit Changes:
2ced0233 Don't handle sync packets for kicked players
d5e96882 SPIGOT-4602: Cache reflection in decompile error workaround

Spigot Changes:
b0f4c22b SPIGOT-4605: Catch more physics problems
2019-02-03 15:34:04 +00:00
Zach Brown
f8058a8187
Fire BlockPistonRetractEvent for all empty pistons
There is an explicit check in the handling code for empty pistons that
prevents sticky pistons from firing the event. However when we look back
at the history we see that this check was originally added so that ONLY
sticky pistons would fire the retract event. I'm not sure why.
1092acbddf

Over the course of several updates, the meaning of that field appears to
have changed from "is NOT sticky" to "is sticky". So now its having the
opposite effect. Only normal pistons fire the retraction event. And like
all things in CB, it's just been carried around since.

If we are to believe the history, the correct fix for this issue is to
flip it so it only fires for sticky pistons, but that puts us in a
bind. It's already firing for non-sticky pistons, changing it now would
likely result in breakage. Furthermore, there is little documentation as
to WHY that was ever intended to be the case.

Instead we opt to remove the check entirely so that the event fires for
all piston types.

Fixes GH-1829
2019-01-31 16:45:43 -05:00
Shane Freeder
7a73ce03e9
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:
3108e64a SPIGOT-4193: API for selecting entities by strings

CraftBukkit Changes:
ad6070df SPIGOT-4193: API for selecting entities by strings
2019-01-31 04:49:52 +00:00
Shane Freeder
e87859d8a5
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:
d58803c2 SPIGOT-4597: Make BlockDropItemEvent use a list
d450fdf1 Add note about Maven repository usage to pom.xml

CraftBukkit Changes:
ed274c51 SPIGOT-4597: Make BlockDropItemEvent use a list
1734f378 SPIGOT-4598: Shift click on custom workbench inventory causes crash
a65b73ad Add note about Maven repository usage to pom.xml
2019-01-30 13:26:12 +00:00
Shane Freeder
e3f2448ae1
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:
60268ac8 Recipe choice lists should be copied once handed over to Bukkit
7ab335f2 Consistent multiple choice APIs for RecipeChoice.
2b6f3d7f SPIGOT-4586: Change PotionEffectType#value to not include null

CraftBukkit Changes:
2aba349f Need to update item in hand if fish bucket pickup cancelled
b634e059 SPIGOT-4591: Must mark itemstacks as dirty in case the handle itself changed
1748af89 Consistent multiple choice APIs for RecipeChoice.
2019-01-28 22:14:04 +00:00
kashike
f238f3a0f4 Force anti-xray chunk edge mode to WAIT 2019-01-25 16:11:42 -08:00
Shane Freeder
40a8c003df
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:
d38ac1be Update compiler
2844ce20 Add CookTimeTotal API to Furnace

CraftBukkit Changes:
13f71402 Update compiler
61c762f4 Add CookTimeTotal API to Furnace
2019-01-24 21:36:24 +00:00
Shane Freeder
88a347c753
Make force actually force a load
While this posed no issues in testing, this is the only behavioral
difference which might explain some increased reports in missing
chunks on the client
2019-01-21 20:48:27 +00:00
Shane Freeder
44e66f7e53
Make anti-xray load chunks async when enabled (fixes #1808) 2019-01-21 07:12:32 +00:00
Shane Freeder
9b05677eef
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:
c64197df SPIGOT-4584: Call events for hatching turtle eggs
f54588bd Add some missing vanilla tags
dacf8f8d Fix stray asterisk in BukkitScheduler javadocs

CraftBukkit Changes:
7fc66b28 Fix minecraft.command.selector permission
47b06d5b SPIGOT-4584: Call events for hatching turtle eggs
2019-01-18 22:34:02 +00:00
Shane Freeder
a7f924c2ca
Remove "Don't double add golems to world"
Fixed upstream
2019-01-17 02:02:56 +00:00
Brokkonaut
f64dce2719 Remove "Fire EntityCombustEvent for phantoms" patch as it is fixed in Spigot (#1805)
It is fixed here: 438556243d
2019-01-16 18:06:39 +00:00
Shane Freeder
54dd19b818
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:
18cda936 Fix variant of unloadChunkRequest that was incorrectly never deprecated
00763e1b Deprecate some methods
35a83d54 SPIGOT-4572: Make default no permission message clearer
6163343d Fix some misplaced material enum entries
8736469c Fix typo in TechnicalPiston documentation

CraftBukkit Changes:
0c715b32 SPIGOT-4579: Shulker boxes not dropping in creative
50fbc3f1 SPIGOT-4576: Fix attributes in itemstack internal data being lost
8059a937 SPIGOT-4577: Fix loss of int/double custom tags when serialized to yaml
07e504c3 Clarify exception thrown when setting drop chance for player inventory
98b862ad Fix duplicate iron golem add
843cee65 Fix a bunch of duplicate EntityCombustEvent calls
43855624 SPIGOT-4571: EntityCombustEvent not firing for phantoms
2019-01-15 21:12:19 +00:00
Zach Brown
21ba01aaf4
Make anti-xray chunk edge mode LOAD the default
Fixes GH-1749

Setting the new default to load chunk edge neighbors may have unintended
side-effects so feedback will be important. Specifically, if you're not
using the asynchronous chunk loader, you should probably switch to mode
2 (WAIT)

Old users will be migrated automatically if: You're using engine mode 1
(HIDE) and you're using chunk-edge-mode 1 (DEFAULT). Other users will
not be migrated.

Thanks @stonar96
2019-01-12 18:13:53 -05:00
Shane Freeder
a5e0335065
Address some issues with book limits (#1798)
The multibyte calculation has been fixed, now we actually work out which
characters take more than a byte.

Diminishing returns has been modified, previously the multiplier would zero
itself out due to floating point limitations
2019-01-12 16:29:15 +00:00
Shane Freeder
c42ec4782e
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:
d4e8c8b3 SPIGOT-4570: Add FluidLevelChangeEvent

CraftBukkit Changes:
9dc56581 SPIGOT-4570: Add FluidLevelChangeEvent
b15abb12 SPIGOT-4566: Don't special case NETHER_PORTAL teleport reason from plugins
2019-01-08 16:57:27 +00:00
Zach Brown
a6ee4b9965
Add vehicle tracking workaround from 1.12.2 branch 2019-01-07 15:02:11 -06:00
Shane Freeder
797c46bd27
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:
6de6ac4a BlockDropItemEvent should refer to getBlockState rather than getBlockData
2b555a75 Fix BlockDropItemEvent for Skulls and Shulker Boxes

CraftBukkit Changes:
f17d591c Fix BlockDropItemEvent for Skulls and Shulker Boxes

Spigot Changes:
f56e2e78 Catch async recipe add
2019-01-07 18:24:51 +00:00
Shane Freeder
c608a94ff7
Use OBFHELPER in previous commit 2019-01-06 17:48:24 +00:00
Michael Himing
5cdbb30e78
Fix PlayerEditBookEvent 2019-01-06 17:33:15 +00:00
Shane Freeder
f4e3b4e439
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:
5b680f0b Note maximum objective score length in documentation

CraftBukkit Changes:
5932f8a7 Load default world spawn areas in consistent order
3a5dc78f Fix confusing migration message appearing on fresh server
516a408f Remove redundant CraftBukkit change for secondary world data
73a2c749 Process conversation input on the main thread.
100c3f07 Cap Objective Score Length
6e842759 Cross World Entity Teleportation
7deba1c6 Check for blank OfflinePlayer Names
f2746a5e Descriptive kick reasons instead of Nope!
b0212308 Cap Channel Registrations
a610dcd8 Identify CraftScheduler threads with useful names

Spigot Changes:
19c3c5a5 Rebuild patches
2019-01-06 17:15:21 +00:00
Shane Freeder
b9badbf2bc
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:
79f6ba25 Skip tests on default builds
b85cc32f Further discourage World.regenerateChunk

CraftBukkit Changes:
7560d3b5 Skip tests on default builds
d0a9130d SPIGOT-4563: Fix regenerating chunks saved to disk already

Spigot Changes:
8173d06f Remove need for redundant second clone of repositories
8ede0393 Rebuild patches
2019-01-04 19:19:36 +00:00
Shane Freeder
ccbeb5c4ed
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:
6ffe5a68 Add RecipeChoice.ExactChoice API for NBT matches on ingredients
ffccf6b7 SPIGOT-4560: Add HumanEntity.sleep and related APIs

CraftBukkit Changes:
917411fd Remove redundant BlockPosition creation from sleep API
756c38d1 Add RecipeChoice.ExactChoice API for NBT matches on ingredients
8e65d8df SPIGOT-4560: Add HumanEntity.sleep and related APIs
a8382862 SPIGOT-4562: reducedDebugInfo not updated on world change
2019-01-02 18:10:14 +00:00
Shane Freeder
5d5e0ad75c
Don't double broadcast movement packets (fixes #1784)
WROOOONG LEEEVERRR....
2019-01-02 16:40:09 +00:00
Zach Brown
9af685abe7
Add APIs to replace OfflinePlayer#getLastPlayed
Currently OfflinePlayer#getLastPlayed could more accurately be described
as "OfflinePlayer#getLastTimeTheirDataWasSaved".

The API doc says it should return the last time the server "witnessed"
the player, whilst also saying it should return the last time they
logged in. The current implementation does neither.

Given this interesting contradiction in the API documentation and the
current defacto implementation, I've elected to deprecate (with no
intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose.
2019-01-02 01:04:11 -06:00
Shane Freeder
b68b282439
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

Warning: this commit contains more mapping changes from upstream, As always, ensure that you
have working backups and test this build before deployment; Developers working on paper will,
yet again, need to delete their work/Minecraft/1.13.2 folder

Bukkit Changes:
7fca5fd4 SPIGOT-4558: Preserve user order in the face of copied defaults in configurations
15c9b1eb Ignore spurious slot IDs sent by client, e.g. in enchanting tables
5d2a10c5 SPIGOT-3747: Add API for force loaded chunks
d6dd2bb3 SPIGOT-3538: Add getHitBlockFace for ProjectileHitEvent
771db4aa SPIGOT-794: Call EntityPlaceEvent for Minecart placement
55462509 Add InventoryView#getSlotType
2f3ce5b6 Remove EntityTransformEvent and CustomItemTagContainer from draft API
f04ad7b6 Make ProjectileLaunchEvent extend EntitySpawnEvent
ccb85808 Define EntitySpawnEvent
b8cc3ebe Add PlayerItemDamageEvent
184a495d Ease ClassLoader Deadlocks Where Possible
11ac4728 Expand Boolean Prompt Values in Conversation API
aae62d51 Added getAllSessionData() to the Conversation API.
9290ff91 Add InventoryView#getInventory API
995e530f Add API to get / set base arrow damage

CraftBukkit Changes:
c4a67eed SPIGOT-4556: Fix plugins closing inventory during drop events
5be2ddcb Replace version constants with methods to prevent compiler inlining
a5b9c7b3 Use API method to create offset command completions
2bc7d1df SPIGOT-3747: Add API for force loaded chunks
a408f375 SPIGOT-3538: Add getHitBlockFace for ProjectileHitEvent
b54b9409 SPIGOT-2864: Make Arrow / Item setTicksLived behave like FallingBlock
79ded7a8 SPIGOT-1811: Death message not shown on respawn screen
b4a4f15d SPIGOT-943: InventoryCloseEvent called on death regardless of open inventory
0afed592 SPIGOT-794: Call EntityPlaceEvent for Minecart placement
2b2d084a Add InventoryView#getSlotType
01a9959a Do not use deprecated ItemSpawnEvent constructor
9642498d SPIGOT-4547: Call EntitySpawnEvent as general spawn fallback event
963f4a5f Add PlayerItemDamageEvent
63db0445 Add API to get / set base arrow damage
531c25d7 Add CraftMagicNumbers.MAPPINGS_VERSION for use by NMS plugins
d05c8b14 Mappings Update
bd36e200 SPIGOT-4551: Ignore invalid attribute modifier slots

Spigot Changes:
518206a1 Remove redundant trove depend
1959ad21 MC-11211,SPIGOT-4552: Fix placing double slabs at y = 255
29ab5e43 SPIGOT-3661: Allow arguments in restart-script
7cc46316 SPIGOT-852: Growth modifiers for beetroots, potatoes, carrots
82e117e1 Squelch "fatal: Resolve operation not in progress" message
0a1a68e7 Mappings Update & Patch Rebuild
2019-01-01 03:29:51 +00:00
Shane Freeder
0318e62b45
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:
0969eedc Clarify furnace burn time behaviour as per SPIGOT-844
16453bfd SPIGOT-4503: Add API to insert complete ItemStack into Jukebox

CraftBukkit Changes:
dff66dfc Reduce copying of positions from block states
91cae6ef SPIGOT-4387: Durability looping from cancelled BlockPlaceEvent
24c5e68c SPIGOT-4493: Allow burnt out furnaces to remain lit like Vanilla whilst retaining SPIGOT-844 API
bc943daf Fix Jukebox API not synchronizing playing data with state
fe89a8c1 SPIGOT-4503: Add API to insert complete ItemStack into Jukebox
fc102494 Make CraftBlockState use BlockPosition
89ab4887 SPIGOT-4543: Jukebox playing calls should not use legacy data
6ff5a64c SPIGOT-4541: Cancelled bucket events require inventory update
2018-12-23 17:04:13 +00:00
Shane Freeder
ac66acab27
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:
78568d11 Tweak Block.getTemperature to return actual block temperature
9ad459ca SPIGOT-2151: Add support for getting simple bounding box of a block
ad28b19f Add BlockData#getAsString(boolean) to hide unspecified states

CraftBukkit Changes:
1b982fd6 Tweak Block.getTemperature to return actual block temperature
f55c8191 SPIGOT-2151: Add support for getting simple bounding box of a block
4b843638 Add BlockData#getAsString(boolean) to hide unspecified states

Spigot Changes:
573cdf2c BUILDTOOLS-425: Disable commit.gpgSign in applyPatches.sh
667bdd6b Deprecate Spigot version of Entity.isInvulnerable
2018-12-21 16:09:17 +00:00
Shane Freeder
b2f6b9f7ea
Prevent Enderman from loading chunks 2018-12-18 02:20:03 +00:00
Shane Freeder
6c34639605
Cleanup Entity add to world fixes 2018-12-18 02:07:05 +00:00
Shane Freeder
e293688578
Actually add entities to chunks
Because, you know, vanishing entities is always nice to have
2018-12-18 01:56:54 +00:00