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

Hey all, me again!

 

 

This time I'm trying to get a light to flicker, its for a creepy, "horror"-like mod, where there is a map and I want the light to flicker on and off at random times... I can create the block, and I can create a tick handler, but I don't know how to combine the two, I tried adding a worldTick(World world) function in my "MyPlayerHandler" class but it crashes the game as soon as it ticks...

 

 

If you need any more information please let me know in this post or via PM, thanks for all the help guys!

world.scheduleBlockUpdate(x, y, z, blockID, delayTicks)

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

world.scheduleBlockUpdate(x, y, z, blockID, delayTicks)

 

Thanks for the function, but I don't know where to put it... I tried putting it in a new worldTick(World world) function in my Tick Hanldler, but then I get a null-pointer, and if I put it in the block class inside of a "BlockPlaced" function, it only updates once...

if I put it in the block class inside of a "BlockPlaced" function, it only updates once...

 

What function gets called when you schedule an update?

 

Maybe....use that function to...schedule an update?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

if I put it in the block class inside of a "BlockPlaced" function, it only updates once...

 

What function gets called when you schedule an update?

 

Maybe....use that function to...schedule an update?

 

I know that, but what function gets called? I've tried everyone I can think of from the Block.class, but none of them actually work

Have you considered the one with both update and tick in it's name?

 public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {}

It is the one redstone lamps use after all.

you could set the block to tick randomely, use that method but make it current light value +1 and thn make a chek so that when light value reaches 15 set to 0 or -1 instead or something.

Use examples, i have aspergers.

Examples make sense to me.

you could set the block to tick randomely, use that method but make it current light value +1 and thn make a chek so that when light value reaches 15 set to 0 or -1 instead or something.

Use examples, i have aspergers.

Examples make sense to me.

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.