Commit graph

1197 commits

Author SHA1 Message Date
Aikar
1db0b7ed58 Readd configurable max chunk gens per tick 2018-07-21 17:24:18 -04:00
Aikar
d6293c533d Restore Configurable Allowance of Perm Chunk Loaders 2018-07-21 17:03:26 -04:00
Aikar
58a8ca3eae Restore World.loadChunkAsync API - but load chunks sync
We are still missing Async Chunk Loading, but plugins may be
depending on this API, so it missing blocks upgrading.
2018-07-21 16:55:43 -04:00
Aikar
1b778924c3 Rebuild patches for upstream merge 2018-07-21 16:43:00 -04:00
Aikar
7c13469d6c Merge branch 'master' into pre/1.13
* master:
  Duplicate UUID Resolve Option
  Add more information to Entity.toString
  change LAST_EDIT to PAPER_LAST_EDIT for edit commands
  Add more information to Entity.toString()
  Add Debug Entities option to debug dupe uuid issues
  Guard the Entity.SHARED_RANDOM from seed changes
  Create a symlink on not-windows to current minecraft decompile dir
2018-07-21 16:13:27 -04:00
Aikar
97d99711ff Update Upstream 2018-07-21 16:03:10 -04:00
Aikar
51f03d3579 Duplicate UUID Resolve Option
Due to a bug in bd75ff8b5b
which was added all the way back in March of 2016, it was unknown (potentially not at the time)
that an entity might actually change the seed of the random object.

At some point, EntitySquid did start setting the seed. Due to this shared random, this caused
every entity to use a Random object with a predictable seed.

This has caused entities to potentially generate with the same UUID....

Over the years, servers have had entities disappear, but no sign of trouble
because CraftBukkit removed the log lines indicating that something was wrong.

We have fixed the root issue causing duplicate UUID's, however we now have chunk
files full of entities that have the same UUID as another entity!

When these chunks load, the 2nd entity will not be added to the world correctly.

If that chunk loads in a different order in the future, then it will reverse and the
missing one is now the one added to the world and not the other. This results in very
inconsistent entity behavior.

This change allows you to recover any duplicate entity by generating a new UUID for it.
This also lets you delete them instead if you don't want to risk having new entities added to
the world that you previously did not see.

But for those who are ok with leaving this inconsistent behavior, you may use WARN or NOTHING options.

