hello i was trying to make a mod that heals when i eat a slime-ball-like item. i cant get the items to compile and obfuscate and heres my code:
Slimeheal.java:
-------------------------------------------------------------------------------------------------------------------
package net.minecraft.src;
public class Slimeheal extends Item
{
public Slimeheal(int itemIndex)
{
super(itemIndex);
setIconIndex(30);
this.maxStackSize = 1;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
entityplayer.heal(5);
--itemstack.stackSize;
return itemstack;
}
public void AddRecipes(CraftingManager craftingmanager)
{
craftingmanager.addRecipe(new ItemStack(500, 1), new Object[] {
"#X#", "XXX", "#X#", Character.valueOf('#'), Item.reed, Character.valueOf('X'), Block.cactus_00
});
}
public static final Slimeheal Healingslime = new Slimeheal(500);
}
-------------------------------------------------------------------------------------------------------------------
can someone help me fix it? i will give credit to the one who has helped me fix this error when i release it :smile.gif:
Slimeheal.java:
-------------------------------------------------------------------------------------------------------------------
package net.minecraft.src;
public class Slimeheal extends Item
{
public Slimeheal(int itemIndex)
{
super(itemIndex);
setIconIndex(30);
this.maxStackSize = 1;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
entityplayer.heal(5);
--itemstack.stackSize;
return itemstack;
}
}
-------------------------------------------------------------------------------------------------------------------
mod_Slimeheal.java
-------------------------------------------------------------------------------------------------------------------
package net.minecraft.src;
import java.util.List;
public class mod_Slimeheal extends BaseMod
{
public mod_Slimeheal()
{
}
public void AddRecipes(CraftingManager craftingmanager)
{
craftingmanager.addRecipe(new ItemStack(500, 1), new Object[] {
"#X#", "XXX", "#X#", Character.valueOf('#'), Item.reed, Character.valueOf('X'), Block.cactus_00
});
}
public static final Slimeheal Healingslime = new Slimeheal(500);
}
-------------------------------------------------------------------------------------------------------------------
can someone help me fix it? i will give credit to the one who has helped me fix this error when i release it :smile.gif:
Slightly different mod, but the same thing happens.
It compiles/reobfuscates, but doesn't do it correctly so when I try test it, nothing happens...
Poker v2
Follow me here as I build Poker!
Poker v2
Follow me here as I build Poker!