Commit graph

66 commits

Author SHA1 Message Date
Spottedleaf
e9a408f93f Add mob bucket items to item id to entity map in DataConverter
Mojang missed these in their mapping. Since the entity data
is used when spawning the bucketed mob, we need to have these
inside the id map to ensure that the entity data is converted
correctly if the entity id is missing.
2024-07-28 17:36:53 -07:00
Spottedleaf
f63023a6ac Fix NPE in V3808
The armor items may not exist, so we need to null check it.
2024-06-15 22:57:01 -07:00
Spottedleaf
fddfa624cf Chunk System and Starlight WIP
Chunk system patch was refactored to take advantage of
newer ConcurrentUtil's concurrent long hash table (which
fixes hash collisions caused by chaining fastutil's long hash
and CHM's hash) plus some other minor improvements.

The chunk system was also merged with Starlight, which mostly
provides a small improvement to ThreadedLevelLightEngine#checkBlock
as the scheduling was rewritten.
2024-06-14 17:19:25 -07:00
Spottedleaf
6b1346c1f6 DataConverter 1.21 2024-06-14 10:34:45 -07:00
Jake Potrebic
0ef31547a1 Finish API patches 2024-06-13 08:45:43 -07:00
Jason Penilla
9e0c66cd6c Correctly copy alias requirements in command upgrader
Fixes NPE when converting namespaced commands.

Since the brigadier command api, more aliased commands
(namespaced variants) are registered in the vanilla dispatcher,
which made this issue more apparent.
2024-05-13 15:55:15 -07:00
Spottedleaf
e5d36081c0 Make exception during command conversion non-fatal
Instead of allowing chunks to fail to convert completely,
simply log the exception and the offending command. Command
conversion failure should never result in chunk data deletion,
as commands are not critical chunk data.
2024-05-13 14:40:02 -07:00
Jason Penilla
71de67180a Add conversion for summon command 2024-05-10 12:57:07 +02:00
Spottedleaf
af67859c56 Use MCDataConverter instead of raw convert call for cmd converter
MCDataConverter uses the breakpoint system, which for future
updates may be neccesary (probably not).

