80 Commits

Author SHA1 Message Date
7e23cabfce getrandomg 2025-09-27 22:07:55 +02:00
7e7a98bd41 "deferred block updates": falling sand and flowing water 2025-09-27 22:07:26 +02:00
90a7a8b48e FIX: MAX_RECV_BUFFER_LEN not used in header 2025-09-27 22:06:44 +02:00
p2r3
516a00f122 fix various compilation issues when targeting esp-idf 2025-09-19 02:24:36 +03:00
Tyler Zars
3bde692976 implement recv_buffer size limit and input validation
* Implement recv_buffer size limit and input validation

* Add readLengthPrefixedData helper and refactor some read flows

* Change error to be more accurate

* Add newline to error message

* fix long chat messages kicking clients

* style nitpicks

---------

Co-authored-by: p2r3 <p2r3@p2r3.com>
Co-authored-by: p2r3 <41925384+p2r3@users.noreply.github.com>
2025-09-19 02:00:02 +03:00
M6a5x98
b23e19ecd4 implement !msg and !help chat commands
* Added the !msg and !help command

* Started fixing issues

* Rewrote !msg processing in chat system

* cleanup

---------

Co-authored-by: p2r3 <p2r3@p2r3.com>
2025-09-19 01:20:50 +03:00
SDFTDusername
ba86dfd927 implement sheep shearing
* Added shearing sheeps

* Added empty line

* Changed comment in MobData to say what the middle 1 bit is used for

* Replaced if statements with a switch statement and early returns

* Send mob metadata to players that join

* Fixed mob metadata getting freed when exiting the switch statement

* remove currently unnecessary check

* use bitwise and in place of modulo

* style nitpicks

---------

Co-authored-by: p2r3 <p2r3@p2r3.com>
2025-09-16 13:36:42 +03:00
SDFTDusername
c5e8408052 implement player poses (sneak/sprint)
* Added sending player metadata with poses to everyone

* Renamed sendPlayerMetadataToAll to broadcastPlayerMetadata

* Made entity metadata system flexible

* Made broadcastPlayerMetadata create new metadata instead of using a global one

* Moved writeEntityData, sizeEntityData and sizeEntityMetadata to procedures

* style nitpicks

---------

Co-authored-by: p2r3 <p2r3@p2r3.com>
2025-09-15 22:01:22 +03:00
Henry Wandover
e5dfe53d14 implement cactus damage
* Added cactus damage for players and issues the respective death message.

Halts if condition is reached

* style nitpicks

---------

Co-authored-by: p2r3 <p2r3@p2r3.com>
2025-09-15 21:30:33 +03:00
Un1q32
ff89519340 add missing static statement to inline tools 2025-09-15 15:11:35 +03:00
SDFTDusername
f6333429eb implement arm swinging animation
* Added packets to show players swinging their arms

* fix misleading comment

---------

Co-authored-by: p2r3 <p2r3@p2r3.com>
2025-09-14 16:59:25 +03:00
p2r3
a34134918a implement mob "panic" behavior 2025-09-14 15:37:05 +03:00
p2r3
61eb38a83d fix block changes not syncing on interval 2025-09-13 21:58:03 +03:00
p2r3
e3589a02f0 fix player entities desyncing on join sometimes 2025-09-13 20:06:25 +03:00
Bradlee Barnes
969f7d3974 send server brand during login
* send server brand to client

* send brand regardless of `0x02` being recieved by server or not

* send brand regardless of `0x02` being recieved by server or not
+ if statement to match previous lines

* ifdef check for brand sending

* commit main.c for ifdef check (i forgot)

* commit main.c for ifdef check (i forgot)

* change sc_pluginMessage to sc_sendPluginMessage

- added params to it for use in other cases
- other changes to fit PR reviews

* revert .gitignore

* revert unrelated changes

* send byte instead of varint for constant packet id

* gate declaration of brand string behind ifdef

* make logging consistent with codebase

---------

