Jump to content

1n5aN1aC

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by 1n5aN1aC

  1. thank you very much, I'm not completely sure why I didn't try that
  2. Right, I understand that (at least mostly) and have tried similar (casting stuff) The problem is that eclipse still claims that ItemStack cannot be cast to ShieldArmor in this case. This is even though: ShieldArmor extends my custom class "ElectricArmor" Which Extends ItemArmor Which itself extends Item. However, it doesn't allow casting from ItemStack to ShieldArmor, even though this is the case. Still thanks, btw
  3. So basically I need to call a function on an Item (happens to be a piece of armor) from a completely separate class, which (as far as I know, only has access to the ItemStack) This is actually being called from my tickhandler, which should be every X ticks calling a function on that specific piece of armor if a player is wearing it. The problem is, I can't figure out how to get the ItemStack object returned from .getCurrentItemOrArmor(X); Which returns an Itemstack, but I cannot find a way to call the Custom Object's functions from that.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.