Posted July 3, 201411 yr 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.
July 3, 201411 yr Author Nice nice onArmorTick exactly what i need really easy about the full set ? on worries i know that thanks for the help thou
July 3, 201411 yr 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){ } } } }
July 3, 201411 yr Author instanceof yeah im trying that now , yeah sorry about that im trying to figure out myself but ill fix it myself
July 3, 201411 yr 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 >.<
July 3, 201411 yr Author No wait wait i made wrong let me fix this hmmm sorry bout that let me straightly fix this
July 3, 201411 yr 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
July 3, 201411 yr 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.