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

231 commits

Author SHA1 Message Date
mat
32eece4d37 implement stepping up stairs 2023-08-25 04:44:20 -05:00
mat
7df2256f35 add failing test for that weird diagonal edge case
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2023-08-25 03:19:11 -05:00
mat
d5465cd28e add basic pathfinding test 2023-08-25 02:34:31 -05:00
mat
11d14c74c5
Support properly switching instances (#106)
* start implementing switching dimensions

* fix removeentity in shared worlds

* also store entity ids per local player

* uncomment a trace in pathfinder

* cleanup

---------

Co-authored-by: mat <git@matdoes.dev>
2023-08-24 22:59:40 -05:00
TheDudeFromCI
47a280212a
Created nearest_entity system param (#102)
* Created nearest_entity system param

Signed-off-by: TheDudeFromCI <thedudefromci@gmail.com>

* Added nearby item iterators.

Signed-off-by: TheDudeFromCI <thedudefromci@gmail.com>

* Export bot.rs (#101)

* Removed .vscode settings (#104)

Signed-off-by: TheDudeFromCI <thedudefromci@gmail.com>

* raycasting not raytracing

* don't panic if TranslatableComponent::to_string fails

* Food/saturation component support (#97)

* modified for food stuff

* moved food/saturation to a separate file

* hunger component

* simplify some logic

---------

Co-authored-by: mat <git@matdoes.dev>

* Created nearest_entity system param

Signed-off-by: TheDudeFromCI <thedudefromci@gmail.com>

* Added nearby item iterators.

Signed-off-by: TheDudeFromCI <thedudefromci@gmail.com>

* Applied tweaks from PR review

Signed-off-by: TheDudeFromCI <thedudefromci@gmail.com>

* Fixed doctests

Signed-off-by: TheDudeFromCI <thedudefromci@gmail.com>

---------

Signed-off-by: TheDudeFromCI <thedudefromci@gmail.com>
Co-authored-by: mat <git@matdoes.dev>
Co-authored-by: Luuk van Oijen <lazyluuk.channel@gmail.com>
2023-08-22 01:46:54 -05:00
Luuk van Oijen
a81c4c060b
Food/saturation component support (#97)
* modified for food stuff

* moved food/saturation to a separate file

* hunger component

* simplify some logic

---------

Co-authored-by: mat <git@matdoes.dev>
2023-08-21 22:50:21 -05:00
TheDudeFromCI
6a318ee6f9
Export bot.rs (#101) 2023-08-19 20:31:21 -05:00
TheDudeFromCI
f0ff8e7f29
no_handler() option for ClientBuilder (#100)
* Added no_handler client builder option

Signed-off-by: TheDudeFromCI <thedudefromci@gmail.com>

* Made EmptyState public

Signed-off-by: TheDudeFromCI <thedudefromci@gmail.com>

* Packaged no_handler placeholders in own module

Signed-off-by: TheDudeFromCI <thedudefromci@gmail.com>

* imply no state and remove Fut generic from ClientBuilder and SwarmBuilder

* use destructuring in set_handler and fix a doc

---------

Signed-off-by: TheDudeFromCI <thedudefromci@gmail.com>
Co-authored-by: mat <git@matdoes.dev>
2023-08-16 00:12:37 -05:00
mat
776f714826 loosen Default requirement for State on SwarmBuilder 2023-08-03 01:29:50 -05:00
mat
d99ba0da55 clean up azalea-entity a little 2023-07-23 22:17:17 -05:00
mat
509c154b4d descend up to 3 blocks in pathfinder 2023-07-15 17:14:10 -05:00
mat
a839c6a923 fix brigadier booleans 2023-07-15 16:35:23 -05:00
mat
cde7e35046
Attacking (#96)
* add Client::attack

* partially implement attack cooldowns

* attack speed modifiers

* don't care clippy

---------

Co-authored-by: mat <git@matdoes.dev>
2023-07-15 04:39:43 -05:00
mat
148f203817 fix auto respawn and fix entity metadata 2023-07-15 02:06:19 -05:00
mat
7405427199
Mining (#95)
* more mining stuff

* initialize azalea-tags crate

* more mining stuff 2

* mining in ecs

* well technically mining works but

no codegen for how long it takes to mine each block yet

* rename downloads to __cache__

it was bothering me since it's not *just* downloads

* codegen block behavior

* fix not sending packet to finish breaking block

* mining animation 🎉

* clippy

* cleanup, move Client::mine into a client extension

* add azalea/src/mining.rs

---------

Co-authored-by: mat <git@matdoes.dev>
2023-07-14 22:20:40 -05:00
mat
d1afd02aa8
Update to Bevy 0.11 (#94)
* update to bevy 0.11

* clippy

---------

Co-authored-by: mat <git@matdoes.dev>
2023-07-09 19:11:29 -05:00
xtex
ea8a8fccb6
Add ClientBuilder:new_without_log (#93)
* Add ClientBuilder:new_without_log

* 'log' feature

* fix warnings

---------

Co-authored-by: mat <git@matdoes.dev>
2023-06-24 17:43:38 -05:00
mat
dbfbffac14 Vec3::distance_to and clippy 2023-06-14 23:43:54 -05:00
mat
eb65b0ad6e fix respawn system ambiguity 2023-05-21 17:29:28 -05:00
mat
e2f9d59c45 better variable naming in doc 2023-05-16 23:32:10 -05:00
mat
2ba7b83490 ClientBuilder::new_without_plugins 2023-05-16 23:26:45 -05:00
mat
0cc76dfb67 ChatPacket::is_whisper 2023-05-13 19:29:55 -05:00
mat
ca39b8b6af reexport azalea-chat and add goto docs 2023-05-13 19:08:08 -05:00
mat
e977391b04 auto respawn 2023-05-12 23:20:23 -05:00
mat
80172e4364 fix warnings 2023-05-12 18:53:08 +00:00
mat
e1e1063d15 astar 2023-05-09 22:05:46 -05:00
mat
df167a5a39 fix some warnings 2023-05-05 17:15:49 +00:00
mat
3702b2cb21 rename Client::inventory to open_inventory 2023-05-05 17:01:15 +00:00
mat
8b0b86bbcf add Client::inventory 2023-05-05 16:54:42 +00:00
mat
c690e72405 export brigadier from azalea 2023-05-04 20:11:49 -05:00
mat
634cb8d72c
Inventory (#48)
* start adding azalea-inventory

* design more of how inventories are defined

* start working on az-inv-macros

* inventory macro works

* start adding inventory codegen

* update some deps

* add inventory codegen

* manually write inventory menus

* put the inventories in Client

* start on containersetcontent

* inventory menu should hopefully work

* checks in containersetcontent

* format a comment

* move some variant matches

* inventory.rs

* inventory stuff

* more inventory stuff

* inventory/container tracking works

* start adding interact function

* sequence number

* start adding HitResultComponent

* implement traverse_blocks

* start adding clip

* add clip function

* update_hit_result_component

* start trying to fix

* fix

* make some stuff simpler

* clippy

* lever

* chest

* container handle

* fix ambiguity

* fix some doc tests

* move some container stuff from az-client to azalea

* clicking container

* start implementing simulate_click

* keep working on simulate click

* implement more of simulate_click

this is really boring

* inventory fixes

* start implementing shift clicking

* fix panic in azalea-chat i hope

* shift clicking implemented

* more inventory stuff

* fix items not showing in containers sometimes

* fix test

* fix all warnings

* remove a println

---------

Co-authored-by: mat <git@matdoes.dev>
2023-05-03 20:57:27 -05:00
mat
0b49939374 re export azalea_auth from azalea 2023-04-19 19:57:30 +00:00
mat
cd0a1ed8d4 fix doc errors 2023-03-11 17:02:57 -06:00
mat
719379a8a7
Bevy 0.10 (#79)
* replace 0.9.1 with 0.10.0

* start migrating to bevy .10

* well it compiles

* doesn't immediately panic

* remove unused imports

* fmt

* delete azalea-ecs

* make RelativeEntityUpdate an EntityCommand

* fix a doc test

* explain what FixedUpdate does
2023-03-07 14:14:36 -06:00
Shayne Hartford
adfbb97af8
Add set_state and set_swarm_state (#76)
* Add set_state and set_swarm_state

* Add [must_use], Remove set_state, and change state to swarm_state

* Forgot the other must_use

* I'm not good at this
2023-02-26 23:18:02 -06:00
mat
c1588ef66e
Fix system order ambiguities (#74)
* start fixing stuff where systems run in the wrong order

* fix ordering ambiguity

* add debugging guide

* some fixes

* fix panic for swarms

* fix some warnings
2023-02-25 17:32:15 -06:00
mat
71308ee0a3 fix 0ns delay 2023-02-15 22:45:03 -06:00
mat
6782b1d9ec max reconnect wait from 120s to 15s 2023-02-15 19:04:14 +00:00
mat
5d53d063c3
Better chat events (#67)
* Better chat events

* add a comment explaining why SendChatKindEvent is only one event
2023-02-12 17:49:09 -06:00
758372f938 improve docs a bit more and delete potatobot example 2023-02-10 18:19:06 +00:00
f5ae1b9717 fix and improve examples in docs 2023-02-10 18:06:18 +00:00
9d4f738d4e make blockstate good 2023-02-10 01:56:45 +00:00
aa886c101b move az_world::entity_info to az_world::entities::info 2023-02-07 20:30:53 +00:00
d51b2a29b2 fix some swarm examples/docs 2023-02-06 19:15:41 +00:00
mat
0d3a091c23 improve docs 2023-02-05 14:31:52 -06:00
mat
a5672815cc
Use an ECS (#52)
* add EntityData::kind

* start making metadata use hecs

* make entity codegen generate ecs stuff

* fix registry codegen

* get rid of worldhaver

it's not even used

* add bevy_ecs to deps

* rename Component to FormattedText

also start making the metadata use bevy_ecs but bevy_ecs doesn't let you query on Bundles so it's annoying

* generate metadata.rs correctly for bevy_ecs

* start switching more entity stuff to use ecs

* more ecs stuff for entity storage

* ok well it compiles but

it definitely doesn't work

* random fixes

* change a bunch of entity things to use the components

* some ecs stuff in az-client

* packet handler uses the ecs now

and other fun changes

i still need to make ticking use the ecs but that's tricker, i'm considering using bevy_ecs systems for those

bevy_ecs systems can't be async but the only async things in ticking is just sending packets which can just be done as a tokio task so that's not a big deal

* start converting some functions in az-client into systems

committing because i'm about to try something that might go horribly wrong

* start splitting client

i'm probably gonna change it so azalea entity ids are separate from minecraft entity ids next (so stuff like player ids can be consistent and we don't have to wait for the login packet)

* separate minecraft entity ids from azalea entity ids + more ecs stuff

i guess i'm using bevy_app now too huh
it's necessary for plugins and it lets us control the tick rate anyways so it's fine i think

i'm still not 100% sure how packet handling that interacts with the world will work, but i think if i can sneak the ecs world into there it'll be fine. Can't put packet handling in the schedule because that'd make it tick-bound, which it's not (technically it'd still work but it'd be wrong and anticheats might realize).

* packet handling

now it runs the schedule only when we get a tick or packet 😄

also i systemified some more functions and did other random fixes so az-world and az-physics compile

making azalea-client use the ecs is almost done! all the hard parts are done now i hope, i just have to finish writing all the code so it actually works

* start figuring out how functions in Client will work

generally just lifetimes being annoying but i think i can get it all to work

* make writing packets work synchronously*

* huh az-client compiles

* start fixing stuff

* start fixing some packets

* make packet handler work

i still haven't actually tested any of this yet lol but in theory it should all work

i'll probably either actually test az-client and fix all the remaining issues or update the azalea crate next

ok also one thing that i'm not particularly happy with is how the packet handlers are doing ugly queries like
```rs
let local_player = ecs
    .query::<&LocalPlayer>()
    .get_mut(ecs, player_entity)
    .unwrap();
```
i think the right way to solve it would be by putting every packet handler in its own system but i haven't come up with a way to make that not be really annoying yet

* fix warnings

* ok what if i just have a bunch of queries and a single packet handler system

* simple example for azalea-client

* 🐛

* maybe fix deadlock idk

can't test it rn lmao

* make physicsstate its own component

* use the default plugins

* azalea compiles lol

* use systemstate for packet handler

* fix entities

basically moved some stuff from being in the world to just being components

* physics (ticking) works

* try to add a .entity_by function

still doesn't work because i want to make the predicate magic

* try to make entity_by work

well it does work but i couldn't figure out how to make it look not terrible. Will hopefully change in the future

* everything compiles

* start converting swarm to use builder

* continue switching swarm to builder and fix stuff

* make swarm use builder

still have to fix some stuff and make client use builder

* fix death event

* client builder

* fix some warnings

* document plugins a bit

* start trying to fix tests

* azalea-ecs

* azalea-ecs stuff compiles

* az-physics tests pass 🎉

* fix all the tests

* clippy on azalea-ecs-macros

* remove now-unnecessary trait_upcasting feature

* fix some clippy::pedantic warnings lol

* why did cargo fmt not remove the trailing spaces

* FIX ALL THE THINGS

* when i said 'all' i meant non-swarm bugs

* start adding task pool

* fix entity deduplication

* fix pathfinder not stopping

* fix some more random bugs

* fix panic that sometimes happens in swarms

* make pathfinder run in task

* fix some tests

* fix doctests and clippy

* deadlock

* fix systems running in wrong order

* fix non-swarm bots
2023-02-04 19:32:27 -06:00
mat
c652bbc609 clippy 2023-01-21 22:25:22 -06:00
mat
a3033321f2 the repo is NOT called Cargo.toml 2023-01-15 22:05:31 -06:00
mat
37b9f10b3b make entities have a reference to WeakWorlds instead
... and other exciting bug fixes
2022-12-11 00:15:37 -06:00
2d6737b247 (cargo-release) version 0.5.0 2022-12-09 15:34:29 +00:00