vscode-java
vscode-java copied to clipboard
No/poor intellisense for external packages (minecraft forge 1.20.2)
Items must have dumped the whole wasp nest of items, yet it did not. I searched for corresponding parameters in the extension settings, failed finding something suitable. 🤔
Interestingly, misspelled names are underlined red, so the extension is indeed aware of items, but there are no suggestions anyway.
It's an interesting issue. Are you able to consistently reproduce this issue? What build tool is used to manage the source code? Appreciate if you could provide us with a minimal sample project to reproduce the issue?
@testforstephen I am not sure how other non-minecraft Java devs have their Java projects in vscode with redhat's extension, but I have set up my project with forge's modding development kit, which is just a barebones .zip mod with a preconfigured gradle as the build-tool) 😎.
I opened the project, ran gradle commands to install the dependencies (literally minecraft source code to run the example mod). And the problem of lazy intellisense just popped in as I could not have hints of the content of external packages, e.g. net.minecraft.world.item.Items 🤔. The extension scans files within my project easily, ngl.
By the way, the extension in fact scans the external packages, but there is a certain condition, check the gif below 👇
For the first screenshot, it seems that the IntelliSense doesn't work inside some certain lambda expression. This could potentially be a bug, however, we would require a minimal code snippet to accurately identify the use case.
For the second screenshot, it's an expected behavior since you're attempting to type an invocation within a class body, which is not allowed according to Java syntax rules.
Understand, thank you 🙏