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

As the title says what is the best way ill do that in an event or in the ItemStack on itemUseClick? please reply because i wanna try this.

  • Author

Nice nice :D onArmorTick exactly what i need really easy :)

about the full set ? on worries i know that

thanks for the help thou :)

  • Author

Last Question : How do player detects if its holding an ItemFood.class?

ย 

as of now i got this i havent test much but hopefully this might :)

ย 

ย 

@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemstack) {
	ItemStack boots = player.getCurrentArmor(0);
	ItemStack legs = player.getCurrentArmor(1);
	ItemStack chest = player.getCurrentArmor(2);
	ItemStack helmet = player.getCurrentArmor(3);

	int duration = 15;
	if(boots != null && legs != null && chest != null && helmet != null)
	{
	if(boots.getItem() == MHFCRegItem.mhfcitemtigrexboots && legs.getItem() == MHFCRegItem.mhfcitemtigrexlegs &&
	chest.getItem() == MHFCRegItem.mhfcitemtigrexchest && helmet.getItem() == MHFCRegItem.mhfcitemtigrexhelm)
	{
		if(player){

		}
	}
	}
}


  • Author

instanceof yeah im trying that now , yeah sorry about that im trying to figure out myself but ill fix it myself :)

  • Author

Did i made right? i got an idea at your tip and this is what i made :)

ย 

ย 

@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemstack) {
	ItemStack food = player.getCurrentEquippedItem();
	if(this != null && this == MHFCRegItem.mhfcitemtigrexhelm && this == MHFCRegItem.mhfcitemtigrexboots && this == MHFCRegItem.mhfcitemtigrexchest && this == MHFCRegItem.mhfcitemtigrexlegs){
		if(food.getItem() instanceof ItemFood){

		}
	}
}

ย 

If it is one last Question how do i detect the itemfood maxduration because this armor makes u eat faster >.<

  • Author

Uhm , am i right

the one that runs 4 times is the cause of this variables ?

ย 

	ItemStack boots = player.getCurrentArmor(0);
	ItemStack legs = player.getCurrentArmor(1);
	ItemStack chest = player.getCurrentArmor(2);
	ItemStack helmet = player.getCurrentArmor(3);

ย 

Also how do player detect the item duration on itemuse ? im probably putting all things now and gonna test it if im not mistaking of the codes above

  • Author

So if hopefully if im not mistaken i should to this ?

ย 

ItemStack armor = player.getCurrentArmor(armorType // <---- to get all the sets);

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.