Jump to content

Recommended Posts

Posted

Exactly what the titles says I will list what I Have tried.

Btw,I am adding a drop to sheep

 

  • I tried adding a sheep class which extended EntitySheep.and then used the constructor from entitieSheep that changed the drop(this just did absolutley nothing
  • I tried cloning the sheep class and just changing the drops.(The normal sheep spawned but no clone sheep did)
     

Please give me any suggestions .

~streq

Posted

Is the item your adding a custom item? Or an item that is already in Minecraft?

 

This is out of memory, so it might be wrong. But for vanilla you use:

return Block.blockDiamond.blockID //Replace blockDiamond with Vanilla block

return Item.diamond.shiftedIndex //Replace diamond with Vanilla item

 

And for a custom item or block you use:

return Class.Block.blockID //Replace Class with your mod class, and Block with your block name

return Class.Item.shiftedIndex //Replace Class with your mod class, and Item with your item name

Posted

It is custom

what I had

was

 

    protected int getDropItemId()

    {

        return streq.mod.sandwiches.RawMutton.blockID;

       

       

    }

but the sheep did not drop mutton still only wool

Posted

Use LivingDeathEvent if you want vanilla sheep to drop your item.

 

@ForgeSubscribe
public void playerKilledSheep(LivingDeathEvent event)
{
if(event.entityLiving instanceof EntitySheep)
{
	event.entityLiving.dropItem(Item.porkCooked.shiftedIndex, 1);
}
}

Posted

in your main class you do

@PreInit

public void registerMyEvents(FMLPreInitializationEvent e){

MinecraftForge.EVENT_BUS.register(new YOUREVENTCLASS());

}

then u create a class with the

 

 

Use LivingDeathEvent if you want vanilla sheep to drop your item.

 

@ForgeSubscribe
public void playerKilledSheep(LivingDeathEvent event)
{
if(event.entityLiving instanceof EntitySheep)
{
	event.entityLiving.dropItem(Item.porkCooked.shiftedIndex, 1);
}
}

 

 

Posted

Oh thankyou I will try this =P

edit: Awesome that worked all I had to change was in the event class instead of shiftedIndex I had to use itemID

otherwise it crashed upon killing a sheep

  • 4 months later...
Posted

You should use the LivingDropsEvent instead of the LivingDeathEvent, since it's specially designed to be fired when a mob srops something (even players I think)

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

You should use the LivingDropsEvent instead of the LivingDeathEvent, since it's specially designed to be fired when a mob srops something (even players I think)

Didn't work....

Posted

You should use the LivingDropsEvent instead of the LivingDeathEvent, since it's specially designed to be fired when a mob srops something (even players I think)

Didn't work....

 

That is not very descriptive...

WHAT does not work exactly?

And where's your code you're using?

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

You should use the LivingDropsEvent instead of the LivingDeathEvent, since it's specially designed to be fired when a mob srops something (even players I think)

Didn't work....

 

That is not very descriptive...

WHAT does not work exactly?

And where's your code you're using?

The custom item doesn't drop from the monster

Event class

 

package mods.DennisMod.COMMON;

 

import net.minecraft.entity.monster.EntitySkeleton;

import net.minecraft.entity.passive.EntitySheep;

import net.minecraft.item.Item;

import net.minecraftforge.event.ForgeSubscribe;

import net.minecraftforge.event.entity.living.LivingDeathEvent;

import net.minecraftforge.event.entity.living.LivingDropsEvent;

 

public class EventDropDarkBone {

@ForgeSubscribe

public void playerKilledWitherSkeleton(LivingDropsEvent event)

{

if(event.entityLiving instanceof EntitySkeleton)

{

event.entityLiving.dropItem(MoGems.DarkBone.itemID, 1);

}

}

}

 

 

Main mod class

 

package mods.DennisMod.COMMON;

 

import net.minecraft.block.Block;

import net.minecraft.block.BlockFurnace;

import net.minecraft.block.BlockOre;

import net.minecraft.block.BlockOreStorage;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.EnumArmorMaterial;

import net.minecraft.item.EnumToolMaterial;

import net.minecraft.item.Item;

import net.minecraft.item.ItemArmor;

import net.minecraft.item.ItemAxe;

import net.minecraft.item.ItemHoe;

import net.minecraft.item.ItemPickaxe;

import net.minecraft.item.ItemSpade;

import net.minecraft.item.ItemStack;

import net.minecraft.item.ItemSword;

import net.minecraft.item.crafting.FurnaceRecipes;

import net.minecraft.world.World;

import net.minecraft.world.biome.BiomeGenBase;

import net.minecraftforge.common.BiomeDictionary;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.EnumHelper;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.oredict.OreDictionary;

import cpw.mods.fml.client.registry.RenderingRegistry;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.Init;

import cpw.mods.fml.common.Mod.Instance;

import cpw.mods.fml.common.Mod.PreInit;

import cpw.mods.fml.common.SidedProxy;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

import cpw.mods.fml.common.network.NetworkMod;

import cpw.mods.fml.common.network.NetworkRegistry;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

import net.minecraft.block.material.Material;

import cpw.mods.fml.common.registry.EntityRegistry;

import net.minecraft.entity.EnumCreatureType;

 

 

@Mod(modid = "MoGems",name = "Nieue's Combiners", version = "dev")

@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = {"DennisMod"}, packetHandler = ModPacketHandler.class)

