Commit graph

341 commits

Author SHA1 Message Date
Ubuntu
430501f6e1 (cargo-release) version 0.2.0 2022-10-17 16:28:51 +00:00
Ubuntu
2b5d972ae9 disable release on more things 2022-10-17 16:27:42 +00:00
Ubuntu
90e33c7e87 temporarily exclude azalea & az-client again 2022-10-17 14:40:00 +00:00
Ubuntu
8c01957458 disable bot release 2022-10-17 14:38:58 +00:00
Ubuntu
3f7fb41255 change versions and stuff 2022-10-17 14:37:05 +00:00
Ubuntu
46cd093ead bump az-client to 0.2 2022-10-17 14:26:34 +00:00
Ubuntu
5c18a48976 add description and license in az-client 2022-10-17 14:22:24 +00:00
Ubuntu
c7b65b6ec8 set versions in az-client 2022-10-17 14:19:19 +00: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
Ubuntu
14a6f9d9f8 replace printlns with log 2022-09-19 19:53:16 +00:00
Ubuntu
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
99fcad7bc4 fix chunks not being able to be read 2022-09-04 21:24:10 -05:00
mat
c1af5d15e3 physics stuff 2022-08-29 21:10:15 -05:00
mat
f42d630544
Physics (#11)
* Put physics module in azalea-entity

* port aabb

* add more stuff to PositionXYZ

* azalea-physics

* important collision things

* more physics stuff

* backup because i'm about to delete shapes

* more shape stuff

* CubeVoxelShape

* no compile errors???

insane

* impl VoxelShape for ArrayVoxelShape

* Shapes stuff

* collide_x but it doesn't work yet

* binary_search

* it compiles

* Entity has bounding box

* Update discrete_voxel_shape.rs

* Entity::make_bounding_box

* ok i'm about to merge az-entity and az-world

might be a terrible idea which is why i'm committing first

* ok so i moved entity to world

* on_pos and move_entity compiles

* add send_position

* move collision stuff to collision module in az-physics

* dimension is no longer an Option

* start trying to do collision for the client

* collision works 🎉

* start adding palette resizing

* get_and_set (pain)

* it compiles but probably won't work

* add a test

* remove printlns

* add more tests for palette stuff

* ClientboundMoveVec3Packet -> ClientboundMoveEntityPosPacket

i think i changed this on accident once

* palette resizing works

todo: remove the printlns

* Remove printlns in palette.rs

* fix issues from merge

* fixes + work a bit more on physics

* Better entities (#19)

* well it compiles

* add tests to entity storage

* add suggestions in azalea-brigadier

* this probably causes ub

* fix brigadiersuggestions

* get rid of entityid

* test From<EntityMut> for EntityRef

* don't mention other libraries since there's too many

* fix warnings

* do todos in brigadier suggestions

* work on physics

* more physics stuff

* remove trait feature on az-block

i think rust gets confused and compiles the macro without the feature

* bump ahash

* aes tests in az-crypto

* optimize aes's deps

* fix crashes

* fix section_index for negative numbers and test

* fix BlockPos protocol implementation

* remove some debug prints

* prepare to add ai_step

* make ai step work

* clippy
2022-08-29 20:41:01 -05:00
mat
dbb2092ac0
Implement ALL packets (#16)
* add a couple more packets and improve codegen

* enums in packet codegen

* fix enums and MORE PACKETS

* make unsigned numbers the default

* codegen can make hashmaps

* UnsizedByteArray in codegen

* Vec and Option

* enum codgen works in more situations

* ServerboundInteractPacket

* Fix error with new error system

* More packets

* more packets

* more packets

* guess what was added

* yeah it's more packets

* add more packets

* packets

* start adding ClientboundBossEventPacket

* finish boss event packet

* improve codegen for linux

* start on command suggestions packet

* rename declare_commands to commands

* más paquetes

* fix generating custom payload packet

* more packets

* mehr Pakete

* improve codegen for movement packets

* rename move packets to have "packet" at the end

* fix some unused variable warns

* addere plus facis

* pli da pakoj

* plus de paquets

* più pacchetti

* make ChatFormatting a macro in azalea-chat

* change a match to matches! macro

* update SetPlayerTeam to use ChatFormatting

* ClientboundSetScorePacket & fix clippy warnings

* finish game state 🎉

* add remaining packets for other states

* fix error in ping.rs
2022-08-20 15:17:07 -05:00
mat
5a9fca0ca9
Better errors (#14)
* make reading use thiserror

* finish implementing all the error things

* clippy warnings related to ok_or

* fix some errors in other places

* thiserror in more places

* don't use closures in a couple places

* errors in writing packet

* rip backtraces

* change some BufReadError::Custom to UnexpectedEnumVariant

* Errors say what packet is bad

* error on leftover data and fix

it wasn't reading the properties for gameprofile
2022-08-06 02:22:19 -05:00
mat
0c2ce00bae make Connection a single struct with generics
This isn't that good of a solution but I couldn't come up with a better one and this was pretty simple to implement
2022-07-29 16:29:06 -05:00
mat
f22a386c78 fix errors in az-client 2022-07-29 15:38:33 -05:00
mat
1b602d0be7 fix errors and warnings 2022-07-29 15:32:04 -05:00
mat
5e3a6066f8 Fix error 2022-07-07 01:17:20 -05:00
mat
31e5629ce1
Merge branch 'main' into 1.19.1 2022-07-07 05:58:44 +00:00
mat
017651358d It compiles 2022-07-06 19:15:33 -05:00
mat
e8deda5d2e clippo 2022-06-25 17:37:29 -05:00
mat
978880b756 Fix warnings 2022-06-25 16:40:12 -05:00
mat
460bdfb8bb merge ClientState and Client 2022-06-25 16:23:40 -05:00
mat
77980f0018 rename World to dimension
A world is a collection of dimensions
2022-06-25 14:24:56 -05:00
mat
a0b3b793f9 ClientboundUpdateMobEffectPacket 2022-06-25 00:01:54 -05:00
mat
41f61bf9c1 i hate mutexes 2022-06-24 23:54:31 -05:00
mat
b030b0ea33 start adding moving 2022-06-24 23:10:59 -05:00
mat
ce834aeca5 Fixes 2022-06-23 23:45:23 -05:00
mat
2cdbdcaa27 move_entity_with_delta 2022-06-23 21:31:19 -05:00
mat
37c6618c16 Fix everything so azalea-buf works 2022-06-23 19:17:04 -05:00
mat
5ca49e680e azalea-buf 2022-06-23 15:12:17 -05:00
mat
c7b0c51274 Add move_to 2022-06-21 23:19:31 -05:00
mat
efd8749573 add gametick event and find_one_entity 2022-06-20 01:19:59 -05:00
mat
438d633b83 Bump tokio 2022-06-19 22:12:19 -05:00
mat
c9a070f711 Fix some clippy warnings 2022-06-19 22:01:54 -05:00
mat
bb6b116cb8 Improvements to azalea-world for entities 2022-06-19 00:30:24 -05:00
mat
fc3151f89d account.rs and client.rs 2022-06-18 16:54:49 -05:00
mat
d8e0457b62 from<ClientboundAddEntityPacket> for Entity 2022-06-18 14:08:34 -05:00
mat
614b211298 EntityStorage 2022-06-17 23:55:11 -05:00
mat
f993e79a7e Create azalea-entity 2022-06-17 20:46:16 -05:00
mat
0a945e73ec EntityPos 2022-06-17 18:09:34 -05:00
mat
d27d283686 Update ClientboundSoundPacket to 1.19 2022-06-17 16:34:34 -05:00
mat
0c0fec0065 fix some packets 2022-05-26 19:12:19 -05:00
mat
0530c57579 Fixes 2022-05-26 17:55:07 -05:00
mat
1e145a82b8 1.19 2022-05-26 13:45:48 -05:00
mat
c16e958d0b ClientboundLevelParticlesPacket works 2022-05-14 20:43:25 -05:00
mat
3f77390e26 ClientboundGameEventPacket 2022-05-14 19:40:00 -05:00
mat
2eaccf03eb actually do ClientboundSectionBlocksUpdatePacket 2022-05-14 19:31:34 -05:00
mat
42f86f73f2 add unhandled ClientboundSectionBlocksUpdatePacket 2022-05-14 19:14:34 -05:00
mat
e58c9390a7 get_block_state works 2022-05-14 15:02:13 -05:00
mat
345cecf7af add more stuff 2022-05-08 23:45:15 -05:00
mat
ac392542ce Merge branch 'main' into chunk-decoding 2022-05-08 18:55:49 -05:00
mat
d783a0295b animate packet 2022-05-08 18:44:40 -05:00
mat
7c742347a7 azalea-chat now checks language files 2022-05-08 18:38:22 -05:00
mat
a9a8834b3a fix 2022-05-07 22:05:12 -05:00
mat
a60c1ac05b block update packet 2022-05-07 22:03:49 -05:00
mat
ff79c1838a level event packet 2022-05-07 21:58:10 -05:00
mat
ffba101854 chat and sound packets 2022-05-07 21:54:27 -05:00
mat
f62a681474 remove entities packet 2022-05-07 21:44:11 -05:00
mat
98eee6d908 add keepalive packets 2022-05-07 20:41:33 -05:00
mat
49454781cf add move packets 2022-05-07 20:34:53 -05:00
mat
d8049a5d0c move entity and rotate head packets 2022-05-07 20:00:59 -05:00
mat
e53ef8b0dd update advancements packet 2022-05-07 19:46:06 -05:00
mat
0b84e1cbb8 add a couple more packets 2022-05-07 18:47:16 -05:00
mat
1a15d36e6b add health packet 2022-05-07 18:44:00 -05:00
mat
c10b732510 improve data generator and add packet 2022-05-07 18:26:19 -05:00
mat
f0a277788c add set time packet and update readme 2022-05-07 12:22:57 -05:00
mat
b9c31efc01 Initialize worldborder packet
Also add varlong and replace #[varint] with #[var]
2022-05-07 11:58:00 -05:00
mat
79bf577130 clientbound add player packet 2022-05-07 11:22:03 -05:00
mat
c987812927 clippy 2022-05-03 18:20:24 +00:00
mat
477c367fc4 mor echunk stuff 2022-05-03 18:03:10 +00:00
mat
0bd798045c more azalea-world stuff 2022-05-03 00:33:32 -05:00
mat
8e42e1c5df more chunk and readme stuff 2022-05-02 23:07:06 +00:00
mat
bec2da64d8 Merge branch 'main' into chunk-decoding 2022-05-01 23:06:56 -05:00
mat
567c6f4f2c Reduce usage of AsyncRead
We already receive everything from the server when it tells us the length, so we can actually just treat the stream as a Read instead of an AsyncRead.
2022-05-01 21:54:03 -05:00
mat
4d75415130 start adding azalea-world 2022-05-01 18:59:07 -05:00
mat
c2262a2123 clientbound_set_entity_link_packet 2022-05-01 16:30:40 -05:00
mat
388b0fc0f2 ClientboundUpdateAttributesPacket & ClientboundEntityVelocityPacket 2022-05-01 15:19:51 -05:00
mat
1a68d55eaf add IGNORE_ERRORS const 2022-05-01 14:14:51 -05:00
mat
766b290065 Ignore unknown packets 2022-05-01 14:03:15 -05:00
mat
9dacd90abc clientbound_add_entity_packet & clientbound_set_entity_data_packet 2022-05-01 13:51:59 -05:00
mat
4b1cfd1cf8 remove useless match things 2022-05-01 00:32:55 -05:00
mat
42ca37554c actually send the ServerboundCustomPayloadPacket 2022-04-30 23:11:18 -05:00
mat
8313952541 Simplify packet macro
Now every packet implements McBufWritable and McBufReadable and uses those so the code doesn't have to be duplicated.
2022-04-30 23:04:18 -05:00
mat
0dc6decf7f put something useful in state 2022-04-30 22:30:50 -05:00
mat
f2a8e8221d add clientbound_add_entity_packet 2022-04-30 22:13:47 -05:00
mat
80d49a7607 azalea_auth::encryption -> azalea_crypto 2022-04-30 21:30:45 -05:00
mat
cc70d80932 gitignore flamegraph stuff 2022-04-30 17:55:18 -05:00
mat
153b5b45e4 misc fixes 2022-04-30 02:10:21 -05:00
mat
4d7bf6c50e significantly optimize reading Vec<u8>
unfortunately, this introduces the requirement of using rust nightly
2022-04-30 01:43:00 -05:00
mat
c8c356685d background task works! 2022-04-29 23:06:40 -05:00
mat
3bd32cfa00 how do i do this 2022-04-29 00:40:47 -05:00
mat
b6fb96429c chunk packets work 2022-04-28 19:51:31 -05:00
mat
c2a9acc756 add ClientboundSetChunkCacheCenterPacket 2022-04-27 23:43:10 -05:00
mat
9b50886c30 player info packet 2022-04-27 18:00:50 +00:00
mat
60d1fa50c3 add player position packet 2022-04-27 15:09:33 +00:00
mat
4f9f2468f0 add recipe packet 2022-04-26 22:53:47 -05:00
mat
f859dbbba0 update brigadier 2022-04-26 22:15:07 -05:00
mat
9c69d7d5f2 finish update recipes packet implementation 2022-04-26 19:38:07 -05:00
mat
5736a790d3 write some readmes 2022-04-26 15:37:31 +00:00
mat
e5fcfa1193 default implementation for read and write Vec<T> 2022-04-26 15:33:41 +00:00
mat
f4dd3a9293 ENCRYPTION WORKS!!!!!!!!!!! 2022-04-24 22:46:41 -05:00
mat
4c00bd8865 Add ServerboundKeyPacket 2022-04-24 19:28:29 -05:00
mat
3e507f0db4 Merge branch 'main' into auth 2022-04-24 17:37:57 -05:00
mat
b7641ff308 1.18.2 support 2022-04-24 16:18:51 -05:00
mat
248f752748 simplify error handling 2022-04-22 04:33:58 +00:00
mat
c31c6fa7d0 change to not ping 2022-04-22 00:10:24 +00:00
mat
2c848ebaa5 Set carried item and update tags packets 2022-04-21 15:25:46 +00:00
mat
8bd97c6c96 add player abilities packet 2022-04-20 16:28:39 +00:00
mat
c5f10af09d write some readmes 2022-04-20 15:24:25 +00:00
mat
cafa4dd76f Fix declare_state_packets 2022-04-19 21:24:42 -05:00
mat
751098b636 start working on declare commands packet 2022-04-18 22:38:53 -05:00
mat
96eba2b39a difficulty packet 2022-01-03 00:14:41 -06:00
mat
394f996df2 fix random warnings 2022-01-02 17:42:41 -06:00
mat
e81b85dd5b add a couple more packets 2022-01-01 19:44:51 -06:00
mat
9f576c5600 start work on encryption 2022-01-01 18:59:38 -06:00
mat
af28b0e57a reading nbt in the protocol works 2021-12-26 14:15:06 -06:00
mat
55c9f58219 nbt tests 2021-12-19 13:07:54 -06:00
mat
8e3ba097b4 start adding clientbound_login_packet 2021-12-18 10:04:10 -06:00
mat
493aae582a fix packets 2021-12-17 16:38:14 -06:00
mat
c4eecaf13a try to implement compression 2021-12-16 23:33:06 -06:00
mat
9642558f8f azalea 2021-12-15 23:10:55 -06:00