Jump to content

Recommended Posts

Posted

I got my 3x3 pickaxe to work, it drops and it works like it should, but it ignores the enchantments of the item. I can make it so it works on silk touch but i am not sure how to make it so different levels of fortune will drop different amount of items. I was looking through some of the block methods and i found

 

dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)

 

However i am not quite sure what this method does. And i am certainly not sure what all of these variables are and to what they should be assigned to. A little help on this would be appreciated because i never had to work with this one.

Posted

Lets dive in with our IDE, shall we?

 

drop1.png

 

There's fortunately not a lot going on here.  All of our parameters are getting passed to another function (

getDrops

), except one,

p_149690_6_

which is being compared to a random value.  This must be the probability of dropping each item returned by

getDrops

.

 

So what does

getDrops

do?

 

drop2.png

 

Oh hey, all of our other paramters now have names!

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

I am not sure if i am using the Recommended version of forge source or the latest one for 1.7.10, because your IDE is a little bit different. However it doesn't matter. I got it to work and the Fortune works just fine. I could have just copied another mod, but i wanted to make it my own way. Thank you for the help :)

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.

Announcements



×
×
  • Create New...

Important Information

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