GregTechCEu / GregTech

GregTech CE 1.12 fork continuing progression and development
GNU Lesser General Public License v3.0
225 stars 169 forks source link

Tool Rewrite #690

Closed Rongmario closed 1 year ago

Rongmario commented 2 years ago

This PR rewrites the GT Tools system.

This new system should get around many issues and other problems with the prior tools system, primarily due to each tool (pickaxe, wrench, et al.) being its own item, instead of all being crammed into a single "meta_tool" item.

Notably, the Sword tool (and tools that behave like swords) are done differently than the other tools due to MC limitations. Minecraft checks for instanceof the vanilla sword class for key sword operations in places hard to modify without extensive ASM. Therefore sword-like tools use a superclass of the MC sword class instead of the general GT tool superclass, in order to maintain functionality-parity with vanilla.

This new system should be more flexible for adding new tools and unique behaviors as a GT addon as well.

Known TODOs:

LAGIdiot commented 1 year ago

We should make sure that #1133 is not happening on new system

LAGIdiot commented 1 year ago

We should make sure that #1070 is not happening on new system

LAGIdiot commented 1 year ago

We should make sure that #1149 is not happening on new system

ALongStringOfNumbers commented 1 year ago

Currently the Tool GTBehaviors NBT is not copied into tools that are shown in JEI, which means that tools with AOE will not have AOE when they are pulled from JEI

LAGIdiot commented 1 year ago

Log from random testing which may need to be addressed or at least dismissed with reason:

serenibyss commented 1 year ago

We should make sure that #1070 is not happening on new system

This issue is confirmed fixed by this PR