Commit graph

369 commits

Author SHA1 Message Date
Honbra
962b9fcaae
Fix ServerboundContainerClickPacket (#45) 2022-11-27 16:24:31 -06:00
mat
5a8f50950a chore: Release 2022-11-19 15:25:55 -06:00
mat
befa22c1f3
Player List (#41)
* keep track of player list

* send player update events
2022-11-18 22:11:30 -06:00
Honbra
9f78b3f4a7
Military-grade server implementation (#40)
* Military-grade server implementation

* Add doc comments
2022-11-14 13:25:59 -06:00
mat
6eee543a33
Pathfinder (#25)
Pathfinding is very much not done, but it works enough and I want to get this merged.
TODO: fast replanning, goals that aren't a single node, falling moves (it should be able to play the dropper), parkour moves
2022-11-12 23:54:05 -06:00
mat
16d0cb734c change some dependencies 2022-11-11 23:10:38 -06:00
Ubuntu
3530faea4e Merge branch 'main' of https://github.com/mat-1/azalea into main 2022-11-12 02:04:15 +00:00
mat
9e09df1837 make some stuff in azalea-protocol public 2022-11-11 19:24:45 -06:00
mat
1df4f9f477 fix example in azalea_protocol::connect 2022-11-11 19:05:00 -06:00
Ubuntu
4a1ec068fc improved docs 2022-11-11 21:04:18 +00:00
Ubuntu
dc62ada865 fix clippy warnings 2022-11-10 17:50:41 +00:00
mat
1fc42d7566 semicolon lol 2022-11-09 19:14:07 -06:00
mat
f2d21ad813 shut down on broken pipe 2022-11-09 18:18:55 -06:00
Ubuntu
c4843b347d make some fields public in light update packet 2022-11-08 20:45:17 +00: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
mat
329f8b1784 more docs 2022-10-30 15:28:19 -05:00
mat
44ab1ad6ef chore: Release 2022-10-30 14:04:11 -05:00
mat
889f742696 add "repository" field to all crates 2022-10-30 14:03:13 -05:00
mat
99d3a5de9d improve docs a little more 2022-10-30 12:58:44 -05:00
mat
7d140e5f0c ClientboundContainerClosePacket 2022-10-29 14:33:53 -05:00
mat
7c71bdf79a add doc comments to combat packets 2022-10-29 14:14:47 -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
489cdb01aa fix repeated ids in game/mod.rs 2022-10-24 21:25:36 -05:00
mat
3869fd622f write some more docs for az-protocol 2022-10-23 22:59:38 -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
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
Sculas
41606fdd14
fix: make fields in PlayerInfo::Action public (#32)
This PR makes the fields in the PlayerInfo packet public.

I encountered this issue when writing my own bot which needs a list of UUID > String of all currently logged-in players, and while writing my handler for `Action::RemovePlayer` I found out that the `uuid` field is private. This PR fixes that.
2022-10-19 10:42:38 -05:00
Ubuntu
c0338cac35 Create cache file directory if it doesn't exist 2022-10-18 19:31:27 +00:00
Ubuntu
b68bcb44d2 (cargo-release) version 0.2.0 2022-10-17 16:28:54 +00:00
Ubuntu
9c6347473b (cargo-release) version 0.2.0 2022-10-17 16:28:53 +00:00
Ubuntu
69d30378e5 (cargo-release) version 0.2.0 2022-10-17 16:28:53 +00:00
Ubuntu
9a7d2d51b5 (cargo-release) version 0.2.0 2022-10-17 16:28:53 +00:00
Ubuntu
7c71efab4a (cargo-release) version 0.2.0 2022-10-17 16:28:53 +00:00
Ubuntu
4e8bdfe7aa (cargo-release) version 0.2.0 2022-10-17 16:28:52 +00:00
Ubuntu
924a4771d9 (cargo-release) version 0.2.0 2022-10-17 16:28:52 +00:00
Ubuntu
e4a85363b0 (cargo-release) version 0.2.0 2022-10-17 16:28:52 +00:00
Ubuntu
e6f023a38b (cargo-release) version 0.2.0 2022-10-17 16:28:52 +00:00
Ubuntu
4585504323 (cargo-release) version 0.2.0 2022-10-17 16:28:51 +00:00
Ubuntu
430501f6e1 (cargo-release) version 0.2.0 2022-10-17 16:28:51 +00:00
Ubuntu
46fbc4654c (cargo-release) version 0.2.0 2022-10-17 16:28:51 +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
98224cf913 fix clippy warnings 2022-10-15 16:53:34 -05:00
mat
221b33197e fix panic 2022-10-09 23:41:41 -05:00
mat
4a0d5e7e96 handle SectionBlocksUpdate packet 2022-10-08 01:01:54 -05:00
mat
7c955c794a remove a println 2022-10-07 23:57:31 -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
e9d8d0357e fix a test 2022-10-07 20:41:05 -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
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
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
mat
58f8e95fe8 no unused variable 2022-09-11 13:04:26 -05:00
mat
679223f3de only check leftover data in debug mode 2022-09-11 13:03:53 -05:00
mat
5a0045c985 fix ClientboundMapItemDataPacket 2022-09-10 21:44:55 -05:00
mat
c31a1f9434 fix outdated EntityDataValue 2022-09-10 19:46:01 -05:00
mat
749c243fc5 typo fix
ChatVisiblity -> ChatVisibility
2022-09-10 12:03:00 -05:00
mat
dee991a7fc fix errors in enums inconsistent w/ vanilla 2022-09-09 23:46:46 -05:00
mat
3389f19e60 cut off at 500 instead of 100 2022-09-09 22:58:14 -05:00
Ubuntu
2889514307 improve log 2022-09-09 19:42:35 +00:00
Ubuntu
c033587503 add logger 2022-09-09 19:27:59 +00:00
mat
98000f800f why am i getting a varint error 2022-09-07 22:12:16 -05:00
mat
ec316e02cd fix ClientboundUpdateAdvancementsPacket 2022-09-07 21:30:05 -05:00
mat
029fa33f55 fix bad enum macro generation 2022-09-06 23:55:39 -05:00
mat
8fe02ed115 BrigadierNodeStub::name() 2022-09-06 22:24:21 -05:00
Ubuntu
167748c7ed finish read implementation for Commands packet 2022-09-06 20:59:07 +00:00
Ubuntu
ab45bb7825 rename variants in packet enums to be shorter 2022-09-06 18:41:59 +00:00
mat
453cbc83fd add a todo 2022-09-05 11:46:47 -05:00
mat
fcb5bdf042 use az-registry in az-protocol 2022-09-05 11:44:48 -05:00
mat
e9f88ce546 Publish everything* to crates.io
Except azalea-client since it's not ready yet
2022-09-05 10:36:48 -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
Ubuntu
2a775c93fa unused use in test 2022-09-02 17:12:49 +00:00
mat
cfb190d00c
get rid of Readable & Writable (#21) 2022-09-02 12:11:14 -05:00
mat
32458d743f fix bad u32::write_into and add tests 2022-09-01 20:37:38 -05:00
mat
4d072d8057 sample can be empty 2022-09-01 19:26:21 -05:00
mat
d564b4cc4f ping players can be negative 2022-09-01 19:11:24 -05:00
Ubuntu
e0cbf68df1 test gravity 2022-08-31 20:11:34 +00:00
Ubuntu
4678327848 remove some comments in az-protocol::read 2022-08-31 18:52:26 +00:00
Ubuntu
cbc0a13d9b fix a couple more possible panics 2022-08-31 18:50:59 +00:00
Ubuntu
efb1f3f2d5 fix panics 2022-08-31 18:48:51 +00: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
Ubuntu
b9cb596ea7 shut up clippy 2022-08-19 18:06:43 +00:00
mat
a16b9dcd2e add stretch goals to readme and typo fix 2022-08-18 23:28:44 -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
9ef1e8d653 remove unnecessary empty impls 2022-07-30 17:56:36 -05:00
mat
1eef0a537e simplify switching packet states 2022-07-29 17:17:14 -05:00
mat
637e0e0984 remove unused structs 2022-07-29 16:29:57 -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
0f380f1a12 grammar issue 2022-07-29 15:50:11 -05:00
mat
1b602d0be7 fix errors and warnings 2022-07-29 15:32:04 -05:00
mat
4ee4687053 Split clientbound and serverbound packets 2022-07-29 02:59:40 -05:00
mat
2211021105 1.19.1 2022-07-28 23:50:58 -05:00
mat
3aa856b413 fix wrong imports 2022-07-21 21:10:20 -05:00
mat
c0ca03204f 1.19.1-rc2 2022-07-21 20:04:33 -05:00
mat
ec0b6ec06c 1.19.1-pre4 2022-07-10 23:43:09 -05:00
mat
31e5629ce1
Merge branch 'main' into 1.19.1 2022-07-07 05:58:44 +00:00
mat
27edd4f578 Update ServerboundHelloPacket
PR made in burger
2022-07-07 00:57:50 -05:00
mat
017651358d It compiles 2022-07-06 19:15:33 -05:00
mat
2d7056b3d4 Update mod.rs 2022-07-06 19:08:19 -05:00
mat
cb8005be65 Fix the mod.rs 2022-07-06 19:04:38 -05:00
mat
ae3ad007b6 Update packets 2022-07-06 18:55:18 -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
c46eb556e2 Merge branch 'main' into 1.19.1 2022-06-25 14:25:56 -05:00
mat
cd9a05e5a6 read_into -> read_from
yeah
2022-06-25 02:33:28 -05:00
mat
c9faf25fab Fix errors 2022-06-25 00:13:00 -05:00
mat
ca7067e173
Merge branch 'main' into azalea-entity 2022-06-25 05:08:22 +00: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
69c47eda4c Upgrade some crates 2022-06-24 04:08:38 -05:00
mat
3fcbfc794e Upgrade crates and remove num_* deps 2022-06-24 03:50:19 -05:00
mat
1640dfe457 fix EntityDataValue 2022-06-24 00:02:03 -05:00
mat
ce834aeca5 Fixes 2022-06-23 23:45:23 -05:00
mat
e44afb76f4 1.19.1-rc1 2022-06-23 21:34:10 -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
0280fb58e1 add serverbound move packets 2022-06-21 22:10:33 -05:00
mat
deef5d27c0 Update to 1.19.1-pre1 2022-06-21 19:57:18 -05:00
mat
a1484f6629
Merge branch 'main' into 1.19.1 2022-06-20 06:22:16 +00:00
mat
438d633b83 Bump tokio 2022-06-19 22:12:19 -05:00
mat
d674633e85 Merge branch 'main' into azalea-entity 2022-06-19 14:00:51 -05:00
mat
405a00c0d1 Fix ClientboundLevelParticlesPacket
The particle id is a varint
2022-06-19 13:54:43 -05:00
mat
d8e0457b62 from<ClientboundAddEntityPacket> for Entity 2022-06-18 14:08:34 -05:00
mat
e2553bbaf2 Merge branch 'main' into 1.19.1 2022-06-17 18:11:21 -05:00
mat
f414aa4d37
Merge pull request #9 from mat-1/azalea-block
azalea-block
2022-06-17 23:10:54 +00: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
d0fc7d0eff ClientboundSetEquipmentPacket 2022-06-17 16:27:58 -05:00
mat
56f98c1b24 Fix GlobalPos 2022-06-16 21:01:38 -05:00
mat
9c0b6f6631 22w24a & update packets when they're modified 2022-06-16 20:59:19 -05:00
mat
70cc7dfbed get rid of ProfilePublicKey struct 2022-06-08 21:16:32 -05:00
mat
fb1d419a3d 1.19 2022-06-08 18:37:29 -05:00
mat
e9e60eca80 Update README.md 2022-05-27 00:05:14 -05:00
mat
0c0fec0065 fix some packets 2022-05-26 19:12:19 -05:00
mat
7c302b4b29 Change brigadier numbers 2022-05-26 19:01:29 -05:00
mat
51fbbaaf6f Compiles 2022-05-26 17:59:43 -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
35511e83c3 more fix 2022-05-25 20:28:46 -05:00
mat
c16e958d0b ClientboundLevelParticlesPacket works 2022-05-14 20:43:25 -05:00
mat
f0792f25bb add derive McBuf to every packet 2022-05-14 20:03:24 -05:00
mat
93730a550a start adding ClientboundLevelParticlesPacket 2022-05-14 19:55:33 -05:00