Commit Graph

90 Commits

Author SHA1 Message Date
p2r3
d272e63dd7 fix compilation error when targeting esp-idf 2025-09-27 00:51:40 +03:00
Floof
450bef9e6c validate block change buffer boundaries for chests 2025-09-22 04:19:30 +03:00
p2r3
a631de77b5 fix wrong expression order in mob movement 2025-09-19 02:12:00 +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
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
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
39f5c69bc3 fix crash when overwriting terrain with a chest
Closes #48
2025-09-14 02:08:16 +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
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
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
p2r3
a72f405b7a fix not blocks not dropping their item when the held tool breaks 2025-09-06 17:26:47 +03:00
p2r3
64846381f4 add option to sync block changes on an interval 2025-09-02 00:29:21 +03:00
p2r3
390befe9cf fix potentially uninitialized pointers 2025-09-01 22:28:38 +03:00
p2r3
6bef88f60d update ore generation 2025-08-31 22:23:19 +03:00
p2r3
d608014470 use global tick counter to handle regular events at different rates 2025-08-31 21:45:47 +03:00
p2r3
8011a1adfd implement armor 2025-08-31 05:30:18 +03:00
p2r3
f3fbde3134 terminate connections on long network timeouts 2025-08-31 00:01:35 +03:00
p2r3
a824c2d63b add item pickup animations 2025-08-30 20:48:01 +03:00
p2r3
4a7f9554a8 add player death messages 2025-08-30 01:12:20 +03:00
p2r3
a1ef1c52d2 don't give players items when their inventory is full 2025-08-30 00:44:02 +03:00
p2r3
ee63b7c7f4 reset client loading fallback timer on player init 2025-08-30 00:37:33 +03:00
p2r3
5e4462a3bc broadcast disconnecting players 2025-08-30 00:14:47 +03:00
p2r3
6886dd59ce use negative mob entity ids to avoid conflicts 2025-08-29 23:58:47 +03:00
p2r3
ce903d088f remove redundant flag set 2025-08-29 23:53:22 +03:00
p2r3
5797e2f781 generate more unique uuids for mobs 2025-08-29 23:44:29 +03:00
p2r3
849adf0568 handle player loading flag more cautiously 2025-08-29 23:33:25 +03:00
p2r3
a75d1bcb2c decrease attack cooldown 2025-08-29 23:29:34 +03:00
p2r3
ef28d7c0d5 remove unnecessary comparison 2025-08-29 15:59:20 +03:00
p2r3
ecaa62da69 explicitly handle running out of block changes 2025-08-29 15:57:38 +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
e4267e7edf fix storing wrong integer player position at negative coordinates 2025-08-29 00:29:47 +03:00
p2r3
ca6f8afbea implement chests 2025-08-28 23:51:00 +03:00
p2r3
1ae481ed3d fix fragmentation in block changes array 2025-08-28 23:20:28 +03:00
p2r3
417729a7d0 make apples edible 2025-08-28 13:14:09 +03:00
p2r3
da4ab5faaf fix client-side food level mismatch after eating 2025-08-28 03:04:27 +03:00
p2r3
975e5bb6cd burn zombies during the day 2025-08-28 02:48:46 +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
fc327299b4 don't send gameplay packets to clients who haven't loaded in 2025-08-28 02:27:04 +03:00
p2r3
de501afb1c fix wrong player handles in player combat 2025-08-28 02:04:20 +03:00
p2r3
728195b48f play item break animation and sound when a tool breaks 2025-08-28 01:59:17 +03:00