Commit Graph

31 Commits

Author SHA1 Message Date
Epix
93510eecd5 Grammar fixes, terminology change (#633)
* Major grammar sweep

* Remove extra backtick

* Use more specific terminology for chunk data storage

* Forgor to cargofmt

* Fix typo "thier"

* Fix typo "clousures"

* Try new terminology

* Forgor to cargofmt

* Use "Subchunks" instead of "Heterogeneous" for ChunkBlocks variant

* Fix variable name

* Forgor to change comment
2025-03-16 10:40:17 +01:00
kralverde
300ccde108 ChunkIO api and world saving optimizations (#624) 2025-03-12 08:40:53 -10:00
Alexander Medvedev
e055dd740c Check if player can destroy block using an tool
Prevents players to destroy blocks when holding a sword or trident in creative
2025-03-04 19:45:39 +01:00
Alexander Medvedev
a60a3ba243 Add Experience Orb and drop it when breaking Blocks 2025-03-01 16:58:02 +01:00
Alexander Medvedev
27f239a612 Living Entity: Proper death
Now we wait until despawning the entity so the death animation is played
2025-02-27 22:51:49 +01:00
Alexander Medvedev
fe400e4970 Make non living entities not attackable
Adds a cool abstraction to progress damage, Now implementing End Crystals should be very easy
2025-02-26 22:48:19 +01:00
Alexander Medvedev
b336a50955 Batch CSetEntityMetadata data
Allows us to send multiple meta in only one Packet
2025-02-25 23:21:59 +01:00
Alexander Medvedev
995edfb3c2 Add Effects 2025-02-22 14:17:06 +01:00
4lve
dbf58a54a8 Don't boradcast Equipment Change back to player (#561) 2025-02-18 19:06:46 +01:00
Alexander Medvedev
148ac38fe3 Make TextComponent::translate simpler 2025-02-16 18:47:30 +01:00
Alexander Medvedev
5a77b21d22 Calculate block breaking speed
Also broadcast current held item. The block progress is already correctly displayed and calculated for tools. But for some reason the destruction does not work, looking at vanilla code i have no idea what i'm doing wrong
2025-02-15 22:47:14 +01:00
vyPal
af0573d9b8 Support Teleport to different world (#532)
* make entity world RwLock

* Add teleport function

* Mark client as not loaded before change dim

* clippy

* Post-merge issues

* FIx post merge issues

* Make world.remove_player fire event conditionally

* Remove extra StartWaitingChunks packet

* Add world.send_world_info()
2025-02-11 17:08:11 +01:00
Alexander Medvedev
5c5bc67b3a Improve damage type 2025-02-07 22:33:52 +01:00
Alexander Medvedev
2e2fe83720 Add Hunger 2025-02-07 00:22:52 +01:00
drakeerv
09d6eb6da2 Add damage types & damage command (#526) 2025-02-02 11:22:49 +01:00
Alexander Medvedev
ef497fb435 Refactor World Entity System
Also support Item drops (WIP)
2025-01-31 21:45:20 +01:00
Alexander Medvedev
dbbf745da2 Improve fall damage calculation 2025-01-27 23:51:38 +01:00
Alexander Medvedev
deda78231a play sound on fall damage 2025-01-27 21:55:32 +01:00
Alexander Medvedev
709d222c23 add basic entity NBT storage 2025-01-19 19:30:32 +01:00
Alexander Medvedev
aad1f91acb parse entity types at compile time 2025-01-11 17:59:36 +01:00
Alexander Medvedev
ee485056fb rename pumpkin-core to pumpkin-util
I see that there is an confusion between the pumpkin-core crate,  People often think that this is the most important one
2025-01-09 13:12:57 +01:00
Kris
6f7433ee68 Added Spawn Egg Functionality (#350)
* Added spawn egg functionality

* Readd changes from before merge

* Added basic attacks on mobs

* Fixed spawn rotation and position

* Updated entities.json

* Fixed entity registry

* Added correct bounding boxes per entity

* Various fixes

* use right data types in entity registry

* fix: clippy

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2024-12-29 22:52:12 +01:00
Snowiiii
b2f627d517 Use Entity teleport Packet instead of Player
Should make fixing https://github.com/Snowiiii/Pumpkin/issues/363 easier
2024-12-07 15:40:50 +01:00
Edvin Bryntesson
f29cfbc63d move container to LivingEntity (#355) 2024-11-30 19:51:22 +01:00
Alvsch
c3c4aff912 Consistent registry values and player changes (#324)
* Made registry values consistent

* Port to own nbt crate

---------

Co-authored-by: Snowiiii <lilalexmed@proton.me>
2024-11-23 19:00:34 +01:00
Snowiiii
987aaad3e9 Fix: living entity kill
Also fix: https://github.com/Snowiiii/Pumpkin/issues/265
2024-11-13 23:05:33 +01:00
Alvsch
d3f299d2f6 Add damage and re-spawning (#224)
* Added new packets

Added packets to pumpkin-protocol for damage and re-spawning.

* Made damage_type registry value accessible

* Added damage and fall damage

* fixed phasing bug

* fix issues caused by merge

* spawn player on ground

make the player spawn on the highest block instead of in the air.

* dont default player to flying

* mode last_pos to living_entity

* fix using entity instead of living_entity

* fixed fall damage not working properly when switching gamemodes
2024-11-05 23:38:26 +01:00
Snowiiii
14c8c7e362 Add more docs 2024-10-29 23:21:04 +01:00
Alvsch
7de3e0e995 Improved pvp (#173)
* Added CSoundEffect packet

* Added sound macro

added a macro that turns sound namespaces to the sounds id

* added CEntitySoundEffect

* updated id to i32

* Added sound effects to pvp

* Added sweeping and particles

* Added I-Frames to living entity

* Refactored combat

split up the combat handling into multiple functions and a new combat module

* use new packet macro

* updated json files

* fixed attacking

* use builtin clamp
2024-10-24 17:49:23 +02:00
Snowiiii
f74f77a1f0 Add tokio 2024-10-17 18:59:51 +02:00
Snowiiii
9ac4bdbd50 Add Living Entity struct 2024-10-11 12:54:42 +02:00