Jump to content

Recommended Posts

Posted

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.)

Posted

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.

  • 5 months later...
Posted

[ Five Months Later ]

Did you, perchance, make any progress on this?  I'm on 1.21.1 and am experiencing the same inability to find "Direction" in net.minecraft.core -- BlockPos from the same package, fine!  The Direction Enum, nope.

I don't think I have the patience to deal with the IntelliJ reporting an increasing number of not-really-errors.

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.

Announcements



×
×
  • Create New...

Important Information

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