Commit graph

176 commits

Author SHA1 Message Date
mat
70e2dfed16 wrap_comments = true 2022-12-08 18:39:35 -06:00
mat
7d901e39bc
1.19.3 (#34)
* start updating to 22w42a

* work a bit more on 22w42a

* player chat packet

* serverbound hello packet

* Update mod.rs

* add more stuff to clientbound player chat packet

* ClientboundPlayerInfoUpdatePacket

* features enabled and container closed

* serverbound chat packets

* make it compile

* 22w43a

* ServerboundChatSessionUpdatePacket

* profile_public_key isn't Option anymore

* Update bitset.rs

* joining a server works

* fix entitydatavalue

* backtraces + fix clientbound chat message

* fix some warnings and add more ecomments

* 22w44a

* generate en_us.json

* add updating guide to codegen/readme

* fix some markdown

* update list of generated things

* metadata stuff

* Replace PJS generator mod with PixLyzer (#38)

* pixlizer extractor

* start working on shape extraction

* fix generating language

* fix pixlyzer shape generation

* use empty_shape

* generate blocks and shapes

* update pixlyzer dir

* Revert "update pixlyzer dir"

This reverts commit ee9a0e7a49.

* fix

* fix

* Revert "fix"

This reverts commit ad12ddcb00.

* fix

* detect pixlyzer fail

* fix pixlyzer

* 22w45a

* gen entities

* add async-trait dep

* update codegen/readme.md

* explain when rust_log should be used

* remove some unused code

* start fixing pixlyzer issues

* fix a thing in codegen

* almost fixed

* more progress towards 1.19.3

* 1.19.3-pre2

* fixes

* revert some hardcoded property names

* Delete clientbound_player_info_packet.rs

* handle 1.19.3 player info packets

* handle playerinforemove

* start updating to 1.19.3-rc1

* optional registries work

* fix some issues with 1.19.3

chat doesn't work yet

* aaaaaaaaaaaaaaaaa

* oh

* ignore unused shapes

* uncomment generate_blocks

* fix migrate

* 1.19.3-rc2

* fix clippy warnings

* 1.19.3-rc3

* split the azalea-buf macro into separate modules

* improve Recipe in protocol

* 1.19.3
2022-12-07 21:09:58 -06:00
mat
8e1537ab3b Fix example in azalea-world 2022-12-03 21:19:27 -06:00
mat
631ed63dbd
Swarm (#36)
* make azalea-pathfinder dir

* start writing d* lite impl

* more work on d* lite

* work more on implementing d* lite

* full d* lite impl

* updated edges

* add next() function

* add NoPathError

* why does dstar lite not work

* fix d* lite implementation

* make the test actually check the coords

* replace while loop with if statement

* fix clippy complaints

* make W only have to be PartialOrd

* fix PartialOrd issues

* implement mtd* lite

* add a test to mtd* lite

* remove normal d* lite

* make heuristic only take in one arg

* add `success` function

* Update README.md

* evil black magic to make .entity not need dimension

* start adding moves

* slightly improve the vec3/position situation

new macro that implements all the useful functions

* moves stuff

* make it compile

* update deps in az-pathfinder

* make it compile again

* more pathfinding stuff

* add Bot::look_at

* replace EntityMut and EntityRef with just Entity

* block pos pathfinding stuff

* rename movedirection to walkdirection

* execute path every tick

* advance path

* change az-pf version

* make azalea_client keep plugin state

* fix Plugins::get

* why does it think there is air

* start debugging incorrect air

* update some From methods to use rem_euclid

* start adding swarm

* fix deadlock

i still don't understand why it was happening but the solution was to keep the Client::player lock for shorter so it didn't overlap with the Client::dimension lock

* make lookat actually work probably

* fix going too fast

* Update main.rs

* make a thing immutable

* direction_looking_at

* fix rotations

* import swarm in an example

* fix stuff from merge

* remove azalea_pathfinder import

* delete azalea-pathfinder crate

already in azalea::pathfinder module

* swarms

* start working on shared dimensions

* Shared worlds work

* start adding Swarm::add_account

* add_account works

* change "client" to "bot" in some places

* Fix issues from merge

* Update world.rs

* add SwarmEvent::Disconnect(Account)

* almost add SwarmEvent::Chat and new plugin system

it panics rn

* make plugins have to provide the State associated type

* improve comments

* make fn build slightly cleaner

* fix SwarmEvent::Chat

* change a println in bot/main.rs

* Client::shutdown -> disconnect

* polish

fix clippy warnings + improve some docs a bit

* fix shared worlds*

*there's a bug that entities and bots will have their positions exaggerated because the relative movement packet is applied for every entity once per bot

* i am being trolled by rust

for some reason some stuff is really slow for literally no reason and it makes no sense i am going insane

* make world an RwLock again

* remove debug messages

* fix skipping event ticks

unfortunately now sending events is `.send().await?` instead of just `.send()`

* fix deadlock + warnings

* turns out my floor_mod impl was wrong

and i32::rem_euclid has the correct behavior LOL

* still errors with lots of bots

* make swarm iter & fix new chunks not loading

* improve docs

* start fixing tests

* fix all the tests

except the examples i don't know how to exclude them from the tests

* improve docs some more
2022-11-27 16:25:07 -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
mat
0d004b72ac
Rename "dimension" to "world" (#39)
* rename "dimension" to "world"

* Update mod.rs
2022-11-15 14:52:26 -06:00
Ubuntu
709c5dbc19 add Client::metadata 2022-11-15 20:44:33 +00:00
Ubuntu
614c0df053 clippy 2022-11-15 20:38:32 +00: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
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
9de6c03dfb use variables directly in format strings
thanks clippy we love you
2022-10-27 21:22:47 -05:00
Ubuntu
0d55c71cee actually fix out of bounds errors 2022-10-24 19:01:28 +00:00
Ubuntu
61642f165b fix out of bounds y position 2022-10-24 18:20:18 +00: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
127126c2cc fix panic on purpur servers 2022-10-23 12:53:38 -05: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
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
46fbc4654c (cargo-release) version 0.2.0 2022-10-17 16:28:51 +00:00
mat
98224cf913 fix clippy warnings 2022-10-15 16:53:34 -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
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
788e9e875a fix rotations 2022-09-19 21:44:13 -05:00
mat
c31a1f9434 fix outdated EntityDataValue 2022-09-10 19:46:01 -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
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
1dec4f5664 make collision test work* 2022-09-02 17:22:15 +00:00
mat
cfb190d00c
get rid of Readable & Writable (#21) 2022-09-02 12:11:14 -05:00
mat
56afcb9dd8 make set_block_state return an Option 2022-08-31 22:39:38 -05:00
Ubuntu
a6c5017e38 clippy 2022-08-30 19:56:14 +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
b8228a0360
Azalea registry (#20)
* make azalea-registry crate

* add trait feature to az-block

* registr

* registry macro

* impl Display for registry things

* registries
2022-08-27 20:31:21 -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
77980f0018 rename World to dimension
A world is a collection of dimensions
2022-06-25 14:24:56 -05:00
mat
cd9a05e5a6 read_into -> read_from
yeah
2022-06-25 02:33:28 -05:00
mat
b030b0ea33 start adding moving 2022-06-24 23:10:59 -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
efd8749573 add gametick event and find_one_entity 2022-06-20 01:19:59 -05:00
mat
c9a070f711 Fix some clippy warnings 2022-06-19 22:01:54 -05:00
mat
e84893b07a Fix issues with entity pos conversion to block pos 2022-06-19 13:42:01 -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
614b211298 EntityStorage 2022-06-17 23:55:11 -05:00
mat
d0fc7d0eff ClientboundSetEquipmentPacket 2022-06-17 16:27:58 -05:00
mat
69e1125ecb Slightly improve bit storage 2022-06-17 15:59:27 -05:00
mat
74c3ae52f8 azalea-world uses azalea-block 2022-06-16 23:38:51 -05:00
mat
8fb9586609 remove some console.logs 2022-05-14 18:55:08 -05:00
mat
e58c9390a7 get_block_state works 2022-05-14 15:02:13 -05:00
mat
6d2fd8afba start adding get_block_state 2022-05-14 14:12:57 -05:00
mat
7c194fb245 remove some printlns 2022-05-14 11:20:33 -05:00
mat
345cecf7af add more stuff 2022-05-08 23:45:15 -05:00
mat
d9795a593a Update palette.rs 2022-05-08 18:55:56 -05:00
mat
e023986565 random polish 2022-05-05 23:33:08 -05:00
mat
1b48cad53f remove some prints 2022-05-05 23:06:37 -05:00
mat
4dac004635 Fix chunk decoding 2022-05-05 22:12:54 -05:00
mat
57b76ef52b Add bit storage 2022-05-05 19:57:46 -05:00
mat
18dc3a84d4 start adding bit storage 2022-05-03 22:48:57 -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
1e2ec61100 write some more azalea-world code 2022-05-02 00:24:29 -05:00
mat
4d75415130 start adding azalea-world 2022-05-01 18:59:07 -05:00