Commit graph

111 commits

Author SHA1 Message Date
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