AlmuraDev / Almura

The official mod of the Almura Client and Server.
http://www.almuramc.com
Other
16 stars 10 forks source link

Regards tool class and tool level for block destory actions #516

Closed liach closed 5 years ago

liach commented 6 years ago

Also ensured that every time of check an item stack instead of an item is passed. Item stacks often carry crucial NBT data utilized by mods, especially IC2 (e.g. Mining drill)

Adds definition of tools. Next time instead of defining what tools work, just define the classes and level needed. (e.g. instead of iron pickaxe, use tool class "pickaxe" and level 2 instead)

Resolves #515

Signed-off-by: liach liach@users.noreply.github.com

liach commented 6 years ago

@kashike Can you review this?

liach commented 5 years ago

@kashike See AlmuraDev/ServerContent#7. With this tool class system, even when a tool class does not exist, the game will not crash. And the original five lines of pickaxes can be replaced by one line of pickaxe tool class.

liach commented 5 years ago

I am urging for another review. Even though kashike may be busy working on MCP, this patch allows modded tools to work on almura blocks properly with regard to the status of tools, and also can drastically decrease the size of effective tool check parts in the definition jsons.