Posted June 8, 20241 yr 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.)
June 10, 20241 yr Author 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.
November 26, 2024Nov 26 [ 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.
October 20Oct 20 On 11/25/2024 at 8:19 PM, Ommina said:[ 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.For anyone who is running into this issue in the future: The fix for me was updating Intellij. I was using the 2022 version, which apparently had some issues with Java 21 (particularly around enums, which Direction is one).
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.