Jump to content

Recommended Posts

Posted (edited)

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
  • 3 months later...
Posted

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.

Posted
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

 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

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