Something that may be easy for you to understand and interpret can be hard for others. I have checked my parameters.
public class stimSelf extends Item implements IHasModel {
public stimSelf(String name) {
setUnlocalizedName(name);
setRegistryName(name);
setCreativeTab(CreativeTabs.MISC);
modItems.ITEMS.add(this);
}
@Override
public void registerModels() {
Main.proxy.registerItemRenderer(this, 0, "inventory");
}
@Override
public ActionResult<ItemStack> onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float xFloat, float yFloat, float zFloat) {
if (player.getHealth() < player.getMaxHealth()) {
System.out.println("We healed.");
player.setHealth(player.getHealth() + 5.0F);
player.getCooldownTracker().setCooldown(modItems.STIM_SELF, 300);
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
}else {
System.out.println("We have not healed.");
return new ActionResult<ItemStack>(EnumActionResult.FAIL, stack);
}
}
}
You tell me.