1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00
Commit graph

358 commits

Author SHA1 Message Date
dc62ada865 fix clippy warnings 2022-11-10 17:50:41 +00:00
ad8b1b7b24 ignore bad utf8 2022-11-09 18:59:03 +00:00
8de73c336f fix warnings 2022-11-09 17:41:06 +00:00
0675e05e28 don't error on bad entity data packet 2022-11-09 17:34:48 +00:00
350f9f105e don't log light updates 2022-11-08 20:34:39 +00:00
10bdcf3b4d log some more stuff 2022-11-08 20:14:45 +00:00
mat
21898627fd don't panic on kick 2022-11-07 22:06:02 -06:00
mat
d112856ff6
Entity metadata (#37)
* add example generated metadata.rs

* metadata.rs codegen

* add the files

* add comment to top of metadata.rs

* avoid clone

* metadata

* defaults

* defaults

* fix metadata readers and writers

* fix bad bitmasks and ignore some clippy warnings in generated code

* add set_index function to entity metadatas

* applying metadata
2022-11-06 14:05:01 -06:00
0a20160272 change comment to be less than 80 width 2022-11-03 18:00:29 +00:00
mat
aea53cd380 actually fix 2022-10-30 21:44:11 -05:00
mat
261913e606 reply to custom query packet 2022-10-30 21:42:32 -05:00
mat
5ae890f941 replace an expect with unwrap_or_else 2022-10-30 15:42:43 -05:00
mat
329f8b1784 more docs 2022-10-30 15:28:19 -05:00
mat
f0e9a48222 fix error 2022-10-30 13:07:14 -05:00
mat
99d3a5de9d improve docs a little more 2022-10-30 12:58:44 -05:00
mat
f73872c0cc add packet to match lol 2022-10-29 14:36:07 -05:00
mat
65d8fdcb6c oop fix another unwrap 2022-10-29 14:02:57 -05:00
mat
f235c9d064 don't panic if connection closes on join 2022-10-29 13:54:19 -05:00
mat
9de6c03dfb use variables directly in format strings
thanks clippy we love you
2022-10-27 21:22:47 -05:00
mat
7ae8bfab50 fix removed packets still being defined 2022-10-27 20:58:11 -05:00
mat
65da123631
Add Client::set_client_information (#33)
* start adding options

* add default options

* send options packet by default

* mention set_options in Client::join doc

* make TranslatableComponent::read return TextComponent

* change set_options to set_client_information

* clean up some code

* Add `Initialize` event

* fix some clippy warnings

* change `Client::options` to `client_information`
2022-10-23 19:00:24 -05:00
mat
587001724a add # Examples to some docs 2022-10-23 17:01:37 -05:00
mat
c9b1b19ff2 Update examples with new cleaner handle/state 2022-10-23 16:57:28 -05:00
mat
2eade86cf7 make handle cleaner
Arc<Event> -> Event, Arc<Mutex<State>> -> State
Items in State now need to have interior mutability (i.e. Arc<Mutex<T>>), but it's a worthwhile tradeoff since it allows the user to customize it for each field
2022-10-23 16:51:49 -05:00
mat
a9ff79a105 write more documentation 2022-10-23 14:46:06 -05:00
mat
b95e69be8f add function that gets full message content 2022-10-21 21:44:39 -05:00
mat
aa1f2a55e0 work around rustc compilation error 2022-10-21 20:26:49 -05:00
43799946da make Account clonable 2022-10-18 17:01:28 +00:00
Sculas
d4d4ba054f
refactor: remove println statements (#31)
This PR removes all println statements and logs them on trace level instead. Normally, libraries shouldn't print to stdout using println, since there's no control over them.
2022-10-17 13:18:25 -05:00
mat
0f88e05a0c
Add chat function (#28)
* add Client::chat

* make the default bot do chat
2022-10-16 23:08:39 -05:00
mat
4cef62e8e4
Microsoft Authentication (#29)
* a

* try to do more work on auth signing (untested)

* well auth works when i remove the d= so

* auth stuff

* sessionserver stuff

* add auth in azalea-protocol/client

* caching*

refreshing microsoft auth tokens isn't implemented yet, also i haven't tested it

* how did i not notice that i had the code duplicated

* fix cache

* add refreshing msa token

* replace some printlns with log::trace

* auth works!

* Update main.rs

* fix clippy warnings
2022-10-16 22:54:54 -05:00
mat
a348f67b96 fix panic in azalea-chat 2022-10-10 01:04:09 -05:00
mat
4a0d5e7e96 handle SectionBlocksUpdate packet 2022-10-08 01:01:54 -05:00
mat
82c04004db change definition of Event::Tick 2022-10-08 00:03:07 -05:00
mat
6f6289376a fix errors with rewritten packet reading
i forgot i never tested it before LMAO
2022-10-07 23:56:23 -05:00
mat
bc3aa9467a
Replace impl Read with Cursor<&[u8]> (#26)
* Start getting rid of Cursor

* try to make the tests pass and fail

* make the tests pass

* remove unused uses

* fix clippy warnings

* fix potential OOM exploits

* fix OOM in az-nbt

* fix nbt benchmark

* fix a test

* start replacing it with Cursor<Vec<u8>>

* wip

* fix all the issues

* fix all tests

* fix nbt benchmark

* fix warnings
2022-10-07 20:12:36 -05:00
mat
695efef66f remove jumping_once from az-client 2022-10-07 20:09:47 -05:00
mat
ba4cfaafae
Bot API (#27)
Basically make the `azalea` crate have stuff
2022-10-07 19:57:42 -05:00
mat
37f9f1c6fe add jumping 2022-10-02 14:52:48 -05:00
mat
c9b4dccd7e
All block shapes & collisions (#22)
* start adding shapes

* add more collision stuff

* DiscreteCubeMerger

* more mergers

* start adding BitSetDiscreteVoxelShape::join

* i love rust 😃 😃 😃

* r

* IT COMPILES????

* fix warning

* fix error

* fix more clippy issues

* add box_shape

* more shape stuff

* make DiscreteVoxelShape an enum

* Update shape.rs

* also make VoxelShape an enum

* implement BitSet::clear

* add more missing things

* it compiles

W

* start block shape codegen

* optimize shape codegen

* make az-block/blocks.rs look better (broken)

* almost new block macro

* make the codegen not generate 'type'

* try to fix

* work more on the blocks macro

* wait it compiles

* fix clippy issues

* shapes codegen works

* well it's almost working

* simplify some shape codegen

* enum type names are correct

* W it compiles

* cargo check no longer warns

* fix some clippy issues

* start making it so the shape impl is on BlockStates

* insane code

* new impl compiles

* fix wrong find_bits + TESTS PASS!

* add a test for slab collision

* fix clippy issues

* ok rust

* fix error that happens when on stairs

* add test for top slabs

* start adding join_is_not_empty

* add more to join_is_not_empty

* top slabs still don't work!!

* x..=0 doesn't work in rust 😃 😃 😃 😃 😃 😃 😃 😃 😃 😃 😃 😃 😃 😃

* remove comment since i added more useful names

* remove some printlns

* fix walls in some configurations erroring

* fix some warnings

* change comment to \`\`\`ignore instead of \`\`\`no_run

* players are .6 wide not .8

* fix clippy's complaints

* i missed one clippy warning
2022-10-02 12:29:47 -05:00
mat
e63f605c82 add shutdown function 2022-09-19 23:05:05 -05:00
mat
a87c4cf718 Merge branch 'main' of https://github.com/mat-1/azalea 2022-09-19 21:44:15 -05:00
mat
788e9e875a fix rotations 2022-09-19 21:44:13 -05:00
mat
e46577a214
Fix connection writer being locked (#23)
* Split connection struct in az-protocol

* az-client uses split conns

* fix errors

* add a convenience write_packet fn to az-client
2022-09-19 21:21:46 -05:00
14a6f9d9f8 replace printlns with log 2022-09-19 19:53:16 +00:00
ab45bb7825 rename variants in packet enums to be shorter 2022-09-06 18:41:59 +00:00
mat
eb6328ddc6 Update client.rs 2022-09-05 16:25:37 -05:00
mat
9ca9519469 .walk :) 2022-09-05 01:04:16 -05:00
mat
4f00ddace0 remove some debug stuff and fix recipe packet 2022-09-04 23:01:15 -05:00
mat
c1af5d15e3 physics stuff 2022-08-29 21:10:15 -05:00