Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 18w50a (451) multiprotocol support #79

Merged
merged 11 commits into from Jan 11, 2019
Merged

Add 18w50a (451) multiprotocol support #79

merged 11 commits into from Jan 11, 2019

Conversation

@iceiix iceiix changed the title Add 18w50a (451) multiprotocol support (https://github.com/iceiix/steven/issues/72) Add 18w50a (451) multiprotocol support Jan 8, 2019
@iceiix
Copy link
Owner Author

iceiix commented Jan 8, 2019

Not too many protocol changes, those documented at least. But with the correct IDs it crashes parsing 0x56 Declare Recipes:

thread '' panicked at 'unrecognized recipe type: blasting', src/protocol/packet.rs:2372:18

There is a new type for https://minecraft.gamepedia.com/Blast_Furnace, and presumably https://minecraft.gamepedia.com/Smoker, need to parse these. No 18w50a or 1.14 on https://github.com/PrismarineJS/minecraft-data/tree/master/data/pc yet so flying blind.

@iceiix
Copy link
Owner Author

iceiix commented Jan 9, 2019

Got past the recipes packet, next is 0x22 chunk data:

thread 'main' panicked at 'Err: IOError(Custom { kind: InvalidData, error: StringError("stream did not contain valid UTF-8") })', src/server/mod.rs:437:33

https://wiki.vg/Pre-release_protocol#Chunk_Data

after primary bitmask, added a new heightmaps NBT field

@iceiix
Copy link
Owner Author

iceiix commented Jan 9, 2019

Chunk data packet parses, but crashes out of bounds:

thread 'main' panicked at 'index out of bounds: the len is 4 but the index is 4', libcore/slice/mod.rs:2448:10
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
             at libstd/panicking.rs:476
   5: std::panicking::continue_panic_fmt
             at libstd/panicking.rs:390
   6: std::panicking::try::do_call
             at libstd/panicking.rs:325
   7: core::ptr::drop_in_place
             at libcore/panicking.rs:77
   8: core::ptr::drop_in_place
             at libcore/panicking.rs:59
   9: <usize as core::slice::SliceIndex<[T]>>::index
             at libcore/slice/mod.rs:2448
  10: core::slice::<impl core::ops::index::Index<I> for [T]>::index
             at libcore/slice/mod.rs:2316
  11: <alloc::vec::Vec<T> as core::ops::index::Index<I>>::index
             at liballoc/vec.rs:1653
  12: steven::types::bit::map::Map::get
             at src/types/bit/map.rs:99
  13: steven::world::World::load_chunk19
             at src/world/mod.rs:889
  14: steven::server::Server::on_chunk_data_heightmap
             at src/server/mod.rs:1126
  15: steven::server::Server::entity_tick
             at src/server/mod.rs:386
  16: steven::server::Server::tick
             at src/server/mod.rs:349
  17: steven::main
             at src/main.rs:277
  18: std::rt::lang_start::{{closure}}
             at libstd/rt.rs:74
  19: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  20: macho_symbol_search
             at libpanic_unwind/lib.rs:102
  21: std::alloc::default_alloc_error_hook
             at libstd/panicking.rs:289
             at libstd/panic.rs:392
             at libstd/rt.rs:58
  22: std::rt::lang_start
             at libstd/rt.rs:74
                for bi in 0 .. 4096 {
                    let id = m.get(bi);

@iceiix
Copy link
Owner Author

iceiix commented Jan 10, 2019

Chunk section format, the data field, also changed: https://wiki.vg/Pre-release_protocol#Chunk_Section_structure - added block count short, removed block/sky light (since it moved to Update Light packet)

@iceiix
Copy link
Owner Author

iceiix commented Jan 10, 2019

screen shot 2019-01-09 at 7 15 30 pm

Now able to connect and see chunks, but since lighting moved to a separate packet and it isn't yet handled, lighting is incorrect. Also seems some missing block assignments:

screen shot 2019-01-09 at 7 15 51 pm

@iceiix
Copy link
Owner Author

iceiix commented Jan 11, 2019

Works well enough for a snapshot, and 19w02a (452) is now out, so merging this for now

@iceiix iceiix merged commit 9adf589 into updates Jan 11, 2019
@iceiix iceiix deleted the 18w50a branch January 11, 2019 01:21
iceiix added a commit that referenced this pull request Jan 11, 2019
Adds support for the 19w02a (451) protocol, yesterday's snapshot.
Builds on #79 18w50a
Closer to https://github.com/iceiix/steven/issues/72 1.14 protocol support
Updates https://github.com/iceiix/steven/issues/18 Enhance protocol support

* Add 19w02a (452) protocol

* Add campfire recipe type

* Add trade list new packet, and window open variants
iceiix added a commit to iceiix/stevenarella that referenced this pull request Feb 1, 2020
Adds support for the 19w02a (451) protocol, yesterday's snapshot.
Builds on iceiix/steven#79 18w50a
Closer to https://github.com/iceiix/steven/issues/72 1.14 protocol support
Updates https://github.com/iceiix/steven/issues/18 Enhance protocol support

* Add 19w02a (452) protocol

* Add campfire recipe type

* Add trade list new packet, and window open variants
iceiix added a commit to iceiix/stevenarella that referenced this pull request Feb 1, 2020
Adds support for the 19w02a (451) protocol, yesterday's snapshot.
Builds on iceiix/steven#79 18w50a
Closer to https://github.com/iceiix/steven/issues/72 1.14 protocol support
Updates https://github.com/iceiix/steven/issues/18 Enhance protocol support

* Add 19w02a (452) protocol

* Add campfire recipe type

* Add trade list new packet, and window open variants
iceiix added a commit to iceiix/stevenarella that referenced this pull request Feb 1, 2020
Adds support for the 19w02a (451) protocol, yesterday's snapshot.
Builds on iceiix/steven#79 18w50a
Closer to https://github.com/iceiix/steven/issues/72 1.14 protocol support
Updates https://github.com/iceiix/steven/issues/18 Enhance protocol support

* Add 19w02a (452) protocol

* Add campfire recipe type

* Add trade list new packet, and window open variants
iceiix added a commit to iceiix/stevenarella that referenced this pull request Feb 2, 2020
Adds support for the 19w02a (451) protocol, yesterday's snapshot.
Builds on iceiix/steven#79 18w50a
Closer to https://github.com/iceiix/steven/issues/72 1.14 protocol support
Updates https://github.com/iceiix/steven/issues/18 Enhance protocol support

* Add 19w02a (452) protocol

* Add campfire recipe type

* Add trade list new packet, and window open variants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant