Jump to content

(IntelliJ) Gradle doesn't import enums from net.minecraft.core properly


cinco

Recommended Posts

I'm trying to create a mod that involves directional blocks, but IntelliJ is giving an error - "cannot resolve symbol 'Direction'". It offers me several "Direction" classes from various unrelated packages, but not the Direction enum from net.minecraft.core. Upon further investigation, it seems that although it has imported other classes from net.minecraft.core fine, enums such as Direction or RedstoneSide aren't being imported. I've tried to bodge around it, but I can't find a way to make BlockState.isFaceSturdy usable without it, as Direction is one of the input arguments. Why would Gradle import net.minecraft.core, but not import its enums? What file could I have set up wrong? (Alternatively, I would be satisfied with a workaround for BlockState.isFaceSturdy if there is somehow no fix for this.)

Link to comment
Share on other sites

UPDATE: I kept coding, and apparently the code just works even though the IDE can't recognize the class. Annoying to have 64 fake project errors in a functioning program, but I guess this is solved.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.