Hi!
My name is TheMulti. I have a problem with adding effects to food class. I want to give a player INSTANT_DAMAGE effect, but I can't do it.
Thank you in advance.
Here is my Solvent.java (If you need any other file , let me know - I will send them )
package themulti.gunwo.init;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.GameRegistry;
import themulti.gunwo.Gunwo;
import themulti.gunwo.Reference;
public class Solvent
{
public static Item SOLVENT;
public static void init()
{
SOLVENT = registerItem(new ItemFood(-20, 1, true), "Solvent").setUnlocalizedName("Solvent").setMaxStackSize(16).setCreativeTab(ColorTabCraft.ColorTab);
}
public static void registerRenders()
{
registerRender(SOLVENT);
}
public static void registerRender(Item item)
{
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
}
public static Item registerItem(Item item, String name)
{
return registerItem(item, name, null);
}
public static Item registerItem(Item item, String name, CreativeTabs tab)
{
GameRegistry.register(item, new ResourceLocation(Reference.MODID, name));
Gunwo.proxy.registerItemSided(item);
return item;
}
}
I would ask you to send me a revised file.
//
Sorry for my English , but I am from Poland.