Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

How Do I Make A Custom Mob Drop A Custom Item?


  • Please log in to reply
5 replies to this topic

#1

PWNagePWR

Posted 08 March 2013 - 11:21 PM

Just as the title asks, how can I make my custom mob drop a custom item? I'm trying to follow SCMowns' tutorials. But in his tutorial he makes his Green Monster drop a cake instead of his custom Green Gem. I don't want my custom mob to drop any of the vanilla minecraft items. I want my mob to drop the custom item/sword I made. How do I go about doing this? Thanks.

Register or log in to remove.

#2

Jestorm
    Jestorm

    Stone Miner

  • Members
  • 88 posts

Posted 08 March 2013 - 11:27 PM

*Sigh*

Very easily.

Instead of putting on the statement "Block.cake" as he did just do:

"YourModName.YourItem.itemID".

If it is a block just do "blockID" instead of "itemID".

#3

PWNagePWR

Posted 08 March 2013 - 11:35 PM

I did, but it still gives me an error and when I hover over the error there's no fixes available. I've also tried staticIndex, and iconIndex but no luck.

#4

integerArray
  • Minecraft: Syzygy43

Posted 08 March 2013 - 11:48 PM

Might you post some code or some description more than just "error"?

Posted Image


#5

PWNagePWR

Posted 09 March 2013 - 03:12 AM

Well, with Eclipse an error of course is indicated with a red squiggly underscore. With that said and what I specified what I typed, the error shows up on itemID, I tried using itemID, staticIndex, and iconIndex. When I hover over the red underscored itemID, etc. There's no fixes or info available in th yellow box that shows up. So all the code and info I can give to show anything at all is this.

mod_BVB.AndysAmuletSword.itemID

mod_BVB is my Basemod class. AndysAmuletSword is my Item class with Andy's Amulet and the In Game Name (if that helps) and itemID is what Jestorm suggested.

#6

integerArray
  • Minecraft: Syzygy43

Posted 09 March 2013 - 03:22 AM

If your code is just
package net.minecraft.src
public class CustomEntity extends EntityLiving
{
mod_BVB.AndysAmuletSword.itemID
}
then of course it doesn't work.

Or the sarcasm could cease and you could post your code, like I requested. Maybe your entity, mod and item classes? If there's no error description (a claim, by the way, that I'm skeptical of), try running and post the error log.

And, in case you didn't mistype, you want your object name, not your class name.

Posted Image