TU43 Release 1

+ Mending & FrostWalker (Needs some tlc)
+ Path Blocks
+ All Beetroot Items
- Some SWF & Texture atlasChanges
This commit is contained in:
Tranqlmao
2026-07-06 23:28:11 -04:00
parent b5707e8898
commit 37cd621561
41 changed files with 770 additions and 25 deletions
+27
View File
@@ -1,6 +1,9 @@
#include "stdafx.h"
#include "net.minecraft.world.entity.player.h"
#include "net.minecraft.world.level.h"
#include "net.minecraft.world.level.tile.h"
#include "ItemInstance.h"
#include "ShovelItem.h"
TileArray *ShovelItem::diggables = nullptr;
@@ -24,6 +27,30 @@ ShovelItem::ShovelItem(int id, const Tier *tier) : DiggerItem(id, 1, tier, digga
{
}
bool ShovelItem::useOn(shared_ptr<ItemInstance> instance, shared_ptr<Player> player, Level *level, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly)
{
if (!player->mayUseItemAt(x, y, z, face, instance)) return false;
int targetType = level->getTile(x, y, z);
int above = level->getTile(x, y + 1, z);
if (face != 0 && above == 0 && (targetType == Tile::grass_Id || targetType == Tile::dirt_Id))
{
if (!bTestUseOnOnly)
{
Tile *tile = Tile::grass_path;
level->playSound(x + 0.5f, y + 0.5f, z + 0.5f, tile->soundType->getStepSound(), (tile->soundType->getVolume() + 1) / 2, tile->soundType->getPitch() * 0.8f);
if (level->isClientSide) return true;
level->setTileAndUpdate(x, y, z, tile->id);
instance->hurtAndBreak(1, player);
}
return true;
}
return false;
}
bool ShovelItem::canDestroySpecial(Tile *tile)
{
if (tile == Tile::topSnow) return true;