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.

Featured Replies

Posted

For my mod i made an item to help me with debugging. It currently sends a chat message with the metadata of the block i use it on but it sends this text message twice. Any help as on why. I'm a beginner with modding so it might be that I'm missing something pretty obvious... also i can't post code right now because I'm on mobile.

  • Author

Ah well that makes sense is there a way around this? Should i do

if(world.isremote ){

...

}

 

Will that fix it?

I'm quite the beginner too, hehe.

I think the person above might've been correct. You might want to redirect the message ONLY to the client, as it might be calling on both server AND client.

From my knowledge, you can try putting this before the method that sends the message:

@SideOnly(Side.CLIENT) // DO NOT add a ; after this

And, you might want to import these two things at the beginning of your code:

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

 

I hope I help. :)

NO! DO NOT USE @SideOnly! Use

 

if (world.isRemote) {
// Do things!
}

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information

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.