How to Solve the Initialization Error of the ModDataGenerator Class After Changing the super() Function of ModItemTags? #4351
Replies: 1 comment 1 reply
-
(may be wrong?) what's worked for me so far is to pass null to super. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Today, I was trying to add a category of blocks to a recipe for the synthesis formula.
However, the
.input()
method only accepts the ItemTags type. After looking at Mojang's code, I found that in the original version, a Copy function was used within ItemsTags to achieve this.Now I've used this method in ModItemTags, but it threw an error:
Caused by: java.util.concurrent.CompletionException: java.lang.NullPointerException: Pass Block tag provider via constructor to use copy
I asked AI and checked Mojang's code again, and it was said that the implementation of the
super()
function in ModItemTags was incorrect, and I needed to use the version with three parameters. But after changing thesuper()
function, there were problems with the initialization in the ModDataGenerator class (I don't know how to write this initialization).Could someone help me take a look? Thanks a lot.
Beta Was this translation helpful? Give feedback.
All reactions