Jump to content

why Eclipse cannot autocompleete a distmarker in annotations?


Drachenbauer

Recommended Posts

Hello

 

I noticed, if i use annotations like

@Mod.EventBusSubscriber(Dist.CLIENT)

or

@OnlyIn(Dist.CLIENT)

Eclipse cannot autocompleete the "Dist" in the brackets.

it only tells me, that it does not know the word "Dist" and does not give me this import as a click-option:

import net.minecraftforge.api.distmarker.Dist;

Everytime i have to find, copy and paste this import manually.

 

Why the autocompleete does not work here?

Edited by Drachenbauer
Link to comment
Share on other sites

  • 3 months later...

I'm confident this happens due to annotation compiler settings in Eclipse.

I never had this problem until I reinstalled Eclipse recently and used default settings.  In my previous installation i had played around with annotations, and therefore enabled options to auto compile annotations or whatever.

Link to comment
Share on other sites

On 12/27/2020 at 12:17 PM, Drachenbauer said:

@OnlyIn(Dist.CLIENT)

 

do not use @OnlyIn, there's no reason for it, it is only meant for the vanilla classes to say what classes don't exist on a distribution

 

On 12/27/2020 at 12:17 PM, Drachenbauer said:

@Mod.EventBusSubscriber(Dist.CLIENT)

 

I'm pretty sure you need to pass your modid and the event bus to the eventBusSubscriber annotation aswell

 

also, your issue has more to do with eclipse than forge

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...

Important Information

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