Posted April 29, 201312 yr 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
April 30, 201312 yr 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.