buttilda / Headcrumbs

Headcrumbs
aww yiss
14 stars 21 forks source link

[Suggestion] Vorpal or Beheading Enchantment #44

Closed accessdenied0 closed 9 years ago

accessdenied0 commented 9 years ago

Dear @ganymedes01,

I'm not sure if someone had made this request already but I wanted to ask: If it possible to add a enchantment which raised the chance to get Heads from any creature? I know there are a (very) few mods (example RP2 from the past) which adds or was adding this possibility, but in this case it could just skipped to load? I hoped for a 3-leveled enchantment which increases the chance every-time.

Maybe you find this idea idiotic, in this case I don't bother you anymore but I like the idea especial I do not have such a mod which adds this possibility and I would like to get the Heads easier but not for free.

I hope you like it anyway,

access_denied

buttilda commented 9 years ago

The vanilla Looting enchantment already increases head drops (just like it does with wither skeleton skulls), so I don't think adding a new one is really necessary :)

accessdenied0 commented 9 years ago

@ganymedes01 ,

Okay, If you say so. The main article isn't very clear about this: http://minecraft.gamepedia.com/Drops#Rare_drops it seems more a special kind of circumstance as a simple "Looting" enchant... but I surely don't know so much about this than you do...

thank you anyway^^,

access_denied

buttilda commented 9 years ago

Looking at the code this is how vanilla decides to do a "rare drop" (iron ingots for zombies, skulls for wither skeletons and so on):

It picks a random number between 0 and 199, subtracts the looting level off of it (so if the random number is 52 and the looting level is 3, the final value would be 49) and then checks if the resulting number is smaller than 5. If is it, then it does a random drop. So looting doesn't make a big difference but it definitely helps. I'll do the maths some day lol.

Headcrumbs uses the looting value in a different way though: It uses the value "headDropChance" (which you can change in the config file. Defaults to 200) and divides it by the looting level + 1 (so if you have looting 3 the value will be divided by 4) and then uses that value to determine whether or not to drop the head. So lets say you're using the default value (200), and you have a looting 3 sword, 200/(3+1) = 50, your chances of getting a head are 1 in 50 (2%), if you have a looting 0 sword, your chances would be 200/(0+1) = 200 => 1 in 200 (0.5%).

If you have any more questions feel free to ask, I'll try to explain them to the best of my knowledge :)

accessdenied0 commented 9 years ago

Dear @ganymedes01,

I want to learn program in java for minecraft myself, problem is: I am a pretty noob. I know how the basics from Java, how it is structured and how it operates, but I find the connection to minecraft a bit difficult from my knowledge. I have to learn and I'm even more and I'm thankful if I can learn form source codes or special Tutorials as well... but sometimes a direct partner would be better ;)

I'm always thankful for pros like you telling me more about the mechanics how minecraft works and especial thank you for your help very much, this is very interesting.

access_denied

buttilda commented 9 years ago

As much as I'd like to I don't really have time for teaching it (and I don't think I'd be very good at it to be honest). All my mods are open source so you're free to use them as a guide to your learning. As for the "connection" with minecraft, it's not that complicated. Learning to setup a dev environment was the hardest part for me, the rest comes with practice and knowledge of the minecraft code.

I used @Pahimar 's "Let's mod" series to learn how to setup my dev environment and draw the initial framework for a mod to work. You can check it out here: https://www.youtube.com/playlist?list=PLQPiZYWovwmnlE5eM3enBKhTNCg8-JDU1

Hope that helps, but if in the future you have any specific questions about modding I'll be more than glad to answer them as best as I can :3

accessdenied0 commented 9 years ago

@ganymedes01,

I'm well aware of this and didn't want to ask for this. Also, I know about @Pahimar's Lets mod series, this is one I indirectly "mentioned". I just wanted to let you know that why I'm thankful about your explanation.

access_denied