Also, add the 1.20.6 version field.
2024-05-10 00:34:37 -07:00
Joseph Burton
67b30c5ed5 Fix DataConverter ConverterParticleToNBT.parseProperties
- The old code was using `StringReader.peek()` in a place where it meant to be `StringReader.skip()`.
- The vanilla code allows a trailing comma, but only if there is no whitespace between it and the closing bracket, which is a bit weird. I think that's a bug and it shouldn't allow trailing commas, but if you disagree then only the first issue needs to be fixed.
2024-05-10 00:31:58 -07:00
Nassim Jahnke
7b2ce17e23 Add missing step in V3818 2024-05-04 22:49:48 +02:00
Joseph Burton
128ea2f10b Fix lodestone compass target conversion 2024-05-04 12:58:06 +02:00
Joseph Burton
4a8b9a03eb Fix can_place_on conversion and size check for item containers 2024-05-02 20:23:15 +02:00
Spottedleaf
a0c2ebbdd4 Update DataConverter to 1.20.6-rc1
Fixes trader llama inventory incorrectly converting
2024-04-27 12:39:35 -07:00
Spottedleaf
4ded614f0b dataconverter 2024-04-24 23:49:13 -07:00
Jake Potrebic
47ee5579ff Begin update to 1.20.5 2024-04-23 10:02:08 -07:00
Jake Potrebic
89528bff42 Update patches to handle vineflower decompiler (#10406)
* Update patches to handle vineflower decompiler

* update patches again to handle inlined simple lambdas

* update vf again and re-apply/rebuild patches

* update patches after removal of verify-merges flag

* fix compile issue

* remove maven local

* fix some issues

* address more issues

* fix collision patch

* use paperweight release

* more fixes

* update fineflower and fix patches again

* add missing comment descriptor

---------

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2024-04-12 12:14:06 -07:00
Nassim Jahnke
d71804b7f8 Finish moving patches back and improving compilable state 2024-01-25 10:54:46 +01:00
Nassim Jahnke
7bd0fbea6c Drop old packs in setResourcePack 2023-12-06 20:46:49 +01:00
Nassim Jahnke
42a06e89bb It compiles 2023-12-06 20:40:37 +01:00
Nassim Jahnke
0e154a1701 More work 2023-12-05 20:12:12 +01:00
Nassim Jahnke
46f4547805 Prepare for 1.20.3 dev 2023-12-05 18:20:55 +01:00
Nassim Jahnke
5944323d84 Fix item effects conversion if no tag is present
Fixes #9796
2023-10-05 16:03:26 +10:00
Shane Freeder
3ebe415f47 Fix/update wiki (#9758) 2023-09-25 00:02:46 +01:00
Noah van der Aa
233b5b5bec more more work 2023-09-21 21:54:46 +02:00
Noah van der Aa
524eeedaa8 So it begins... 2023-09-21 19:18:04 +02:00
Joe
68b63a9341 Copy NBT in legacy dragon fight converter 2023-09-06 18:33:31 -07:00
Joe
14f834f0a5 Copy NBT in upgrade data neighbor ticks 2023-09-06 18:30:02 -07:00
Spottedleaf
3cfd74da9e Fix IntegerUtil#getDivisorNumbers
Use unsigned mod operation for initialization of anc

Also includes
- 5a0cefb45e
- acc8ed9634
2023-06-16 09:05:36 -07:00
Noah van der Aa
0ec23e4426 1.20: Fix a bunch of compile issues (#9273) 2023-06-08 01:21:20 +02:00
Nassim Jahnke
890a93c65e Let's hope this is fine 2023-06-07 20:03:53 +02:00
Nassim Jahnke
1bda3d4d2a Start working on 1.20 2023-06-07 18:24:39 +02:00
Jake Potrebic
a05865b56b Fix structure loading 2023-03-15 18:57:29 -07:00
Nassim Jahnke
8ff5a4a679 Update DataConverter 2023-03-15 20:17:42 +01:00
Jake Potrebic
8b4edb6f19 fix more compile errors 2023-03-14 16:10:18 -07:00
Nassim Jahnke
92dd8645a8 More more patches 2023-03-14 19:36:39 +01:00
Nassim Jahnke
15ade6f446 More patches 2023-03-14 19:05:23 +01:00
Nassim Jahnke
08ab8edb76 Start working on 1.19.4 2023-03-14 18:11:24 +01:00
Nassim Jahnke
be2259ea83 Fix MCVersions 2022-12-07 23:29:30 +01:00
Nassim Jahnke
ee75b5dc2d Patching patches 2022-12-07 19:32:25 +01:00
Nassim Jahnke
b7dd55ce72 API patches 2022-12-07 17:46:46 +01:00
Spottedleaf
0f1a8717e8 Rewrite chunk system (#8177)
Patch documentation to come

Issues with the old system that are fixed now:
- World generation does not scale with cpu cores effectively.
- Relies on the main thread for scheduling and maintaining chunk state, dropping chunk load/generate rates at lower tps.
- Unreliable prioritisation of chunk gen/load calls that block the main thread.
- Shutdown logic is utterly unreliable, as it has to wait for all chunks to unload - is it guaranteed that the chunk system is in a state on shutdown that it can reliably do this? Watchdog shutdown also typically failed due to thread checks, which is now resolved.
- Saving of data is not unified (i.e can save chunk data without saving entity data, poses problems for desync if shutdown is really abnormal.
- Entities are not loaded with chunks. This caused quite a bit of headache for Chunk#getEntities API, but now the new chunk system loads entities with chunks so that they are ready whenever the chunk loads in. Effectively brings the behavior back to 1.16 era, but still storing entities in their own separate regionfiles.

The above list is not complete. The patch documentation will complete it.

New chunk system hard relies on starlight and dataconverter, and most importantly the new concurrent utilities in ConcurrentUtil.

Some of the old async chunk i/o interface (i.e the old file io thread reroutes _some_ calls to the new file io thread) is kept for plugin compat reasons. It will be removed in the next major version of minecraft.

The old legacy chunk system patches have been moved to the removed folder in case we need them again.
2022-09-26 01:02:51 -07:00
Nassim Jahnke
9364ea991a Compile fixes 2022-07-28 00:04:27 +02:00
Nassim Jahnke
ca9ce05bb0 More more more more work 2022-07-27 23:19:52 +02:00
Nassim Jahnke
858aabab7c Move patches over, start with first few 2022-07-27 20:52:03 +02:00
Spottedleaf
91cf4f0392 Correct dataconverter diff
Missed renames + game event listener walker stuff
2022-06-10 20:54:05 -07:00
Nassim Jahnke
3cd8d0c681 More compilation error fixes 2022-06-08 16:24:55 +02:00
MiniDigger | Martin
80c50e91d4 Add missing DataConverter and fix some imports
not fully sure those imports (or well, those classes being outside of the mc package) are right, but who cares 🤷
2022-06-08 14:01:30 +02:00
Nassim Jahnke
7feebbe413 Things, and DataConverter (maybe) 2022-06-08 13:12:14 +02:00
Nassim Jahnke
1148687a8d Prepare for 1.19 dev 2022-06-07 18:52:56 +02:00