mirror of
https://github.com/KaDerox/Axo-McLCE-ModLoader.git
synced 2026-07-16 02:10:40 +00:00
Update AxoItemImpl.cpp
This commit is contained in:
@@ -90,6 +90,18 @@ public:
|
||||
return mMiningSpeed;
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
bool canDestroySpecial(Tile* tile) override {
|
||||
if (tile == nullptr) return false;
|
||||
Material* mat = tile->material;
|
||||
if (mIsPickaxe && (mat == Material::stone || mat == Material::metal || mat == Material::heavyMetal))
|
||||
return true;
|
||||
if (mIsAxe && mat == Material::wood)
|
||||
return true;
|
||||
if (mIsShovel && (mat == Material::dirt || mat == Material::sand))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
class AxoFoodItem : public FoodItem {
|
||||
@@ -158,6 +170,18 @@ public:
|
||||
return mMiningSpeed;
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
bool canDestroySpecial(Tile* tile) override {
|
||||
if (tile == nullptr) return false;
|
||||
Material* mat = tile->material;
|
||||
if (mIsPickaxe && (mat == Material::stone || mat == Material::metal || mat == Material::heavyMetal))
|
||||
return true;
|
||||
if (mIsAxe && mat == Material::wood)
|
||||
return true;
|
||||
if (mIsShovel && (mat == Material::dirt || mat == Material::sand))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
bool AxoItem_CreateFromDef(const AxoItemDef& def) {
|
||||
|
||||
Reference in New Issue
Block a user