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

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

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

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.