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

I would like to have some "special effects" before spawning an item in the world, and for that i need some sort of timer. E.G for 5 seconds spawn particles, after that spawn the item. I know minecraft uses Tick as it's time unit but how do i utilize ticks in methods? For example onItemRightClick method? I was thinking of using Java TimerTasks but i would like to know if there's a better way using minecraft Ticks

  • Author

You need to subscribe to ServerTickEvent / ClientTickEvent and count :D

 

Any example? Or if you know any mod that uses this i can have a look myself.

  • Author

I like the new forgeDocumentation. It's pretty neat. Actually i am not sure if it is that new since i haven't been active for months. As for the main point, I do know how to set-up events, i just wanted an example of someone using it. Anyway i just remembered. Blocks and Items have a "onUpdate" method right? I can use that and a variable to work something out. I am not very sure how you would get if the player is right clicking a block through events though, never tried something like that.

Thank you for the time

I like the new forgeDocumentation. It's pretty neat. Actually i am not sure if it is that new since i haven't been active for months. As for the main point, I do know how to set-up events, i just wanted an example of someone using it. Anyway i just remembered. Blocks and Items have a "onUpdate" method right? I can use that and a variable to work something out. I am not very sure how you would get if the player is right clicking a block through events though, never tried something like that.

Thank you for the time

Note a variable on an Item is shared between all in game instances.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author

Also note that onUpdate will only be called while an Item is in the player's inventory. And for Blocks you would need a

TileEntity

.

 

And TileEntities onUpdate will only be called if it exists in the world? Then i don't really need any "fancy" way since these restriction don't really prevent anything of what i am planing to do.

  • Author

Last time i worked on forge there was something like IUpdatePlayerListBox that you had to implement into your tile-entity to get "onUpdate"

Is that gone now?

Last time i worked on forge there was something like IUpdatePlayerListBox that you had to implement into your tile-entity to get "onUpdate"

Is that gone now?

Yes you use ITickable and not the client one.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author

Alright thank you for helping me, both of you. And i am sorry for the inconvenience.

 

~Have a nice day.

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.