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

Hi, I need suggestions.
I am a beginner in Minecraft Modding. I would like to apply custom effects to some armors, something like: more chance to drop seeds, change zombie awareness, drop more pieces of wood when chopping logs, and things like that.
How would you recommend me to do it, is there any library that has something similar and which ones would you recommend me?.

  • 4 weeks later...

You could try and manage custom armour features from inside armourTick. You would need to create a custom item called, for example, SapphireChestplateItem. It would extend ModAmrorItem. Your code might look like this:

@Override

public void onArmorTick(){
super.onArmorTick();

//your code here

}
 

If onArmorTick is to slow for you, you can listen for server ticks and loop through the servers players and if the current one if wearing your armor, do whatever you want.

 

btw this is only is you want the result of the effect, not like a full blown armour independent effect, e.g night vision

  • 3 months later...
On 5/18/2024 at 3:01 AM, Xoroshio said:

You could try and manage custom armour features from inside armourTick. You would need to create a custom item called, for example, SapphireChestplateItem. It would extend ModAmrorItem. Your code might look like this:

@Override

public void onArmorTick(){
super.onArmorTick();

//your code here

}
 

If onArmorTick is to slow for you, you can listen for server ticks and loop through the servers players and if the current one if wearing your armor, do whatever you want.

 

btw this is only is you want the result of the effect, not like a full blown armour independent effect, e.g night vision

Hello, I have an issue while doing this. On 1.19.2, the onArmorTick event doesn't fire at all

I am testing it by 

player.sendSystemMessage(Component.literal("Firing..."));

right after calling the onArmorTick, no if's or anything that can stop the message from going through. It doesn't even check if its on client side

Thanks for your time

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.