Commit Graph

1518 Commits

Author SHA1 Message Date
Aikar
ae2cf4828a
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-08-23 16:46:33 -04:00
MicleBrick
fe10e42094 Cached IBlockData to CraftBlockData conversion (#1368)
Avoid using reflection to create CraftBlockData instances. 

Computes the class to use on IBlockData creation and clones it when needed.
2018-08-23 16:44:41 -04:00
Zach Brown
a420df2fd4 Allow ProtoChunks to be loaded
Reverts 6666adc92c
Fixes GH-1348
2018-08-23 15:40:00 -04:00
BillyGalbreath
ac5ba5bcc8 Fix MC-124320 (#1369) 2018-08-23 13:02:57 -04:00
Christopher White
6c32ee4a5c Add isChunkGenerated API (#1363)
Resolves #1329
2018-08-22 21:13:03 -04:00
Aikar
22614dd064
Merge branch 'master' into pre/1.13
* master:
  Fix some false positive warnings printing that shouldnt be
2018-08-20 20:23:06 -04:00
Aikar
1218b4aae6
Fix some false positive warnings printing that shouldnt be
reduces some log spam
2018-08-20 20:20:40 -04:00
Aikar
2155cb7a61
Merge branch 'master' into pre/1.13
* master:
  Fix false positive on Chunk Entity slice messages #1302
2018-08-20 00:58:08 -04:00
Aikar
c775246c69
Fix false positive on Chunk Entity slice messages #1302
Update links too
2018-08-20 00:54:03 -04:00
Aikar
3a4b892146
[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:
82f4b3b1 SPIGOT-4292: Ignore itemstacks with invalid enchants
2018-08-19 22:54:42 -04:00
Aikar
0e3549023c
Restore Optimized Hoppers patch
Mojang changed behavior of .cloneItemStack() so that if you clone while
count = 0, it clones as AIR instead of original Item type.

So we needed a flag to keep old behavior.
2018-08-18 18:21:35 -04:00
Aikar
7b466d5f83
restore vanilla default mob-spawn-range 2018-08-18 12:43:44 -04:00
Aikar
ecf97ddca0
Fix some performance regression in last patch 2018-08-18 12:42:17 -04:00
Aikar
e5d57793d2
Merge pull request #1315, Closes #1207
Cache Counts by Entity type to optimize mob spawning
2018-08-18 12:23:11 -04:00
Zach Brown
3cc691efd8
Merge branch 'master' into pre/1.13 2018-08-18 04:12:45 -05:00
Zach Brown
ce750d7618
Don't iterate twice - Fixes GH-1346 2018-08-18 03:58:53 -05:00
Mystiflow
51e29fb2a1 Send nearby packets from world list instead of server list (#1196) 2018-08-17 18:05:00 -04:00
Aikar
fa254d2142
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-08-17 18:01:37 -04:00
BillyGalbreath
04f6110896 1.13: Player launch projectile event (#1249)
Replaces PR #1193 for 1.13

I'm pretty sure I got all player launched projectiles (except arrows). Let me know if I missed any.

This fixes a use-case specific issue that was discovered [here](https://www.spigotmc.org/threads/projectilehitevent-doesnt-work-in-survival-mode.327097/page-2#post-3059433). I have a use-case example a few posts down, [here](https://www.spigotmc.org/threads/projectilehitevent-doesnt-work-in-survival-mode.327097/page-2#post-3060204).
2018-08-17 17:55:40 -04:00
searchndstroy
9c4490bda4 Optimize BlockPosition helper methods (#1339)
Resolves #1338
2018-08-17 17:51:56 -04:00
Aikar
0ac59814c0
Merge remote-tracking branch 'origin/master' into pre/1.13
* origin/master:
  Fix watchdog restarting on short timeout (#1344)
2018-08-17 12:14:56 -04:00
searchndstroy
3f883badab Fix watchdog restarting on short timeout (#1344) 2018-08-17 12:09:08 -04:00
Aikar
5302850894
Merge branch 'master' into pre/1.13
* master:
  Fix bug in last patch
  Ensure chunks are always loaded on hard position sets
  Improve Watchdog Early Warning Feature - Closes #1319
  Allow disabling armour stand ticking
2018-08-16 18:25:44 -04:00
Aikar
6e2711d666
Fix bug in last patch 2018-08-16 17:52:24 -04:00
Aikar
0645364ee5
Ensure chunks are always loaded on hard position sets
Player Movement, Entity Creation and Teleportation move
entities with a very "You are here, no debate" change, making
the server register them as there, regardless if that chunk was
loaded or not.

It appears possible that with hack clients and lag, a player
may be able to move fast enough to move into an unloaded
chunk and get into a buggy state.

To prevent this, we will ensure a chunk is always loaded,
guaranteeing that the entity will be properly registered
into its new home comfortably.

Closes #1316
2018-08-16 17:46:38 -04:00
Aikar
dc428860cf
Improve Watchdog Early Warning Feature - Closes #1319
1) Don't kick in until server has started (the full crash will still kick in before full start)
2) Delay reporting until 10 seconds, then print every 5
3) Make the intervals configurable
4) Make it able to be disabled by setting every interval to <= 0
2018-08-16 17:30:26 -04:00
Colin Godsey
6656d07bd2 pr changes, flat array 2018-08-15 15:07:30 -06:00
Aikar
0e7932315b
Fix NPE Potential in CraftBanner - Fixes #1337, #1336 2018-08-15 08:47:34 -04:00
kashike
edb9d18aed Allow disabling armour stand ticking 2018-08-15 01:29:41 -07:00
Aikar
3bc40e491f
Fix NPE in CraftBanner due to null world, potentially other things fixed
Banners only load color if the world is set. I don't know why...

For some reason, the world was not set on these, so it was changing behavior.

So if we want an accurate clone, world needs to be set.
2018-08-15 01:21:10 -04:00
Aikar
36e6c991af
Ability to get Tile Entities from chunks without snapshots
Also make Timings use said new feature and not create snapshots on it reading data
2018-08-15 01:20:40 -04:00
Aikar
1d2b2da49e
[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:
dde07e23 Update docs for Enderman carrying methods

CraftBukkit Changes:
452a1738 SPIGOT-4271: Fix API error when enderman are not carrying a block
2018-08-14 18:59:40 -04:00
Shane Freeder
466e43b16d
Merge branch 'master' into pre/1.13 2018-08-14 16:26:01 +01:00
chickeneer
bd1d0bf426 Add a force option to the ParticleBuilder API (#1322)
Particle packets contain a boolean which marks the particle to either force or show normal to the receiver.
Spigot has been sending all particles with the force boolean which overrides client particle settings.

Related changes in this commit;
- Add a force option to the ParticleBuilder API, which defaults to true to keep spigot consistent with existing api.
- Add a new spawnParticle method to support this mode as a parameter. Of course kept existing api methods the same so as to not break them.

Let me know if changes are needed.
2018-08-14 01:42:31 -04:00
Aikar
49aa3c4e2d
Fix NPE in AnvilDamageEvent - Closes #1331 2018-08-13 22:39:50 -04:00
Aikar
d285e05dd8
[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:
4a241086 SPIGOT-4261: Missing turtle / phantom spawn egg meta
2018-08-13 04:29:35 -04:00
Aikar
716ca620b1
Improve Watchdog Early Warning Feature - Closes #1319
1) Don't kick in until server has started (the full crash will still kick in before full start)
2) Delay reporting until 10 seconds, then print every 5
3) Make the intervals configurable
4) Make it able to be disabled by setting every interval to <= 0
2018-08-12 13:27:23 -04:00
Aikar
3a70bed5f4
Updated Upstream (Bukkit/CraftBukkit) for LootTable API
I have tested that the Replenishing Feature still works as expected.
Lootable API's that now have Bukkit equivalents are now deprecated.

Bukkit Changes:
f0f33981 SPIGOT-1936: LootTable API

CraftBukkit Changes:
c0df4b82 SPIGOT-1936: LootTable API
2018-08-12 13:11:13 -04:00
Aikar
f8ecb526e7
Fix queue patch 2018-08-12 02:36:46 -04:00
Aikar
3830baeb96
Merge branch 'master' into pre/1.13
* master:
  Use a Queue for Queueing Commands
2018-08-12 02:34:54 -04:00
Aikar
2900e7fa79
Use a Queue for Queueing Commands
Lists are bad as Queues mmmkay.
2018-08-12 02:34:34 -04:00
Aikar
646ddfd6f9
Restore portal fix 2018-08-12 02:14:31 -04:00
Aikar
4bb44d2fcb
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:
c23d391f Update documentation of BlockPhysicsEvent
14fcd896 SPIGOT-4258: Add Player.updateCommands method

CraftBukkit Changes:
15da7067 SPIGOT-4258: Add Player.updateCommands method

Spigot Changes:
2b0e71c7 Rebuild patches
2018-08-12 02:08:09 -04:00
prplz
8ad4c1e475 Fix PortalCreateEvent again (#1324) 2018-08-11 19:18:30 -04:00
Aikar
e665cd9936
[CI-SKIP] Fix duplicate getServer() method in DedicatedPlayerList
This causes CraftServer to show as an error state and other files too..

It's driving me nuts.
2018-08-11 13:48:31 -04:00
prplz
895a4dcafc
Fix custom permissions reloading (#1325) 2018-08-11 09:39:53 -04:00
Aikar
5d42c9c99d
Merge remote-tracking branch 'origin/master' into pre/1.13
* origin/master:
  Use ConcurrentHashMap in JsonList & Optimize (#471) (#1309)
2018-08-11 09:35:11 -04:00
egg82
6ef9abeec2 Use ConcurrentHashMap in JsonList & Optimize (#471) (#1309)
* [CI-SKIP] add .editorconfig for base code style settings

* * Created patch 0349 (fixes #471)

* * Made requested modifications

* * Made requested modifications (x2)

* * Made recommended changes (x3)

* * Moved ConcurrentMap return values to Map as no functions specific to ConcurrentMap were used (backing map is still ConcurrentMap)
* Removed ConcurrentMap import
2018-08-11 08:46:46 -04:00
prplz
57798530bf Fix custom permissions reloading (#1325) 2018-08-11 08:45:38 -04:00
Aikar
c93d1f53be Detect and repair corrupt Region Files - Closes #1317
If the file has partial data written but not the full 8192 bytes,
then the server will be unable to load that region file...

I don't know why mojang only checks for 4096, when anything less than 8192 is a crash.

But to be safe, it will attempt to back up the file.
2018-08-11 00:55:42 -04:00
Aikar
6666adc92c don't try to load protochunks, we don't save them
no reason to try to load them when we don't save them!
2018-08-11 00:12:25 -04:00
Aikar
f835a91d15
Updated Upstream (Bukkit/CraftBukkit), deprecate SentientNPC API
Upstream has added the equivalent of our SentientNPC API, with exception to the EnderDragon.

We've added Mob to the EnderDragon, and our SentientNPC API should behave the same.

Vex#getOwner has been deprecated and a replacement Vex#getSummoner has been added using Mob.

However, since 1.13 is not production ready, SentientNPC API is subject for removal in 1.13.1 since
1.13 API is not compatible with 1.12.

Please move to the Mob interface ASAP.

This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
c5ab54d8 Expand GameRule API
ab9a606c Improve entity hierarchy by adding Mob interface.

CraftBukkit Changes:
29e75648 Expand GameRule API
50e6858b Improve entity hierarchy by adding Mob interface.
0e1d79b4 Correct error in previous patch
2018-08-10 22:20:59 -04:00
Shane Freeder
c2c18b2b7f
Don't reset current tick based on system time 2018-08-10 15:27:42 +01:00
Aikar
aca003c22a
Fix JDK compiler issue, apparently eclipse compiles this ambiguityo 2018-08-09 22:50:05 -04:00
Shane Freeder
3ac743124e
re: Fixup improve tick loop patch 2018-08-09 14:14:17 +01:00
Shane Freeder
71490b2325
Fixup improve tick loop patch 2018-08-09 14:02:10 +01:00
Colin Godsey
65a71d18c4 clean up, pr fixes 2018-08-09 06:35:13 -06:00
Colin Godsey
40e32744dd reduced down to EnumCreatureType 2018-08-08 20:49:02 -06:00
Colin Godsey
0753b9271f pr fixes 2018-08-08 18:07:03 -06:00
Colin Godsey
c09191b7f9 Configurable water over lava #1227 2018-08-08 15:23:54 -06:00
Colin Godsey
a12c0881a0 add entity count cache #1207 2018-08-08 15:22:58 -06:00
Zach Brown
1ed5531ace
Rebuild merged patch file 2018-08-08 16:06:18 -05:00
Zach Brown
6d1c301a42
Merge branch 'master' into pre/1.13 2018-08-08 16:03:09 -05:00
miclebrick
b369e70970
Add 5 second short dumps to watchdog (#1314) 2018-08-08 15:58:02 -05:00
Aikar
4bff819890
[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:
53d3ac0a SPIGOT-4238: Sometimes buckets are leaky client side when empty event is cancelled
2018-08-07 10:56:06 -04:00
Aikar
85bfc4508a
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-08-07 10:51:42 -04:00
BillyGalbreath
dd17f98e61 [1.13] Hand for bucket events (#1300)
This adds the `getHand()` method to the `PlayerBucketEvent`s
2018-08-07 10:44:44 -04:00
Aikar
72083fd891
[Auto] Updated Upstream (CraftBukkit)
upcommit

CraftBukkit Changes:
200b2398 SPIGOT-4233: Fix some missing handled NBT tags
2018-08-06 06:19:26 -04:00
Brokkonaut
d5eb80049c [1.13] Skull block profile api (#1308)
Adds #1307
2018-08-06 01:24:55 -04:00
Aikar
05466e3b47
[Auto] Update Upstream
Upstream has released updates that appear to apply compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing.

Bukkit Changes:
d2834556 SPIGOT-4219: Event for PigZombies angering.

CraftBukkit Changes:
a9c796f1 SPIGOT-4184: Fix furnaces not matching Vanilla smelt or animations
195f071e SPIGOT-4219: Event for PigZombies angering.
5e3082c7 SPIGOT-4230: Improve legacy block types
2018-08-05 19:46:43 -04:00
Aikar
a4e7bdb306
[Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-08-05 18:55:03 -04:00
BillyGalbreath
adcd0c1505 SkeletonHorse Additions (#1283) 2018-08-04 21:12:41 -04:00
Aikar
7abf02b17c
Fix client rendering skulls from same user
See: https://github.com/PaperMC/Paper/issues/1304

Changes the UUID sent to client to be based on either
the texture payload, or random.

This allows the client to render multiple skull textures from the same user,
for when different skins were used when skull was made.

Closes #1304
2018-08-04 20:42:27 -04:00
Aikar
716db7fb5e
[CI-SKIP] Re-add getBukkitEntity methods to child classes
Helps with development to not need to cast as much...

No clue why upstream makes some of the decisions they do....
2018-08-04 17:03:53 -04:00
Aikar
e2bc726301
Merge branch 'master' into pre/1.13
* master:
  Undo a mistaken chunk registration change - Closes #1302
2018-08-04 13:00:26 -04:00
Aikar
28caff2299
Undo a mistaken chunk registration change - Closes #1302
I misinterpreted some code as a risk of entity loss, but now
after deeper study, I see how that code was used more and why
it was adding entities to chunks that they shouldn't have been
in during a world transfer process.
2018-08-04 12:53:38 -04:00
Aikar
3cc52119fa
Merge branch 'master' into pre/1.13
* master:
  Fix ItemStack.removeEnchantment returning wrong value
2018-08-04 01:22:57 -04:00
Aikar
b78002eeba
Fix ItemStack.removeEnchantment returning wrong value 2018-08-04 01:13:10 -04:00
Aikar
9078464e74
Merge branch 'master' into pre/1.13
* master:
  make dupe uuid saferegen delete range configurable
  Entity add to world fixes - #1223
2018-08-04 00:33:21 -04:00
Aikar
aea67db7a0
make dupe uuid saferegen delete range configurable
also ensure we never process already valid entities. this shouldnt be possible as of recent
commits as we made the entity slice array safer, but doesn't hurt for this logic to be safe too
incase that patch got dropped in a future version by accident/necessarily
2018-08-04 00:26:56 -04:00
Aikar
444ce86194
Entity add to world fixes - #1223
1) Chunk Registration might kill an entity, don't add it to the world if it did!

2) By default, entities are added to the world per slice iteration.
This opens risk of the slices being manipulated during chunk add if an
EntityAddToWorldEvent spawns an entity into this chunk.
Fix this by differing entity add to world for all entities at the same time

3) If a duplicate entity is attempted to add to the world of an entity, and
the original entity is dead, overwrite it as the logic does for unloaod queued entities.

Should hopefully finish up issues with #1223
2018-08-03 23:02:44 -04:00
Aikar
177ec197a7
Merge branch 'master' into pre/1.13
* master:
  Fix logic bug in negative XP bug fix - Closes #1169
2018-08-03 21:20:57 -04:00
Aikar
b3eb265ab5
Fix logic bug in negative XP bug fix - Closes #1169 2018-08-03 20:59:35 -04:00
Aikar
dbc4c29d6c
Merge branch 'master' into pre/1.13
* master:
  Fix "MC-135506: Experience should save as Integers" still saving as short" (#1301)
2018-08-03 09:27:01 -04:00
Mark Vainomaa
22b2bf6270 Fix "MC-135506: Experience should save as Integers" still saving as short" (#1301) 2018-08-03 09:25:21 -04:00
Aikar
3c61083c72
fix missing | on dupe uuid patch 2018-08-03 08:51:29 -04:00
Aikar
dc3dc77245
fix missing | on dupe uuid patch 2018-08-03 08:51:04 -04:00
Zach Brown
03028e52a3
Use correct update flag and blockdata for portals
Fixes GH-1286
2018-08-03 03:26:10 -05:00
Aikar
751317f21b
Merge branch 'master' into pre/1.13
* master:
  fix missed break statement and enum check on dupe uuid resolve
2018-08-03 01:33:34 -04:00
Aikar
f4f8a3be2d
fix missed break statement and enum check on dupe uuid resolve 2018-08-03 01:32:00 -04:00
Aikar
0f479b740d
Merge branch 'master' into pre/1.13
* master:
  MC-135506: Experience should save as Integers
  Fix EXP orb merging causing values to go negative - Closes #1169
  Add "Safe Regen" Duplicate UUID resolver and make default
2018-08-03 01:29:20 -04:00
Aikar
6b00d856be
Upstream update 2018-08-03 01:04:28 -04:00
Aikar
38af7610e3
MC-135506: Experience should save as Integers
A large orb will lose its EXP value if it went over 32k due to short truncation.
2018-08-03 00:07:02 -04:00
Aikar
56b92ff216
Fix EXP orb merging causing values to go negative - Closes #1169 2018-08-03 00:06:20 -04:00
Aikar
17dca0a0fe
Add "Safe Regen" Duplicate UUID resolver and make default
After witnessing behavior of the regeneration logs, its clear that Vanilla
has had bugs with saving duplicate entities for a while....

Some entities are saved in multiple chunks, and now we are bringing those duplicates
out that use to never surface.

This mode will analyze if the entity appears to be a duplicate (near the other dupe uuid)
and delete the entity instead.

This should reduce regenerations to entities that are nowhere near each other, and
therefore more likely to be subject to real UUID collisions due to our
previous bug, and therefor should survive the chunk load.
2018-08-02 23:25:37 -04:00
Zach Brown
dbde9e6332
Update upstream B/CB 2018-08-02 18:29:34 -05:00
Aikar
1abd4d51c1
Update upstream 2018-08-01 22:49:47 -04:00
Zach Brown
6a48a4529b
Make portal teleportation adjustment math more accurate
Fixes GH-1295

Non-standard sized portals exacerbate a flaw in the vanilla
portal teleportation adjustment logic.
As a result, an entity can end up slightly inside of the surrounding
portal blocks. In vanilla, this issue is minor and you are adjusted out
as if it never happened. In CraftBukkit and derivatives, the
anti-suffocation behavior activates and players end up teleported on top
of their portals.

This improves the offset so as to keep the issue from ever occurring in
the first place.

Special thanks to CarpetMod who appears to have had this fixed for some
time, and has licensed their code such that we can use it as needed.
2018-07-31 20:13:40 -05:00
Zach Brown
9939390df7
Add decompile fix for ChunkSection 2018-07-31 16:55:57 -05:00
Zach Brown
db81205dd7
Merge branch 'master' into pre/1.13 2018-07-31 16:44:46 -05:00