public class MoGems

{

 

public final static EnumToolMaterial DENNIS = EnumHelper.addToolMaterial("DENNIS", 3, 2500, 10.0F, 6, 10);

public final static EnumToolMaterial AMETHYST = EnumHelper.addToolMaterial("AMETHYST", 3, 5000, 25.0F, 17, 10);

public final static EnumArmorMaterial EMERALD = EnumHelper.addArmorMaterial("EMERALD", 55, new int[]{4, 9, 5, 2}, 20);

public final static EnumArmorMaterial AMETHYSTARMOR = EnumHelper.addArmorMaterial("AMETHYSTARMOR", 70, new int[]{4, 9, 5, 2}, 50);

public final static EnumToolMaterial USELESS = EnumHelper.addToolMaterial("USELESS", 0, 100, 0.0F, 0, 0);

 

@PreInit

public void preInit(FMLInitializationEvent event) {

 

}

public static CreativeTabs MoGemsTab = new CreativeTabs("MoGemsTab")

    {

            public ItemStack getIconItemStack()

            {

                            return new ItemStack(CombinerIdle, 1, 0);

            }

    };

  public static CreativeTabs MagicTab = new CreativeTabs("MagicTab")

            {

                    public ItemStack getIconItemStack()

                    {

                                    return new ItemStack(MagicIdle, 1, 0);

                    }

    };

 

    public void registerMyEvents(FMLPreInitializationEvent e){

    MinecraftForge.EVENT_BUS.register(new EventDropDarkBone());

    }

   

