Commit Graph

39 Commits

Author SHA1 Message Date
iceiix ad8bcf6aba 1.12.2 protocol support (340) (#40)
* Add new 1.12.2 packets and shift IDs

CraftRecipeResponse
AdvancementTab
SelectAdvancementTab
Advancements
CraftingRecipeRequest
UnlockRecipes
CraftingBookData

* Fix unlock recipes packet, add length-prefixed arrays

https://wiki.vg/index.php?title=Protocol&oldid=14204#Unlock_Recipes

* Update resources to 1.12.2

* Handle NBTTag metadata (value 13), parsed as nbt::NamedTag

https://wiki.vg/index.php?title=Entity_metadata&oldid=14048#Entity_Metadata_Format
https://github.com/iceiix/steven/pull/40#issuecomment-443454757

* Fix entity packet IDs, 0x25 now is Entity https://wiki.vg/index.php?title=Protocol&oldid=14204#Entity

* Add NBT long array (type 12) support

https://wiki.vg/NBT#Specification

* Entity metadata type is now a VarInt, not u8: https://wiki.vg/index.php?title=Entity_metadata&oldid=14048#Entity_Metadata_Format

* Keep alives changed to longs, no longer VarInts

https://wiki.vg/index.php?title=Protocol&oldid=14204#Keep_Alive_.28serverbound.29

* Parse CraftRecipeResponse (0x2b)

* Add structs for advancements data

* Implement Serializable trait for Advancement and AdvancementDisplay

* Implement advancement progress parsing; advancement packet works

* Particle packet adds fallingdust (46) with length 1

https://wiki.vg/index.php?title=Protocol&oldid=14204#Particle_2
2018-12-02 19:37:41 -08:00
ice_iix 9504be550f Recognize translate text components, instead of showing "UNHANDLED"
For example, if a server connection times out and you are kicked, Steven
will now show disconnect.reason timeout, versus a non-descriptive
UNHANDLED message. This text is supposed to be looked up in a
translation table for localization, not yet supported, but showing the
translation identifier is more informative than nothing.
2018-12-02 19:25:11 -08:00
ice_iix 901e54772e Use field init shorthand, instead of x:x, just x,
https://rust-lang-nursery.github.io/edition-guide/rust-2018/data-types/field-init-shorthand.html

find src -name '*.rs' -exec perl -pe 's/\b(\w+): \1,/$1,/g' -i {} \;
2018-11-04 13:43:30 -08:00
ice_iix cb9cf3ef70 Update to use crate:: for current crate, for Rust 2018 edition
From `cargo fix --edition`, see https://rust-lang-nursery.github.io/edition-guide/print.html#the-crate-keyword-refers-to-the-current-crate
2018-11-04 12:06:00 -08:00
ice_iix 099e10195b Update try!() to new ? syntax for Rust 2018 edition
Not automatically updated, see https://users.rust-lang.org/t/why-does-cargo-fix-replace-try-with-r-try-instead-of/21972/3
There are other tools to replace it, btu this is what I used:
find src -name '*.rs' -exec perl -MRegexp::Common -0777 -pe'$bp=$RE{balanced}{-parens=>"()"}; s/try\!($bp)/substr($1, 1, length($1) - 2) . "?"/ges' -i {} \;
2018-11-04 11:48:51 -08:00
ice_iix d31a58b3eb Remove anonymous trait parameters, name _ for Rust 2018
https://rust-lang-nursery.github.io/edition-guide/rust-2018/trait-system/no-anon-params.html
2018-11-04 11:48:34 -08:00
iceiix d95b99c175 Support beta Rust release. Closes #8 (#11)
* Remove seemingly unneeded const on MetadataKey<T> new

* Change biome temperature/moisture to integer, x100 to remove floating-point so can use within stable 'const fn'

* Remove unstable const_fn feature, now using stable const fn: see https://www.reddit.com/r/rust/comments/9msqfn/const_fn_soon_on_stable_rust/

* Test on Rust beta (awaiting 1.31 release for stable)

* Update readme for beta Rust support
2018-11-02 16:57:23 -07:00
iceiix 7e5bb999e4 Update to serde_json 1.0 (#6)
* Replace find() with get()

* Update for renamed as_string->as_str and as_boolean->as_bool

https://github.com/serde-rs/json/releases/tag/v0.8.0
Value::as_string() has been renamed to as_str() and Value::as_boolean() has been renamed to as_bool() to improve consistency
https://github.com/serde-rs/json/issues/126

* No serde_json::Value::I64/U64/F64 anymore, only Number

* Update from lookup() to pointer(), using JSON pointer syntax

https://github.com/iceiix/steven/pull/6#issuecomment-432472123

* Remove unused and removed ObjectBuilder import

* Use into_iter().collect() to convert BTreeMap to serde_json::Map

* Change parse_rules to accept serde_json::Map instead of BTreeMap

* Remove unused serde_json macro_use

* Update Cargo.lock
2018-10-23 18:47:21 -07:00
llogiq 0f41b0effe Fixed another batch of clippy warnings
Those are mostly readability-related. Also did a cargo update.
2016-09-15 15:15:52 +01:00
Techcable 49b1ae1dbc Update to minecraft 1.10.2 2016-07-10 12:23:59 +01:00
Thinkofname 862cf97331 Clean up the protocol implementation to use generics instead of trait objects 2016-04-08 18:46:07 +01:00
Thinkofname d0704b2a67 Block entity support, implement signs 2016-04-04 22:08:24 +01:00
Thinkofname 5f6e41f700 Optimize chunk loading 2016-04-04 12:37:21 +01:00
Thinkofname da40508291 Replace usages of x,y,z for block positions with Position 2016-04-03 20:53:40 +01:00
Thinkofname df9db09004 Fix a bit::Map overflow on 32 bit machines 2016-04-02 16:24:50 +01:00
Thinkofname 88c0f3da28 Handle block updates from the server 2016-03-31 15:26:07 +01:00
Thinkofname 3f8bc10bb0 Initial entity work, moved self handling to an entity 2016-03-26 22:21:47 +00:00
Thinkofname 2589b169ca Follow some of clippy's suggestions 2016-03-26 14:24:26 +00:00
Thinkofname f6ac1123a2 Implement stairs 2016-03-26 13:21:19 +00:00
Thinkofname 9a69cd1fa7 Move Direction and BlockVertex into better locations 2016-03-26 11:46:37 +00:00
Thinkofname 780676ec65 Update to 1.9.0 2016-03-25 20:56:45 +00:00
Thinkofname ce6f5c963c Initial block model support 2016-03-24 15:39:57 +00:00
Thinkofname a42c1e412a Implement chunk loading 2016-03-21 14:05:13 +00:00
Thinkofname ddf3a7981c Base implementation for worlds/blocks 2016-03-18 22:24:30 +00:00
Thinkofname eaea15e4a1 Allow searching for entities within the manager 2016-03-18 10:25:09 +00:00
Thinkofdeath 469afb228b Implementation of components for the entity component system 2016-03-17 22:18:25 +00:00
Thinkofdeath 30c7dbeaea Update copyright 2016-03-16 18:25:35 +00:00
Thinkofdeath 75654bbc66 Clean up 2016-03-16 18:01:33 +00:00
Thinkofdeath 35306c62e1 Reformat using rustfmt 2015-10-07 19:36:59 +01:00
Thinkofdeath dc810c15dd Tidy up 2015-09-29 20:09:36 +01:00
Thinkofdeath 70a3683df2 Clean up 2015-09-25 15:20:55 +01:00
Thinkofdeath 12847e9686 Kinda functional server list 2015-09-25 14:00:49 +01:00
Thinkofdeath 1920e9e9e2 Base of server list 2015-09-23 20:16:25 +01:00
Thinkofdeath 63731ca450 Basic logo work 2015-09-21 13:08:06 +01:00
Thinkofdeath 906a44d9d4 Add license 2015-09-17 16:23:07 +01:00
Thinkofdeath b9d7063099 Base of ui complete 2015-09-17 16:04:25 +01:00
Thinkofdeath 2d10d38e4c Complete protocol implementation 2015-09-12 20:31:26 +01:00
Thinkofdeath 25a033268c Tabs to spaces 2015-09-10 11:58:42 +01:00
Thinkofdeath fe6a56ce3a Main part of the protocol complete 2015-09-10 11:49:41 +01:00