Commit graph

153 commits

Author SHA1 Message Date
BruceChen
41a701b6b2 Fix RegistryData parsing and KnownDataPacks negotiation for 1.20.6
Two critical issues in the 1.20.6 configuration phase that could cause
connection instability and packet desync:

1. RegistryData: The handler used an early `break` when it encountered
   a registryId other than "minecraft:dimension_type" or
   "minecraft:chat_type". This skipped reading the remaining entries
   for that registry, leaving unconsumed data in the packet buffer.
   Subsequent packet reads would start at the wrong offset, causing
   cascading parse failures and eventual disconnection.

   Fix: Always read all entries (entryId + hasData + optional NBT)
   for every registry, regardless of whether we process it. For
   dimension_type entries, if the server sends inline NBT data (i.e.
   non-vanilla dimensions from mods/datapacks), parse and store
   the dimension directly via World.StoreOneDimension(). Only fall
   back to hardcoded defaults when no dimension data was received.

2. KnownDataPacks: The client echoed back ALL packs the server
   listed, including non-vanilla ones. This told the server "I have
   these packs cached" when the client actually did not, so the
   server would skip sending full registry data for those packs.
   The result: incomplete registries for modded/datapack content.

   Fix: Filter the response to only include packs with the
   "minecraft" namespace. Non-vanilla packs are omitted, forcing
   the server to send their full registry data inline.

Also adds supporting methods to World.cs:
- SetDimensionIdMap(): Store VarInt ID -> dimension name mapping
  from RegistryData entries (needed by JoinGame/Respawn)
- GetDimensionNameById(): Look up dimension name by numeric ID
- HasAnyDimension(): Check if any dimensions were loaded from
  server-provided data

Made-with: Cursor
2026-03-19 00:13:22 +08:00
breadbyte
494be0930b
Merge branch 'master' into 1.20.6 2025-12-02 00:06:16 +08:00
Anon
2409de2a2f
Fix prevent AntiCheat Block Breaking (In Scripts)
Fix prevent AntiCheat Block Breaking (In Scripts)
2024-12-25 16:56:07 +01:00
Anon
f83e7c5707 Preliminary 1.21 Support 2024-12-06 16:45:48 +01:00
vinicius
d0c9695a79 Fixed bug in SetDimension method of World class, where it would crash if joining a paper server. Added error handling. 2024-12-05 02:13:21 +00:00
Anon
5a6fd577e5 Inventory, Terrain and Entity handling 2024-07-02 11:08:46 +02:00
Anon
67e36a92d2 First working version, not fully tested 2024-06-30 11:26:41 +02:00
Anon
08c5c15557 1.20.6 - Not working yet 2024-06-16 01:19:09 +02:00
Roman Danilov
df9443381b Done auxiliary methods for Direction 2024-03-05 21:49:29 +05:00
Roman Danilov
91ef890bb6 Auxiliary class for Direction, preparation for autodetection of the broken side of the block 2024-03-05 20:30:58 +05:00
ReinforceZwei
4546e6946e 1.20.4: Update entity, item and block palette 2024-02-11 18:13:48 +08:00
Anon
790e0bfe55 Implemented 1.20.3 2024-01-30 12:51:47 +01:00
Anon
4f957cee7e 1.20.2 Implementation, not tested 2023-11-15 15:42:27 +01:00
Spongecade
c3fa413b4e
[skip ci] Update Minecraft wiki links to new domain (#2593) 2023-10-07 17:59:08 +08:00
Anon
272900d52e Added slab handling for 1.20/.1
Added Farm bot crops handling for 1.20/.1
Added utilities for Containers/Inventories
Added bot movement lock to prevent multiple bots that use movements from running at the same time.
General code improvements.
2023-06-23 16:25:18 +02:00
Anon
ae7ce35cc8 Fully Implemented 1.20 2023-06-08 19:27:28 +02:00
Anon
64eb48f46d Removed 1.13, because it's not possible to walk under slabs 2023-05-20 13:28:24 +02:00
Anon
852be6e90d Fixed 1.19.3 2023-05-20 13:11:37 +02:00
Anon
97af063d79 Removed a comment 2023-05-16 23:25:29 +02:00
Anon
c7597e8822 Added slab handling 1.13-1.19.4 2023-05-16 23:19:31 +02:00
Anon
0b98628572 Added 1.8 entity handling 2023-03-28 13:39:18 +02:00
ReinforceZwei
21cd24e056 Implement 1.8 Entity MetaData 2023-03-27 18:22:50 +08:00
ReinforceZwei
750295b1e3 Clean up entity metadata palette 2023-03-24 20:51:10 +08:00
ReinforceZwei
f4ad24746c Wire up entity metadata palette 2023-03-24 19:46:25 +08:00
Anon
1a22002bde Fixed entity metadata, fixed a crash with Hurt Data packet, fixed a crash when someone flew by with elyra, added Entity Metadata Palettes (not used yet, requires further work) 2023-03-23 23:41:41 +01:00
Anon
2e55a6bc85 Added palettes 2023-03-21 23:31:10 +01:00
BruceChen
957054eb12 1.19.3 entity & inventory & terrain support 2023-01-14 22:18:05 +08:00
BruceChen
ced65122f1 Trim 2023-01-14 21:07:09 +08:00
BruceChen
ba0d9ba3fc merge brigadier-dev into milutinke:1.19.3 2023-01-14 20:42:15 +08:00
Milutinke
bb160d6d84 Server Data and Profileless Chat message packets implemented. ChatPreview packet removed. Message Header packet set only to 1.19.2. Chat Message packet partially implemented. 2022-12-21 12:51:27 +01:00
Tasuku Bobcorn
1a47eddb8f
Fixed entity yaw and pitch
Fixed number value type during calculation of entity yaw & pitch
2022-12-15 17:47:46 +08:00
BruceChen
5e11ed3896 Tooltip support & Bug fix 2022-12-11 13:00:19 +08:00
BruceChen
892999ac98 Merge into master 2022-12-06 20:32:46 +08:00
BruceChen
84cf749344 Implement command completion suggestions. 2022-12-06 15:50:17 +08:00
BruceChen
ef39e8329c [SKIP_BUILD] Change file encoding to UTF-8 with BOM 2022-11-28 13:55:05 +08:00
BruceChen
077e3a5e9f
Crowdin localization support (#2310)
* Switching to use resource files

* Update Crowdin configuration file

* Code cleanup
2022-10-28 11:13:20 +08:00
Milutinke
80e227c3a7 Added Player Killed event (Combat and CombatDeath packets). 2022-10-26 20:53:09 +02:00
Anon
0e7423d1d9
Implemented climbing up/down
Implemented climbing up/down
2022-10-19 11:18:18 +00:00
Milutinke
730990cee5 Switched to a faster implementation of FindBlock proposed by Daenges, tested on Farmer Bot.
Tweaked the amount of bone mealing in the Farmer Bot.
2022-10-18 22:39:48 +02:00
Milutinke
616591ef35 Implemented climbing up/down for ladders, vines, twisting vines and weeping vines. 2022-10-18 17:15:26 +02:00
BruceChen
117a38b5f9 Better translation 2022-10-17 20:00:33 +08:00
BruceChen
e5c713192e Update translation file 2022-10-06 22:14:15 +08:00
BruceChen
bdcc22b465 Add update detection 2022-10-06 14:53:05 +08:00
BruceChen
16c1d1fd77 Refactoring Settings.cs 2022-10-05 15:02:30 +08:00
BruceChen
53898f3446 Fix xxx.Parse 2022-10-04 11:53:07 +08:00
BruceChen
1d52d1eadd
Fix all warnings & Trim (#2226)
* Fix AutoFishing crash
* Fix all warnings
* Remove DotNetZip.
* Fix the usage of HttpClient.
2022-10-02 18:31:08 +08:00
BruceChen
4aa6c1c99f
Upgrade GetLookingBlock 2022-10-02 13:49:36 +08:00
BruceChen
993771dc5d Merge from master 2022-09-30 08:44:11 +08:00
BruceChen
e01eab28a2 Add Location.Parse 2022-09-29 22:49:07 +08:00
Milutinke
cd3adfa14c Changed the bed command to be able to sleep. Added relative coordinates to /dig command. 2022-09-28 22:43:14 +02:00