feat: tu43 entity sounds, spawner fixes, and a 16x16 region toolset

This commit is contained in:
Fireblade
2026-07-23 19:47:55 -04:00
parent 1488469cb2
commit a045d994fb
135 changed files with 416 additions and 20 deletions
+13
View File
@@ -4,6 +4,7 @@
#include "net.minecraft.world.level.h"
#include "net.minecraft.world.phys.h"
#include "LeashFenceKnotEntity.h"
#include "SoundTypes.h"
void LeashFenceKnotEntity::_init()
{
@@ -92,8 +93,13 @@ bool LeashFenceKnotEntity::interact(shared_ptr<Player> player)
}
}
}
if (!level->isClientSide && attachedMob)
{
playSound(eSoundType_ENTITY_LEASHKNOT_PLACE, 1.0f, 1.0f);
}
if (!level->isClientSide && !attachedMob)
{
playSound(eSoundType_ENTITY_LEASHKNOT_BREAK, 1.0f, 1.0f);
remove();
if (player->abilities.instabuild)
@@ -129,6 +135,13 @@ bool LeashFenceKnotEntity::survives()
return false;
}
bool LeashFenceKnotEntity::hurt(DamageSource *source, float damage)
{
if (level->isClientSide) return false;
playSound(eSoundType_ENTITY_LEASHKNOT_BREAK, 1.0f, 1.0f);
return HangingEntity::hurt(source, damage);
}
shared_ptr<LeashFenceKnotEntity> LeashFenceKnotEntity::createAndAddKnot(Level *level, int x, int y, int z)
{
shared_ptr<LeashFenceKnotEntity> knot = std::make_shared<LeashFenceKnotEntity>(level, x, y, z);