Commit graph

239 commits

Author SHA1 Message Date
Ryan 886d036b97 Use valence.rs domain in extractor package 2022-10-06 13:49:30 -07:00
Ryan 1fcc5bd527 Set player head yaw when spawning 2022-10-05 15:02:40 -07:00
EmperialDev 1f996f7549
Add Items (#92)
Adding all the items, just like the blocks are. This will adress 1. and 2. bullet from issue #53
This will also make it easier to convert between block <-> item.
2022-10-05 09:28:08 -07:00
Ryan e985bae469 Use StatusCode in auth server response check 2022-10-04 23:35:34 -07:00
Ryan b330f97642 Remove top level object from enchantments 2022-10-04 23:16:48 -07:00
Ryan Johnson 85cc3a28ea
Add --workspace flag to commands in CI (#101) 2022-10-04 02:12:32 -07:00
Terminator b83b9f76ed
Expose enchantments to Rust (#99)
* Expose extracted enchantments to Rust.

* Give enchantments a `level: i16` field.

* Update enchantment derive impls

* Restructure how enchants are exposed to Rust through C-like enums

* Update build/enchant.rs

Co-authored-by: Ryan Johnson <ryanj00a@gmail.com>

* Update build/enchant.rs

Co-authored-by: Ryan Johnson <ryanj00a@gmail.com>

* Move enchantment sources to their own struct.

* make id() function return it's discriminant instead of matching

Co-authored-by: Ryan Johnson <ryanj00a@gmail.com>
2022-10-03 13:19:42 -07:00
Ryan cf5b9136df Bump valence_nbt version in valence 2022-10-01 15:47:59 -07:00
Ryan f94c50bfd3 Change valence_nbt repository link 2022-10-01 15:38:14 -07:00
Ryan Johnson 2cd8bd2195
Replace HashMap with BTreeMap in valence_nbt (#98)
* Replace HashMap with BTreeMap in valence_nbt

Turns out that `BTreeMap`s are a bit faster when the element count is low.

This change also makes debugging compounds a bit easier since the elements are displayed in sorted order.

* Simplify read_list function slightly
2022-10-01 15:36:04 -07:00
Ryan Johnson 9c62bc1b90
Move valence_nbt to main Valence repo. (#97)
This also adds another check in CI
2022-10-01 14:18:42 -07:00
Terminator ef64296159
Implement prevent-proxy-connections
This adds the `prevent-proxy-connections` server property and implements it into valence.

Note that if the server is in offline mode, this changes nothing.

By default, proxy connections are allowed.

Fixes #95
2022-10-01 10:42:43 -07:00
Terminator 838a75d2f9
Add basic enchantment extraction (#93)
* Add basic enchantment extraction

* Change source format to individual fields rather than a list

Co-authored-by: Terminator <terminator@nonexistent.com>
2022-09-29 12:34:44 -07:00
Ryan Johnson 94cfc41486 Fix formatting 2022-09-28 00:23:14 -07:00
Ryan Johnson 77df8b668d Fix nightly clippy lints in build/entity.rs 2022-09-28 00:17:43 -07:00
Carson McManus 46b62f29a8
add readme for extractor (#90) 2022-09-27 16:22:28 -07:00
Carson McManus dfce70ef5c
check gradlew for the extractor into git (#88)
This is how it's intended to be used. See https://stackoverflow.com/questions/20348451/why-should-the-gradle-wrapper-be-committed-to-vcs
2022-09-27 13:06:34 -07:00
Ryan Johnson a623c9b1f0 fix formatting 2022-09-26 22:32:04 -07:00
Ryan Johnson ca89140ebe rustdoc checks to github actions 2022-09-26 22:30:42 -07:00
Ryan Johnson 25e99a4133 Fix SetTitleAnimationTimes doc link 2022-09-26 21:08:37 -07:00
Ryan Johnson 82152c5e5d More docs on protocol module 2022-09-26 21:08:17 -07:00
Carson McManus 47538ea05c
Refactor Slot (#87)
* create ItemStack type

* move slot back into protocol

* change DropItemStack to use ItemStack, because it's imposible to drop nothing
2022-09-26 20:44:06 -07:00
emortal 2044add969
Create parkour.rs example (#28) 2022-09-24 19:40:10 -07:00
Ryan 1dc5d84ba9 Add biomes example (which is currently broken due to bugs in chunk module) 2022-09-23 19:10:11 -07:00
Ryan 28b26b2aae Reorganize registry codec stuff and fix some bugs 2022-09-23 04:51:26 -07:00
Ryan Johnson 36b63e777e
Replace serde_nbt with valence_nbt (#80)
valence_nbt has a much nicer API and avoids the complications brought by integrating with serde. valence_nbt also fixes some bugs and is 3x faster according to benchmarks.
2022-09-23 04:03:21 -07:00
Ryan cc9cd0be2d Use exact versions of dependencies in Cargo.toml 2022-09-22 17:00:02 -07:00
dani162 eed39364df
Set time of day #55 (#76)
* Set time of day #55

* fix typo

* Update src/client.rs

Co-authored-by: Ryan Johnson <ryanj00a@gmail.com>

* format file

Co-authored-by: Ryan Johnson <ryanj00a@gmail.com>
2022-09-21 15:12:31 -07:00
dani162 77ad1dfdd1
Listen on any network interfaces #77 (#79) 2022-09-21 15:11:45 -07:00
Ryan 00668839bd Wrong person lmao 2022-09-19 21:17:00 -07:00
Ryan 7f22e709cb Add GitHub sponsors 2022-09-19 21:08:14 -07:00
Ryan b13fe32f76 Only set center chunk when crossing chunk borders, not sections 2022-09-19 21:03:39 -07:00
Tim Satke d9b7008827
Add methods to Config to use a custom session server (#72)
* Add methods to Config to use a custom session server

Added new methods to the Config trait, that enables
implementors to use a custom session server host
or even a fully custom URL.

* Fix error in documentation

* Make format_session_server_url return a String
2022-09-19 20:23:39 -07:00
Ryan d25f3674fb Acknowledge only the latest dug block sequence 2022-09-19 19:19:20 -07:00
Carson McManus 4574e18d49
inventory client events (#66)
* finish packet definition for ClickContainer

* add CloseScreen client event

* add DropItem client event

* add SetSlotCreative client event

* implement ClientEvent::CloseScreen

* ClientEvent::DropItem

* implement ClientEvent::SetSlotCreative

* cargo fmt

* add inventory_piano example to demo inventory slot click events

* lints

* implement ClickContainer event

* inventory_piano: deduplicate note playing logic

* add DropItemStack client event

* implement ClientEvent::DropItemStack

* adjust logging

* tweak inventory_piano example, send text to chat instead of stdout

* fix lint

* move Slot outside of protocol module

* avoid cloning slot in ClickContainer packet handler

* fix inventory_piano example
2022-09-19 11:29:41 -07:00
Ryan 2f2bc91535 Fix error in docs 2022-09-18 18:38:12 -07:00
Ryan Johnson 70ef63aae3
Fail checks when warnings occur 2022-09-17 23:56:40 -07:00
Ryan d459df8b2c Fix formatting 2022-09-17 23:37:11 -07:00
Ryan cab1337716 Add Giant to entity_raycast example 2022-09-17 23:30:54 -07:00
Ryan 5bdac7fbb0 Remove unnecessary prefix from Poses 2022-09-17 23:25:07 -07:00
Ryan Johnson 9ec1df1978
Entity Hitbox Improvements (#70)
Solves #45. With help from @guac420
2022-09-17 23:14:48 -07:00
Ryan dcd4a2b5ed Update resource pack link and add SHA-1 hash 2022-09-17 19:40:26 -07:00
James P e6f01e5e4d
Custom resource packs (#68)
Implements custom resource pack support.

Adds a `Client` method to set resource pack, and a `ClientEvent` for listening to resource pack status updates from clients.
2022-09-17 19:32:40 -07:00
Ryan 02b4b49c10 Remove packets.json notice 2022-09-16 22:48:22 -07:00
EmperialDev 419d317736
Migrating the packets to wiki.vg (#62)
Addresses #56. Migrating all the packet names to wiki.vg's instead of fabric's.
2022-09-16 21:29:48 -07:00
Ryan Johnson 0a75f103aa
Packet filtering (#67)
* Add `PacketName`

* Fix inefficiency in codec.rs

* Add regex argument to packet_inspector

* Reorder imports

* Make the regex arg optional

* Update README
2022-09-16 05:31:37 -07:00
Carson McManus 7c23d7a086
add docs for packet inspector: quick start w/ vanilla server in docker (#63) 2022-09-15 18:59:43 -07:00
Ryan Johnson 7cd3b6cd2d
Add inventory packets (#57)
Adds the inventory packets so we can use them with `packet_inspector`.
2022-09-14 14:18:04 -07:00
Ryan Johnson c73df2c09a
Update rust.yml 2022-09-14 05:23:08 -07:00
Carson McManus f165b55c7b
add building example (#49)
This adds a new example to demonstrate how to implement block breaking/placing.
2022-09-13 18:30:45 -07:00