-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added property for specially registered tools #2693
base: master
Are you sure you want to change the base?
Added property for specially registered tools #2693
Conversation
Crafttweaker and GroovyScript integrations are not implemented yet. |
This fix will eliminate the NullPointerException caused from repairing tools without toolProperty properly set for the material. Therefore, the current soft-mallet/plumber duplications will be fixed since they are separately registered currently.
72a5c14
to
2cfcfdb
Compare
The previous one (until 2cfcfdb) is faulty as many properties were not applied properly.
|
What
This PR adds another
IMaterialProperty
calledExtraToolProperty
. This new property willImplementation Details
Now
ExtraToolProperty
andToolProperty
are two different classes inherited fromSimpleToolProperty
.ToolProperty
keeps all its original functionality, whileExtraToolProperty
holds a modification mask for every other tools.These tool masks are distinguished by the strings defined in
ToolClasses
.The
get
method now takesIGTTool
into consideration of overriding the specified properties. Hence, all the tools generated will now adapt the overridden stats.The soft mallet and plungers are also re-defined using the new method. Now the tool stats are registered in
SoftToolAddition
and the recipe still registered fromToolRecipeHandler
.Outcome
By introducing this new method, #2692 is fixed since the tools are now correctly generated.
Also, modpacks can now have finer controls over the built-in tools. They are now able to change specific stats of some tools instead of modifying the whole set of tools from a material.
Potential Compatibility Issues
Most modpacks that tweaks the tools by the NBT will likely broken. However, I believe the bug similar #2692 will be fixed.