Jump to content

Light Flicker


mrkennedyfreak

Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.