vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

No/poor intellisense for external packages (minecraft forge 1.20.2)

Open piscopancer opened this issue 1 year ago • 5 comments
trafficstars

mc

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

piscopancer avatar Dec 22 '23 15:12 piscopancer

Interestingly, misspelled names are underlined red, so the extension is indeed aware of items, but there are no suggestions anyway.

piscopancer avatar Dec 22 '23 15:12 piscopancer

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 avatar Jan 02 '24 12:01 testforstephen

@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 👇

mc

piscopancer avatar Jan 02 '24 14:01 piscopancer

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.

testforstephen avatar Jan 03 '24 01:01 testforstephen

Understand, thank you 🙏

piscopancer avatar Jan 03 '24 15:01 piscopancer