It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
2018-07-21 14:47:05 -04:00
Aikar
1b8cee45a0 Add more information to Entity.toString 2018-07-21 14:46:56 -04:00
Aikar
f8af5faa43 Add more information to Entity.toString() 2018-07-21 10:29:37 -04:00
Aikar
19cec88852 Add Debug Entities option to debug dupe uuid issues
Add -Ddebug.entities=true to your JVM flags to enable more logging
2018-07-21 10:29:14 -04:00
Aikar
33cf273156 Guard the Entity.SHARED_RANDOM from seed changes
I don't clearly see any, but as a protection for future changes.
2018-07-21 09:03:10 -04:00
Brokkonaut
df8c42d4ad 1.13: Resend bed on cancelled interaction (#1245)
Minecraft 1.13 requires resending the block for both parts of the bed
2018-07-21 14:47:22 +02:00
Shane Freeder
7dd591d1a6 update B/CB/S 2018-07-20 20:57:43 +01:00
Zach Brown
f899206b89 Merge branch 'master' into pre/1.13 2018-07-20 14:15:12 -05:00
Minecrell
4e5ac2a052 Rebuild patch numbers 2018-07-20 14:06:39 -05:00
Minecrell
593e81812a Update to TerminalConsoleAppender 1.1.1 (#1240)
See https://github.com/Minecrell/TerminalConsoleAppender/releases/tag/1.1.1
2018-07-20 21:04:11 +02:00
Zach Brown
77f54129b4 Move decomp fix from last up to fixes patch 2018-07-19 16:55:27 -05:00
Zach Brown
c17484979e Fix crash in RegionLimitedWorldAccess 2018-07-19 16:51:32 -05:00
Shane Freeder
62511066e1 Merge branch 'master' into pre/1.13 2018-07-19 20:23:18 +01:00
Minecrell
391324437a Avoid adding NetworkManager twice
The removal of `ServerConnection.this.h.add(networkmanager);` got
lost in the 1.13 update, causing network managers to be registered
twice.

Fixes "handleDisconnection() called twice" warning spam in console.
2018-07-19 20:14:27 +02:00
Minecrell
9a1643dab4 Fix decompile/deobfuscation error in BlockPosition iterator
Some of the fields in the anonymous class are named the same as the
surrounding method's parameters, which caused the fields to be
initialized incorrectly.

That way it keeps returning the same block position, resulting
in an infinite loop during chunk generation.
2018-07-19 19:50:34 +02:00
Hugo Manrique
b90705d2ad Avoid item merge if stack size above max stack size (#1217) 2018-07-19 17:51:55 +02:00
Aikar
c3a05c5ba0 Update master patches just merged to 1.13 2018-07-19 01:51:01 -04:00
Aikar
be3fe3da6d Merge branch 'master' into pre/1.13
* master:
  Don't process despawn if entity is in a chunk scheduled for unload
  Fix Squids corrupting the entire servers entity randomness....
  Fix placement of chunk tracking - Fixes #1199
2018-07-19 01:46:11 -04:00
Aikar
bc063a06e8 Don't process despawn if entity is in a chunk scheduled for unload
This won't happen anyways if the user has
"skip ticking for entities in chunks scheduled for unload" turned on,
but if they don't, protect from this instant killing the entity to
keep it vanilla in behavior

a player may teleport away, and trigger instant despawn
2018-07-19 01:25:18 -04:00
Aikar
5353f8878e Fix Squids corrupting the entire servers entity randomness....
Really hope this solves #1223

Also re-add vanilla debug messages back and add uuid to toString
2018-07-19 01:13:53 -04:00
Shane Freeder
bd34c3623b NOT FINISHED! She compiles, and she... suffers the wrath of chunkgen... 2018-07-19 05:42:43 +01:00
Shane Freeder
aea45cba34 NF! 1.13 - more fixes 2018-07-19 00:31:45 +01:00
Shane Freeder
20e3b69061 NOT FINISHED! 1.13 pre-7
I need more creative commit messages.
2018-07-19 00:16:19 +01:00
Shane Freeder
37f7038e10 NOT FINISHED! 1.13 pre-7 - Holy moley, more patches!
Really, don't touch! may harm your cat!
2018-07-18 19:55:52 +01:00
Aikar
96f62ca759 fix a patch catboy asked me to 2018-07-18 01:08:17 -04:00
Aikar
9ce19f0321 NOT FINISHED: Current progress, updated upstream 2018-07-18 00:52:33 -04:00
Shane Freeder
68f8952459 NOT FINISHED! restore dropped patches, fix one more! 2018-07-18 01:37:30 +01:00
Shane Freeder
3cb169aa7c NOT FINISHED! 1.13-pre7 - even more patches!
Patches, patches everywhere!
2018-07-18 01:08:13 +01:00
Shane Freeder
c8d8659ad3 NOT WORKING! Even even more patches! 2018-07-17 21:32:05 +01:00
Shane Freeder
828dea48de NOT FINISHED! Fixed a few decomp issues 2018-07-17 16:14:23 +01:00
Minecrell
2db50592b9 Use asynchronous Log4j 2 loggers 2018-07-17 16:44:32 +02:00
Minecrell
9cfd6ff449 Update TerminalConsoleAppender to 1.1.0
Fixes a race condition when using TerminalConsoleAppender that may
result in IllegalStateExceptions or duplicate input prompts.
2018-07-17 14:48:52 +02:00
Shane Freeder
e7cf7c9168 NOT FINISHED! even more 1.13-pre patches! 2018-07-16 21:08:09 +01:00
Shane Freeder
93a7205ba8 NOT FINISHED!!! More progress on 1.13-pre7
This work is unfinished, keep your paws off this branch!
2018-07-16 16:34:55 +01:00
Aikar
bac47163e8 Delete some dupe patches (should be fixed going forward) 2018-07-16 00:32:35 -04:00
Aikar
9a22d2fdec Fix placement of chunk tracking - Fixes #1199
Spigot had code that returned early in chunk add/remove methods.

This was causing our code added to set current chunks and counts to
be skipped over if the entity was default not persistent but made persistent.

This was the source of many issues

Fixes #1208
2018-07-15 02:44:37 -04:00
Aikar
6d1a918378 NOT FINISHED!!! Current Progress on 1.13-pre7 update
This work is 100% unfinished. I am pushing it up so that we as a team
can work on this update.

Do not try to use this branch. You will fail.
2018-07-14 21:53:17 -04:00
Aikar
fe9d5b5570 Fix issue with entity activation range check - #1199 2018-07-14 00:12:42 -04:00
Minecrell
695beffc27 Refresh player inventory when cancelling PlayerInteractEntityEvent (#1205)
When interacting with entities with an item, the client will assume
the interaction is successful, and update the held item on the
client. However, if the interaction is cancelled on the server side,
the client will still mistakenly remove/replace the item in hand.

Examples for this are milking cows with a bucket or dyeing sheep.
The bucket is replaced with milk and the dye removed from inventory.

Refresh the player inventory when PlayerInteractEntityEvent is
cancelled to avoid this problem.
2018-07-13 22:52:34 +02:00
Minecrell
021305dc62 Avoid visual issues for adjacent blocks when cancelling PIE (#1198)
The adjacent blocks of doors, double plants, pistons and beds need
to be updated manually from the server when cancelling a block break
from a player, as it otherwise causes the other parts to disappear
on the client.

This is already done for doors but only for the BlockBreakEvent,
not for PlayerInteractEvent. Move the code to a common method
and also handle the other blocks in similar ways.
2018-07-13 09:48:51 +02:00
Minecrell
d4ccc60986 Avoid Netty buffer leak in LegacyPingHandler. Fixes #1200 (#1201)
The extra buffer used to decode the strings sent by the client
in the legacy ping protocol was never released. However, creating
an extra copy of the buffer just to decode it to a string isn't
actually necessary: We can just call toString() directly on the
original buffer.

Additionally, free the buffer in handlerRemoved() to handle cases
where the client never sends enough bytes to form a valid legacy
ping request.
2018-07-13 09:43:56 +02:00
Zach Brown
c89e4105d2 Update upstream B/CB 2018-07-13 02:39:44 -05:00
Aikar
eb1140acce Multitude of changes to attempt to fix #1199 2018-07-12 16:42:56 -04:00
Shane Freeder
7754b35d8f Don't send digged block updates for unloaded chunks 2018-07-12 15:19:33 +01:00