    //Emerald

public final static Item EmeraldSword = new ItemSword(6320, DENNIS).setMaxStackSize(1).setUnlocalizedName("emeraldsword").setCreativeTab(MoGemsTab);

public final static Item EmeraldPickaxe = new ItemPickaxe(6321, DENNIS).setMaxStackSize(1).setUnlocalizedName("emeraldpickaxe").setCreativeTab(MoGemsTab);

public final static Item EmeraldAxe = new ItemAxe(6322, DENNIS).setMaxStackSize(1).setUnlocalizedName("emeraldaxe").setCreativeTab(MoGemsTab);

public final static Item EmeraldShovel = new ItemSpade(6323, DENNIS).setMaxStackSize(1).setUnlocalizedName("emeraldshovel").setCreativeTab(MoGemsTab);

public final static Item EmeraldHoe = new ItemHoe(6324, DENNIS).setMaxStackSize(1).setUnlocalizedName("emeraldhoe").setCreativeTab(MoGemsTab);

public static Item EmeraldHelm  = new EmeraldArmor(6337, EMERALD, 1, 0).setMaxStackSize(1).setUnlocalizedName("emeraldhelmet").setCreativeTab(MoGemsTab);

public static Item EmeraldChest = new EmeraldArmor(6338, EMERALD, 1, 1).setMaxStackSize(1).setUnlocalizedName("emeraldchestplate").setCreativeTab(MoGemsTab);

public static Item EmeraldLegs = new EmeraldArmor(6339, EMERALD, 1, 2).setMaxStackSize(1).setUnlocalizedName("emeraldpants").setCreativeTab(MoGemsTab);

public static Item EmeraldBoots = new EmeraldArmor(6340, EMERALD, 1, 3).setMaxStackSize(1).setUnlocalizedName("emeraldboots").setCreativeTab(MoGemsTab);

 

//Amethyst

public final static Item AmethystSword = new ItemSword(6326, AMETHYST).setMaxStackSize(1).setUnlocalizedName("amethystsword").setCreativeTab(MoGemsTab);

public final static Item AmethystPickaxe = new ItemPickaxe(6327, AMETHYST).setMaxStackSize(1).setUnlocalizedName("amethystpickaxe").setCreativeTab(MoGemsTab);

public final static Item AmethystAxe = new ItemAxe(6328, AMETHYST).setMaxStackSize(1).setUnlocalizedName("amethystaxe").setCreativeTab(MoGemsTab);

public final static Item AmethystShovel = new ItemSpade(6329, AMETHYST).setMaxStackSize(1).setUnlocalizedName("amethystshovel").setCreativeTab(MoGemsTab);

public final static Item AmethystHoe = new ItemHoe(6330, AMETHYST).setMaxStackSize(1).setUnlocalizedName("amethysthoe").setCreativeTab(MoGemsTab);

public final static Item Amethyst = new Amethyst(6325).setUnlocalizedName("amethyst").setCreativeTab(MoGemsTab);

public final static Block AmethystBlock = new AmethystBlock(4061).setHardness(5.0F).setResistance(10.0F).setUnlocalizedName("amethystblock").setCreativeTab(MoGemsTab);

public static Item AmethystHelm  = new AmethystArmor(6451, AMETHYSTARMOR, 1, 0).setMaxStackSize(1).setUnlocalizedName("amethysthelmet").setCreativeTab(MoGemsTab);

public static Item AmethystChest = new AmethystArmor(6452, AMETHYSTARMOR, 1, 1).setMaxStackSize(1).setUnlocalizedName("amethystchestplate").setCreativeTab(MoGemsTab);

public static Item AmethystLegs = new AmethystArmor(6453, AMETHYSTARMOR, 1, 2).setMaxStackSize(1).setUnlocalizedName("amethystpants").setCreativeTab(MoGemsTab);

public static Item AmethystBoots = new AmethystArmor(6454, AMETHYSTARMOR, 1, 3).setMaxStackSize(1).setUnlocalizedName("amethystboots").setCreativeTab(MoGemsTab);

//Manganese

public final static Block ManganeseOre = new BlockOre(4060).setHardness(5.0F).setResistance(10.0F).setUnlocalizedName("manganeseore").setCreativeTab(MoGemsTab);

public final static Item ManganeseIngot = new ManganeseIngot(6331).setUnlocalizedName("manganeseingot").setCreativeTab(MoGemsTab);

public final static Block ManganeseBlock = new ManganeseBlock(4071).setHardness(5.0F).setResistance(10.0F).setUnlocalizedName("manganeseblock").setCreativeTab(MoGemsTab);

 

//Misc

public final static Block CharcoalCobble = new CharcoalCobble(4074).setHardness(3.0F).setResistance(10.0F).setUnlocalizedName("charcoalcobble").setCreativeTab(MoGemsTab);

 

//Fuel

public final static Item SuperCoal = new SuperCoal(6341).setUnlocalizedName("supercoal").setCreativeTab(MoGemsTab);

public final static Item MegaCoal = new MegaCoal(6342).setUnlocalizedName("megacoal").setCreativeTab(MoGemsTab);

public final static Item SuperMegaCoal = new SuperMegaCoal(6343).setUnlocalizedName("supermegacoal").setCreativeTab(MoGemsTab);

 

//Hammers

public final static Item WoodHammer = new WoodHammer(6344).setMaxStackSize(1).setUnlocalizedName("hammerwood").setCreativeTab(MoGemsTab);

public final static Item StoneHammer = new StoneHammer(6345).setMaxStackSize(1).setUnlocalizedName("hammerstone").setCreativeTab(MoGemsTab);

public final static Item IronHammer = new IronHammer(6346).setMaxStackSize(1).setUnlocalizedName("hammeriron").setCreativeTab(MoGemsTab);

public final static Item GoldHammer = new GoldHammer(6347).setMaxStackSize(1).setUnlocalizedName("hammergold").setCreativeTab(MoGemsTab);

public final static Item DiamondHammer = new DiamondHammer(6348).setMaxStackSize(1).setUnlocalizedName("hammerdiamond").setCreativeTab(MoGemsTab);

public final static Item EmeraldHammer = new EmeraldHammer(6349).setMaxStackSize(1).setUnlocalizedName("hammeremerald").setCreativeTab(MoGemsTab);

public final static Item AmethystHammer = new AmethystHammer(6350).setMaxStackSize(1).setUnlocalizedName("hammeramethyst").setCreativeTab(MoGemsTab);

 

//Upgrades

public final static Item UpgradeCore = new UpgradeCore(6455).setUnlocalizedName("core").setCreativeTab(MoGemsTab);

public final static Item StoneUpgrade = new StoneUpgrade(6456).setUnlocalizedName("stoneupgrade").setCreativeTab(MoGemsTab);

public final static Item IronUpgrade = new IronUpgrade(6457).setUnlocalizedName("ironupgrade").setCreativeTab(MoGemsTab);

public final static Item GoldUpgrade = new GoldUpgrade(6458).setUnlocalizedName("goldupgrade").setCreativeTab(MoGemsTab);

public final static Item DiamondUpgrade = new DiamondUpgrade(6459).setUnlocalizedName("diamondupgrade").setCreativeTab(MoGemsTab);

public final static Item EmeraldUpgrade = new EmeraldUpgrade(6460).setUnlocalizedName("emeraldupgrade").setCreativeTab(MoGemsTab);

public final static Item AmethystUpgrade = new AmethystUpgrade(6461).setUnlocalizedName("amethystupgrade").setCreativeTab(MoGemsTab);

 

//Bullets

public final static Item IronBullet = new IronBullet(6462).setUnlocalizedName("ammoiron").setCreativeTab(MoGemsTab);

public final static Item GoldBullet = new GoldBullet(6463).setUnlocalizedName("ammogold").setCreativeTab(MoGemsTab);

public final static Item DiamondBullet = new DiamondBullet(6464).setUnlocalizedName("ammodiamond").setCreativeTab(MoGemsTab);

public final static Item EmeraldBullet = new EmeraldBullet(6465).setUnlocalizedName("ammoemerald").setCreativeTab(MoGemsTab);

public static final Item AmethystBullet = new AmethystBullet(6466).setUnlocalizedName("ammoamethyst").setCreativeTab(MoGemsTab);

 

//Magic

public final static Item Stutter = new Stutter(6467).setUnlocalizedName("stutter").setCreativeTab(MagicTab);

public final static Item FireStutter = new FireStutter(6468).setUnlocalizedName("stutterfire").setCreativeTab(MagicTab);

public final static Item HealthStutter = new HealthStutter(6469).setUnlocalizedName("stutterhealth").setCreativeTab(MagicTab);

public final static Item PearlStutter = new PearlStutter(6470).setUnlocalizedName("stutterpearl").setCreativeTab(MagicTab);

public final static Item DarkBone = new DarkBone(6471).setUnlocalizedName("darkbone").setCreativeTab(MagicTab);

public final static Item StutterNugget = new StutterNugget(6472).setUnlocalizedName("stutternugget").setCreativeTab(MagicTab);

public final static Item FireWand = new FireWand(6473).setMaxStackSize(1).setUnlocalizedName("wandfire").setCreativeTab(MagicTab);

public final static Item HealthWand = new HealthWand(6474).setMaxStackSize(1).setUnlocalizedName("wandhealth").setCreativeTab(MagicTab);

public final static Item PearlWand = new PearlWand(6475).setMaxStackSize(1).setUnlocalizedName("wandpearl").setCreativeTab(MagicTab);

public final static Item MagicUpgrade = new MagicUpgrade(6476).setUnlocalizedName("magicupgrade").setCreativeTab(MagicTab);

 

@SidedProxy(clientSide = "mods.DennisMod.client.ClientProxy", serverSide = "mods.DennisMod.common.CommonProxy")

public static CommonProxy Proxy;

 

@Instance

public static MoGems instance = new MoGems();

 

private GuiHandler guihandler = new GuiHandler();

private AdvancedGuiHandler advancedguihandler = new AdvancedGuiHandler();

private MagicGuiHandler magicguihandler = new MagicGuiHandler();

 

public static Block CombinerIdle;

public static Block CombinerLit;

public static Block AdvancedIdle;

public static Block AdvancedLit;

public static Block MagicIdle;

public static Block MagicLit;

 

@Init

public void load(FMLInitializationEvent event)

{

 

EntityRegistry.registerModEntity(EntityIHBullet.class, "IronBullet", 2, this, 40, 3, true);

EntityRegistry.registerModEntity(EntityGHBullet.class, "GoldBullet", 2, this, 40, 3, true);

EntityRegistry.registerModEntity(EntityDHBullet.class, "DiamondBullet", 2, this, 40, 3, true);

EntityRegistry.registerModEntity(EntityEHBullet.class, "EmeraldBullet", 2, this, 40, 3, true);

EntityRegistry.registerModEntity(EntityAHBullet.class, "AmethystBullet", 2, this, 40, 3, true);

EntityRegistry.registerModEntity(EntityFireStutter.class, "Fire Stutter", 2, this, 40, 3, true);

 

GameRegistry.registerWorldGenerator(new ModGenerator());

GameRegistry.registerFuelHandler(new MoGemsFuelHandler());

 

CombinerIdle = new Combiner(4062, false).setHardness(3.5F).setUnlocalizedName("combineridle").setCreativeTab(MoGemsTab);

CombinerLit = new Combiner(4063, true).setHardness(3.5F).setUnlocalizedName("combinerlit");

AdvancedIdle = new AdvancedCombiner(4065, false).setHardness(5.0F).setUnlocalizedName("advancedidle").setCreativeTab(MoGemsTab);

AdvancedLit = new AdvancedCombiner(4066, true).setHardness(5.0F).setUnlocalizedName("advancedlit");

MagicIdle = new MagicCombiner(4067, false).setHardness(5.0F).setUnlocalizedName("magicidle").setCreativeTab(MagicTab);

MagicLit = new MagicCombiner(4068, true).setHardness(5.0F).setUnlocalizedName("magiclit").setCreativeTab(MagicTab);

 

LanguageRegistry.addName(IronBullet, "IH Ammo");

LanguageRegistry.addName(GoldBullet, "GH Ammo");

LanguageRegistry.addName(DiamondBullet, "DH Ammo");

LanguageRegistry.addName(EmeraldBullet, "EH Ammo");

LanguageRegistry.addName(AmethystBullet, "AH Ammo");

 

LanguageRegistry.addName(EmeraldSword, "Emerald Sword");

LanguageRegistry.addName(EmeraldPickaxe, "Emerald Pickaxe");

LanguageRegistry.addName(EmeraldAxe, "Emerald Axe");

LanguageRegistry.addName(EmeraldShovel, "Emerald Shovel");

LanguageRegistry.addName(EmeraldHoe, "Emerald Hoe");

LanguageRegistry.addName(EmeraldHelm, "Emerald Helmet");

LanguageRegistry.addName(EmeraldChest, "Emerald Chestplate");

LanguageRegistry.addName(EmeraldLegs, "Emerald Leggings");

LanguageRegistry.addName(EmeraldBoots, "Emerald Boots");

 

LanguageRegistry.addName(Amethyst, "Amethyst");

LanguageRegistry.addName(AmethystSword, "Amethyst Sword");

LanguageRegistry.addName(AmethystPickaxe, "Amethyst Pickaxe");

LanguageRegistry.addName(AmethystAxe, "Amethyst Axe");

LanguageRegistry.addName(AmethystShovel, "Amethyst Shovel");

LanguageRegistry.addName(AmethystHoe, "Amethyst Hoe");

LanguageRegistry.addName(AmethystBlock, "Amethyst Block");

LanguageRegistry.addName(AmethystHelm, "Amethyst Helmet");

LanguageRegistry.addName(AmethystChest, "Amethyst Chestplate");

LanguageRegistry.addName(AmethystLegs, "Amethyst Leggings");

LanguageRegistry.addName(AmethystBoots, "Amethyst Boots");

 

 

LanguageRegistry.addName(ManganeseOre, "Manganese Ore");

LanguageRegistry.addName(ManganeseIngot, "Manganese Ingot");

LanguageRegistry.addName(ManganeseBlock, "Manganese Block");

 

LanguageRegistry.addName(CombinerIdle,"Combiner");

LanguageRegistry.addName(CombinerLit, "Combiner Lit");

LanguageRegistry.addName(CharcoalCobble, "Charchoal Engraved Cobblestone");

LanguageRegistry.addName(AdvancedIdle, "Advanced Combiner");

LanguageRegistry.addName(AdvancedLit, "Advanced Combiner Lit");

 

 

LanguageRegistry.addName(SuperCoal, "Super Coal");

LanguageRegistry.addName(MegaCoal, "Mega Coal");

LanguageRegistry.addName(SuperMegaCoal, "Super Mega Coal");

 

 

LanguageRegistry.addName(WoodHammer, "Wooden Hammer");

LanguageRegistry.addName(StoneHammer, "Stone Hammer");

LanguageRegistry.addName(IronHammer, "Iron Hammer");

LanguageRegistry.addName(GoldHammer, "Golden Hammer");

LanguageRegistry.addName(DiamondHammer, "Diamond Hammer");

LanguageRegistry.addName(EmeraldHammer, "Emerald Hammer");

LanguageRegistry.addName(AmethystHammer, "Amethyst Hammer");

 

LanguageRegistry.addName(UpgradeCore, "Upgrade Core");

LanguageRegistry.addName(StoneUpgrade, "Stone Upgrade");

LanguageRegistry.addName(IronUpgrade, "Iron Upgrade");

LanguageRegistry.addName(GoldUpgrade, "Golden Upgrade");

LanguageRegistry.addName(DiamondUpgrade, "Diamond Upgrade");

LanguageRegistry.addName(EmeraldUpgrade, "Emerald Upgrade");

LanguageRegistry.addName(AmethystUpgrade, "Amethyst Upgrade");

 

LanguageRegistry.addName(Stutter, "Stutter");

LanguageRegistry.addName(StutterNugget, "Stutter Nugget");

LanguageRegistry.addName(FireStutter, "Fire Stutter");

LanguageRegistry.addName(HealthStutter, "Health Stutter");

LanguageRegistry.addName(PearlStutter, "Pearl Stutter");

LanguageRegistry.addName(DarkBone, "Dark Bone");

LanguageRegistry.addName(FireWand, "Fireball Wand");

LanguageRegistry.addName(PearlWand, "Teleport Wand");

LanguageRegistry.addName(HealthWand, "Health Wand");

LanguageRegistry.addName(MagicUpgrade, "Magical Upgrade");

LanguageRegistry.addName(MagicIdle, "Magical Combiner");

LanguageRegistry.addName(MagicLit, "Magical Combiner Lit");

 

LanguageRegistry.instance().addStringLocalization("itemGroup.MoGemsTab", "en_US", "Nieue's Combiners");

LanguageRegistry.instance().addStringLocalization("itemGroup.MagicTab", "en_US", "Magical Combiners");

 

GameRegistry.registerBlock(AmethystBlock, "Amethyst.AmethystBlock");

GameRegistry.registerBlock(ManganeseOre, "Manganese.ManganeseOre");

GameRegistry.registerBlock(ManganeseBlock, "Manganese.ManganeseBlock");

GameRegistry.registerBlock(CombinerIdle, "Combiner.CombinerIdle");

GameRegistry.registerBlock(CombinerLit, "Combiner.CombinerLit");

GameRegistry.registerBlock(CharcoalCobble, "Charcoal.CharcoalCobble");

GameRegistry.registerBlock(AdvancedIdle, "Combiner.AdvancedIdle");

GameRegistry.registerBlock(AdvancedLit, "Combiner.AdvancedLit");

GameRegistry.registerBlock(MagicIdle, "Combiner.MagicIdle");

GameRegistry.registerBlock(MagicLit, "Combiner.MagicLit");

 

GameRegistry.registerTileEntity(TileEntityCombiner.class, "TileEntityCombiner");

GameRegistry.registerTileEntity(TileEntityAdvanced.class, "TileEntityAdvanced");

GameRegistry.registerTileEntity(TileEntityMagic.class, "TileEntityMagic");

 

NetworkRegistry.instance().registerGuiHandler(this, guihandler);

 

MinecraftForge.setBlockHarvestLevel(ManganeseOre, "pickaxe", 2);

MinecraftForge.setBlockHarvestLevel(AmethystBlock, "pickaxe", 2);

MinecraftForge.setBlockHarvestLevel(ManganeseBlock, "pickaxe", 2);

MinecraftForge.setBlockHarvestLevel(CombinerIdle, "pickaxe", 2);

MinecraftForge.setBlockHarvestLevel(CombinerLit, "pickaxe", 2);

MinecraftForge.setBlockHarvestLevel(CharcoalCobble, "pickaxe", 2);

MinecraftForge.setBlockHarvestLevel(AdvancedIdle, "pickaxe", 2);

MinecraftForge.setBlockHarvestLevel(AdvancedLit, "pickaxe", 2);

MinecraftForge.setBlockHarvestLevel(MagicIdle, "pickaxe", 2);

MinecraftForge.setBlockHarvestLevel(MagicLit, "pickaxe", 2);

 

ItemStack ema = new ItemStack(Item.emerald);

ItemStack stick = new ItemStack(Item.stick);

ItemStack quartz = new ItemStack(Item.netherQuartz);

ItemStack ame = new ItemStack(Amethyst);

ItemStack cha = new ItemStack(Item.coal, 1, 1);

ItemStack man = new ItemStack(ManganeseIngot);

ItemStack fur = new ItemStack(Block.furnaceIdle);

ItemStack bmn = new ItemStack(ManganeseBlock);

ItemStack chc = new ItemStack(CharcoalCobble);

ItemStack com = new ItemStack(CombinerIdle);

ItemStack irn = new ItemStack(Item.ingotIron);

ItemStack wdn = new ItemStack(Block.planks);

ItemStack gld = new ItemStack(Item.ingotGold);

ItemStack dmn = new ItemStack(Item.diamond);

ItemStack cbl = new ItemStack(Block.cobblestone);

ItemStack lap = new ItemStack(Block.blockLapis);

ItemStack net = new ItemStack(Item.netherStar);

ItemStack red = new ItemStack(Item.redstone);

ItemStack nug = new ItemStack(StutterNugget);

ItemStack dab = new ItemStack(DarkBone);

ItemStack fst = new ItemStack(FireStutter);

ItemStack pst = new ItemStack(PearlStutter);

ItemStack hst = new ItemStack(HealthStutter);

 

GameRegistry.addRecipe(new ItemStack (EmeraldSword), "e", "e", "s",

's', stick, 'e', ema);

GameRegistry.addRecipe(new ItemStack (EmeraldPickaxe), "eee", " s ", " s ",

's', stick, 'e', ema);

GameRegistry.addRecipe(new ItemStack (EmeraldAxe), "ee ", "es ", " s ",

's', stick, 'e', ema);

GameRegistry.addRecipe(new ItemStack (EmeraldShovel), " e ", " s ", " s ",

's', stick, 'e', ema);

GameRegistry.addRecipe(new ItemStack (EmeraldHoe), "ee ", " s ", " s ",

's', stick, 'e', ema);

GameRegistry.addRecipe(new ItemStack (Amethyst), "qeq", "eqe", "qeq",

'q', quartz, 'e', ema);

GameRegistry.addRecipe(new ItemStack (AmethystSword), "a", "a", "s",

'a', ame, 's', stick);

GameRegistry.addRecipe(new ItemStack (AmethystPickaxe), "aaa", " s ", " s ",

'a', ame, 's', stick);

GameRegistry.addRecipe(new ItemStack (AmethystAxe), "aa ", "as ", " s ",

'a', ame, 's', stick);

GameRegistry.addRecipe(new ItemStack (AmethystShovel)," a ", " s ", " s ",

'a', ame, 's', stick);

GameRegistry.addRecipe(new ItemStack (AmethystHoe), "aa ", " s ", " s ",

'a', ame, 's', stick);

GameRegistry.addRecipe(new ItemStack (AmethystBlock), "aaa", "aaa", "aaa",

'a', ame);

GameRegistry.addRecipe(new ItemStack (EmeraldHelm), "eee", "e e", "  ",

'e', ema);

GameRegistry.addRecipe(new ItemStack (EmeraldHelm), "  ", "eee", "e e",

'e', ema);

GameRegistry.addRecipe(new ItemStack (EmeraldChest), "e e", "eee", "eee",

'e', ema);

GameRegistry.addRecipe(new ItemStack (EmeraldLegs), "eee", "e e", "e e",

'e', ema);

GameRegistry.addRecipe(new ItemStack (EmeraldBoots), "e e", "e e", "  ",

'e', ema);

GameRegistry.addRecipe(new ItemStack (EmeraldBoots), "  ", "e e", "e e",

'e', ema);

GameRegistry.addRecipe(new ItemStack (ManganeseBlock), "iii", "iii", "iii",

'i', man);

GameRegistry.addRecipe(new ItemStack (CombinerIdle), " b ", "bfb", " b ",

'f', fur, 'b', bmn);

GameRegistry.addRecipe(new ItemStack (AdvancedIdle), " c ", "cmc", " c ",

'c', chc, 'm', com);

GameRegistry.addRecipe(new ItemStack (UpgradeCore), " l ", "lnl", " l ",

'l', lap, 'n', net);

GameRegistry.addRecipe(new ItemStack (WoodHammer), "www", "wsw", " s ",

'w', wdn, 's', stick);

GameRegistry.addRecipe(new ItemStack (AmethystHelm), "aaa", "a a", "  ",

'a', ame);

GameRegistry.addRecipe(new ItemStack (AmethystHelm), "  ", "aaa", "a a",

'a', ame);

GameRegistry.addRecipe(new ItemStack (AmethystChest), "a a", "aaa", "aaa",

'a', ame); 

GameRegistry.addRecipe(new ItemStack (AmethystLegs), "aaa", "a a", "a a",

'a', ame);

GameRegistry.addRecipe(new ItemStack (AmethystBoots), "a a", "a a", "  ",

'a', ame);

GameRegistry.addRecipe(new ItemStack (AmethystBoots), "  ", "a a", "a a",

'a', ame);

GameRegistry.addRecipe(new ItemStack (IronBullet, 4), "  r", "iir", "  r",

'i', irn, 'r', red);

GameRegistry.addRecipe(new ItemStack (GoldBullet, 4), "  r", "ggr", "  r",

'g', gld, 'r', red);

GameRegistry.addRecipe(new ItemStack (DiamondBullet, 4), "  r", "ddr", "  r",

'd', dmn, 'r', red);

GameRegistry.addRecipe(new ItemStack (EmeraldBullet, 4), "  r", "eer", "  r",

'e', ema, 'r', red);

GameRegistry.addRecipe(new ItemStack (AmethystBullet, 4), "  r", "aar", "  r",

'a', ame, 'r', red);

GameRegistry.addRecipe(new ItemStack (FireWand), "  f", " b ", "n  ",

'f', fst, 'b', dab, 'n', nug);

GameRegistry.addRecipe(new ItemStack (HealthWand), "  h", " b ", "n  ",

'h', hst, 'b', dab, 'n', nug);

GameRegistry.addRecipe(new ItemStack (PearlWand), "  p", " b ", "n  ",

'p', pst, 'b', dab, 'n', nug);

GameRegistry.addShapelessRecipe(new ItemStack(Amethyst, 9), new Object[]{

new ItemStack(AmethystBlock)

});

GameRegistry.addShapelessRecipe(new ItemStack (ManganeseIngot, 9), new Object[]{

new ItemStack(ManganeseBlock)

});

GameRegistry.addShapelessRecipe(new ItemStack(StoneUpgrade), new Object[]{

new ItemStack(Block.cobblestone), new ItemStack(UpgradeCore)

 

});

GameRegistry.addShapelessRecipe(new ItemStack(IronUpgrade), new Object[]{

new ItemStack(Item.ingotIron), new ItemStack(StoneUpgrade)

 

});

GameRegistry.addShapelessRecipe(new ItemStack(GoldUpgrade), new Object[]{

new ItemStack(Item.ingotGold), new ItemStack(IronUpgrade)

 

});

GameRegistry.addShapelessRecipe(new ItemStack(DiamondUpgrade), new Object[]{

new ItemStack(Item.diamond), new ItemStack(GoldUpgrade)

 

});

GameRegistry.addShapelessRecipe(new ItemStack(EmeraldUpgrade), new Object[]{

new ItemStack(Item.emerald), new ItemStack(DiamondUpgrade)

 

});

GameRegistry.addShapelessRecipe(new ItemStack(AmethystUpgrade), new Object[]{

new ItemStack(Amethyst), new ItemStack(EmeraldUpgrade)

 

});

GameRegistry.addShapelessRecipe(new ItemStack(StoneHammer), new Object[]{

new ItemStack(WoodHammer), new ItemStack(StoneUpgrade)

 

});

GameRegistry.addShapelessRecipe(new ItemStack(IronHammer), new Object[]{

new ItemStack(StoneHammer), new ItemStack(IronUpgrade)

 

});

GameRegistry.addShapelessRecipe(new ItemStack(GoldHammer), new Object[]{

new ItemStack(IronHammer), new ItemStack(GoldUpgrade)

 

});

GameRegistry.addShapelessRecipe(new ItemStack(DiamondHammer), new Object[]{

new ItemStack(GoldHammer), new ItemStack(DiamondUpgrade)

 

});

GameRegistry.addShapelessRecipe(new ItemStack(EmeraldHammer), new Object[]{

new ItemStack(DiamondHammer), new ItemStack(EmeraldUpgrade)

 

});

GameRegistry.addShapelessRecipe(new ItemStack(AmethystHammer), new Object[]{

new ItemStack(EmeraldHammer), new ItemStack(AmethystUpgrade)

 

});

 

 

 

 

{;

FurnaceRecipes.smelting().addSmelting(ManganeseOre.blockID, 0, new ItemStack(ManganeseIngot), 0.1F);

 

}

{;

FurnaceRecipes.smelting().addSmelting(Stutter.itemID, 0, new ItemStack(StutterNugget), 0.1F);

 

}

}}

 

 

 

  • 2 years later...
Posted

You need to add a second parameter to the if statement.

 

Code should be like this:

 

package mods.DennisMod.COMMON;

import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.entity.passive.EntitySheep;
import net.minecraft.item.Item;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.living.LivingDropsEvent;

public class EventDropDarkBone {
   @ForgeSubscribe
   public void playerKilledWitherSkeleton(LivingDropsEvent event)
   {
      if(event.entityLiving instanceof EntitySkeleton)
      {
if (((EntitySkeleton)event.entityLiving).getSkeletonType() == 1)
        {
         event.entityLiving.dropItem(MoGems.DarkBone.itemID, 1);
        }
      }
    }
}

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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