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

I've been trying to figure out how to get a "Star Catcher" to work, where it drops an item downwards X amount of ticks. I've managed to get it to drop the item. but I can get it to increment a variable very tick, then when variable is = to Y, reset variable and do something. Here is my code (The code that drops the item isn't included, but if it was, it would be under tickEnd):

public void tickStart(EnumSet<WorldTickEvent.Type> type, Object... tickData)
{

}

public EnumSet<WorldTickEvent.Type> ticks()
{
	return EnumSet.of(WorldTickEvent.Type.WORLD);
}



public void tickEnd(EnumSet<WorldTickEvent.Type> type, Object... tickData)
{
	if(currentTick/20 < 15  || isLesserStarReady == false)
	{
		currentTick++;
		System.out.println("BlockTick!");
	}else if(currentTick/20 >= 15)
	{
		System.out.println("Star Ready!");
		isLesserStarReady = true;
	}
}

 

Please help?

glubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglub.

  • Author

1.7.10. I know that I need to subscribe, but I dont know how I'm supposed to, and apparently I'm also supposed to register a tick handler.

glubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglub.

public class Ticker{
    @SubscribeEvent
    public void worldTick(TickEvent.WorldTickEvent event) {
        if (event.phase == TickEvent.Phase.END){
          do_something();
        }
    }
}

 

FMLCommonHandler.instance().bus().register(new Ticker());

 

  • Author
  On 10/9/2014 at 8:43 AM, MultiMote said:

public class Ticker{
    @SubscribeEvent
    public void worldTick(TickEvent.WorldTickEvent event) {
        if (event.phase == TickEvent.Phase.END){
          do_something();
        }
    }
}

 

FMLCommonHandler.instance().bus().register(new Ticker());

 

Thanks!

glubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglubglub.

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.