Jump to content

[1.7.10] Using other mods items?


xchow

Recommended Posts

This is hypothetical no code yet but how would I use ore dictionary or a id in a block drop. In my block I'm making it drop percentages of loot and i'm wanting to drop a flans gun. Is there a way to make it drop a ore dictionary item or how would I import the use of his mod id + the name ?

Link to comment
Share on other sites

Try remove

if (world.rand.nextFloat() < 0.5F)

and see if that works.

Also: use curled brackets in every if/else/switch/try-catch/etc. block, it reduces confusion when having a wrong indentation

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.

Link to comment
Share on other sites

Removed the line it might just be how flans works items in content packs :S

 

this is my current code

@Override

public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {

ArrayList<ItemStack> drops = new ArrayList<ItemStack>();

drops.add(new ItemStack(Main.ak47, world.rand.nextInt(3) + 1));

drops.add(new ItemStack(Main.morphinebottle, world.rand.nextInt(2) + 1));

drops.add(new ItemStack(Main.ak47));

return drops;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

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