Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

why Eclipse cannot autocompleete a distmarker in annotations?


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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.