Co-authored-by: p2r3 <p2r3@p2r3.com>
2025-09-13 14:22:06 +03:00
Mefiresu
808bbb26a2 Remove BlockChange from packed structs
pragma pack (push, 1) forces alignment to 1-byte.
While reordering the fields does help with memory accesses, it only
works if the compiler can ensure 2-byte alignments for this struct.
2025-09-12 23:05:10 +03:00
anmol-patankar
ba03d92ad0 fix mobs spawning in water
* Fixed underwater under lava mob spawn issue #17

* made comment changes

* minor fix

* method name change

* method change

* fixed
2025-09-12 19:53:08 +03:00
p2r3
5a100bcd23 disable chunk generation logging by default 2025-09-12 15:10:44 +03:00
p2r3
ba11d121cf reorder coordinates in BlockChange struct 2025-09-12 14:52:49 +03:00
p2r3
a83acbda67 add option to tie movement updates to tickrate 2025-09-11 22:00:32 +03:00
p2r3
d90a46c832 add note about minimum visited history size 2025-09-08 17:44:55 +03:00
p2r3
550edbdb37 centralize configuration options 2025-09-07 14:07:12 +03:00
p2r3
5bcab2500c space out config options 2025-09-07 13:55:16 +03:00
p2r3
102a7d46f8 make beef dumps opt-in via config 2025-09-02 00:33:25 +03:00
p2r3
64846381f4 add option to sync block changes on an interval 2025-09-02 00:29:21 +03:00
p2r3
d608014470 use global tick counter to handle regular events at different rates 2025-08-31 21:45:47 +03:00
p2r3
ad1baee937 extend total network timeout to 15 seconds (leaving 5s for keepalive) 2025-08-31 00:42:56 +03:00
p2r3
f3fbde3134 terminate connections on long network timeouts 2025-08-31 00:01:35 +03:00
p2r3
4d1892f023 disable flash serialization by default on esp-idf 2025-08-30 21:45:55 +03:00
p2r3
a824c2d63b add item pickup animations 2025-08-30 20:48:01 +03:00
p2r3
d9888f2e0f clarify flight flag description 2025-08-30 20:47:32 +03:00
p2r3
759399dac8 optimize world generation 2025-08-30 16:56:00 +03:00
p2r3
5e4462a3bc broadcast disconnecting players 2025-08-30 00:14:47 +03:00
p2r3
849adf0568 handle player loading flag more cautiously 2025-08-29 23:33:25 +03:00
p2r3
b2d0908879 disable flight by default 2025-08-29 23:29:53 +03:00
p2r3
5f75cb687e fix up player flag descriptions 2025-08-29 23:02:48 +03:00
p2r3
200e9154a0 implement timeout on stalling connections 2025-08-29 16:11:56 +03:00
p2r3
ecaa62da69 explicitly handle running out of block changes 2025-08-29 15:57:38 +03:00
p2r3
67b50beb90 support syncing to flash on esp-idf via littlefs 2025-08-29 06:22:05 +03:00
p2r3
99a09dc59f debloat includes 2025-08-29 06:21:11 +03:00
p2r3
728d49f7b6 implement syncing world to file on disk 2025-08-29 02:49:41 +03:00
p2r3
ca6f8afbea implement chests 2025-08-28 23:51:00 +03:00
p2r3
ba7d48c3e3 add missing flag check and docs 2025-08-28 02:35:58 +03:00
p2r3
0708a945e5 make flight a configuration option 2025-08-28 02:30:48 +03:00
p2r3
df8ebf07d5 clarify config wording 2025-08-28 01:55:56 +03:00
p2r3
b26e74c382 add option to disable fluid calculation 2025-08-28 01:50:12 +03:00
p2r3
f5119d0b70 improve hunger mechanics 2025-08-27 17:03:55 +03:00
p2r3
b7234ab31e explicitly handle running out of player slots 2025-08-27 15:31:09 +03:00
p2r3
b46f5927a2 handle server list ping 2025-08-27 14:50:17 +03:00
p2r3
71737380d5 implement water flow 2025-08-26 22:54:48 +03:00