Jump to content

Recommended Posts

Posted

First off, a little bit about me. I just installed Eclipse (again), and previously have worked with Forge when Minecraft was in version 1.2.5. When  I previously was into modding I would say I had intermediate knowledge of Minecraft modding. Also though I realize a lot has changed I doubt it would take me long to readjust to how things work nowadays. Anyway, that was just to give everybody an idea of my personally skill level.

 

My question is simply "Is there a way to implement longevity--or a "lifespan"--to an item. For example (and I'm not planning to make this into a mod it is just an example)...if I wanted to make milk turn into "Sour Milk" after  a half hour, would that be possible?

 

Also, if it were possible any help toward finding the answer to do it myself would be greatly appreciated.

 

Thanks in advance :D

Posted

yea, use the onUpdate method and then u store an long (u need to declare the long with -1 as the first value), check to see the value is -1 if yes u override it with the current system time, and if not u just compare the int(the first system time) to the actual system time and check if has been 30 minutes, if yes u add other stack with the other item, and remove the current item from entity:), u will need to do some math because  System.getSystemTimeMili (or something like that) gives in milisceonds also there is System.getNanoTime

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.