diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 03:04:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 03:04:10 +0800 |
| commit | b3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch) | |
| tree | 267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.World/ShearsItem.cpp | |
| parent | 84c31a2331f7a0ec85b9d438992e244f60e5020f (diff) | |
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a43994725008e35fceb984d5549df9c8cea470.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.World/ShearsItem.cpp')
| -rw-r--r-- | Minecraft.World/ShearsItem.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Minecraft.World/ShearsItem.cpp b/Minecraft.World/ShearsItem.cpp index 7f4d8d51..dd0c2ac7 100644 --- a/Minecraft.World/ShearsItem.cpp +++ b/Minecraft.World/ShearsItem.cpp @@ -9,14 +9,14 @@ ShearsItem::ShearsItem(int itemId) : Item(itemId) setMaxDamage(238); } -bool ShearsItem::mineBlock(shared_ptr<ItemInstance> itemInstance, Level *level, int tile, int x, int y, int z, shared_ptr<Mob> owner) +bool ShearsItem::mineBlock(shared_ptr<ItemInstance> itemInstance, Level *level, int tile, int x, int y, int z, shared_ptr<LivingEntity> owner) { - if (tile == Tile::leaves_Id || tile == Tile::web_Id || tile == Tile::tallgrass_Id || tile == Tile::vine_Id || tile == Tile::tripWire_Id) + if (tile == Tile::leaves_Id || tile == Tile::web_Id || tile == Tile::tallgrass_Id || tile == Tile::vine_Id || tile == Tile::tripWire_Id) { - itemInstance->hurt(1, owner); + itemInstance->hurtAndBreak(1, owner); return true; - } - return Item::mineBlock(itemInstance, level, tile, x, y, z, owner); + } + return Item::mineBlock(itemInstance, level, tile, x, y, z, owner); } bool ShearsItem::canDestroySpecial(Tile *tile) @@ -26,13 +26,13 @@ bool ShearsItem::canDestroySpecial(Tile *tile) float ShearsItem::getDestroySpeed(shared_ptr<ItemInstance> itemInstance, Tile *tile) { - if (tile->id == Tile::web_Id || tile->id == Tile::leaves_Id) + if (tile->id == Tile::web_Id || tile->id == Tile::leaves_Id) { - return 15; - } - if (tile->id == Tile::cloth_Id) + return 15; + } + if (tile->id == Tile::wool_Id) { - return 5; - } - return Item::getDestroySpeed(itemInstance, tile); + return 5; + } + return Item::getDestroySpeed(itemInstance, tile); }
\ No newline at end of file |
