Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

why Eclipse cannot autocompleete a distmarker in annotations?

Featured Replies

Posted

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

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.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.