Commit Graph

263 Commits

Author SHA1 Message Date
9fb3e870bf clang tooling helpers 2025-09-27 22:06:39 +02:00
p2r3
d272e63dd7 fix compilation error when targeting esp-idf 2025-09-27 00:51:40 +03:00
p2r3
182a180c2e update contribution guidelines 2025-09-23 13:25:45 +03:00
Floof
450bef9e6c validate block change buffer boundaries for chests 2025-09-22 04:19:30 +03:00
p2r3
516a00f122 fix various compilation issues when targeting esp-idf 2025-09-19 02:24:36 +03:00
p2r3
a631de77b5 fix wrong expression order in mob movement 2025-09-19 02:12:00 +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
p2r3
244c98552f add note about dev tools in contribution guidelines 2025-09-16 11:37:45 +03:00
p2r3
e88bf47d5b create issue templates 2025-09-15 22:41:06 +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
vil02
200106bb46 Close file on error paths to prevent resource leak 2025-09-14 21:19:54 +03:00
jcfb
6a65b8acba support 32-bit compilation on windows
* Add support for 32 bit cross compile in mingw64 and windows 98 support

* add check to error out on linux

* update text

* add instructions for 32-bit compilation on windows

---------

Co-authored-by: p2r3 <41925384+p2r3@users.noreply.github.com>
2025-09-14 18:56:17 +03:00
jcfb
26f068bc09 support native windows binary compilation
* add winsock2 to globals.c

* add winsocket2 compatibility to main function

* add winsocket2 to packets.c

* and winsocket2 to procedures.c

* add winsocket 2 compatibility to tools.c

* add winsocket2 to varnum.c

* add mingw64 linker options to build.sh

* fix build

* style nitpicks

* remove old_fd

* update compilation instructions for windows

---------

Co-authored-by: p2r3 <41925384+p2r3@users.noreply.github.com>
2025-09-14 17:11:56 +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
e7e9d307e6 fix chunks sometimes not loading after unclean shutdown 2025-09-14 14:59:13 +03:00
p2r3
925b841e95 refactor mob movement
Fixes #64
2025-09-14 14:58:31 +03:00
p2r3
1f9aa50573 fix delayed fall damage from swimming
Closes #61
2025-09-14 03:23:50 +03:00
p2r3
39f5c69bc3 fix crash when overwriting terrain with a chest
Closes #48
2025-09-14 02:08:16 +03:00
p2r3
e81e75a6d7 ensure mob uuid uniqueness on login
Closes #51
2025-09-14 01:30:42 +03:00
p2r3
61eb38a83d fix block changes not syncing on interval 2025-09-13 21:58:03 +03:00
p2r3
bdb4e4b72c remove trailing whitespace 2025-09-13 21:55:01 +03:00
p2r3
e3589a02f0 fix player entities desyncing on join sometimes 2025-09-13 20:06:25 +03:00
p2r3
bad337a032 fix compilation error when targeting esp-idf 2025-09-13 18:26:31 +03:00
breakgimme
6f260383cd correct windows build documentation 2025-09-13 16:45:46 +03:00
p2r3
7e80e12b26 add bareiron.exe to gitignore 2025-09-13 14:24: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
p2r3
2a9e443a8d fix compilation on windows 2025-09-13 14:09:13 +03:00
anmol-patankar
8d75d0a75f fix path handling in build.bat 2025-09-13 09:01:52 +03:00
p2r3
70b3b048db improve esp compilation instructions in readme 2025-09-13 00:36:40 +03:00
fox3000foxy
0f1cadd341 add warning about instability when using modded clients
* Added Fabric Notice

* rephrase fabric warning

---------

Co-authored-by: p2r3 <41925384+p2r3@users.noreply.github.com>
2025-09-13 00:18:16 +03:00
p2r3
efac4c125d fix compilation error on label syntax quirk 2025-09-13 00:10:33 +03:00
KornineQ
fddef798e3 Don't take fall damage in creative or spectator 2025-09-12 23:08:13 +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
dabb202c13 mention testing in contribution guidelines 2025-09-12 19:39:33 +03:00
CodeAsm
eef1020ad8 automate vanilla registry extraction on linux
* Adding a simple check if someone has read the readme

* semi automate the registeries generation. still requires manually downloading server.jar for eula purposes

* The mods have spoken: no spelling mistakes allowed.

* mention extract_registries script in readme

---------

Co-authored-by: p2r3 <41925384+p2r3@users.noreply.github.com>
2025-09-12 19:31:03 +03:00
fox3000foxy
81865cb7ac add string bounds check when copying player name 2025-09-12 19:04:36 +03:00
Anmol
7206dd1b11 create windows build script
* Create build.bat

* Update build.bat

* added error handling

* changed error to match build.sh

* update readme to mention windows build script

---------

Co-authored-by: zyriu1 <Suvkq@hotmail.com>
Co-authored-by: p2r3 <41925384+p2r3@users.noreply.github.com>
2025-09-12 18:41:01 +03:00
breakgimme
3d02dc02bf use libc htonll if found 2025-09-12 15:27:49 +03:00
p2r3
5b8360708c clarify memory footprint of VISITED_HISTORY 2025-09-12 15:12:46 +03:00
p2r3
5a100bcd23 disable chunk generation logging by default 2025-09-12 15:10:44 +03:00
p2r3
46a808152a document important configuration options for real servers 2025-09-12 15:09:36 +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
e4c0c6b6e9 fix armor not equipping from right click 2025-09-10 20:11:59 +03:00