ddevault / Craft.Net

(Unmaintained, see TrueCraft) Minecraft server, client, and etc for .NET
MIT License
228 stars 65 forks source link

Block Harvest Levels to determine Tool #222

Closed SonOfTheStars closed 10 years ago

SonOfTheStars commented 10 years ago

Today i suggested the idea of having a Block being set to a HarvestLevel to determine the level of Tool(Hand, Wood, Stone, Iron, Diamond) it can be mined with. Done by a IEnumeratable HarvestLevel, eacvh block gets his Harvestlevel set, same for the Tools. Once a Player starts a harvesting operation, let the Tool ask the Block if the Tools HL is sufficient/matching or not and if not, reduce HarvestSpeed and negate any potential drops, like MC does it.

Wanna hear thoughts about it!

tuomas56 commented 10 years ago

Why IEnumerable? Wouldn’t it be better as an Enum with values assigned to numbers, e.g) DIAMOND=3,IRON=2 so that you can just check if the block’s harvest level is less than or equal to the harvest level of the tool.

On 9 Sep 2014, at 20:30, Bitterholz notifications@github.com wrote:

Today i suggested the idea of having a Block being set to a HarvestLevel to determine the level of Tool(Hand, Wood, Stone, Iron, Diamond) it can be mined with. Done by a IEnumeratable HarvestLevel, eacvh block gets his Harvestlevel set, same for the Tools. Once a Player starts a harvesting operation, let the Tool ask the Block if the Tools HL is sufficient/matching or not and if not, reduce HarvestSpeed and negate any potential drops, like MC does it.

Wanna hear thoughts about it!

— Reply to this email directly or view it on GitHub.

SonOfTheStars commented 10 years ago

Allready found a solution!