New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic Looting Enchantment implementation #6
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This includes all mob drops in this plugin - If a player kills a mob using their looting sword, the drops will multiply depending on their looting level. Example: If a player has a looting 3, the drops will multiply by 3.
Whoops, was adding this for testing reasons. Wasn't meant to be added to this plugin.
drops for Zombies.
I meant |
@Heisenburger69 Everything's fixed. Sorry about closing the issue. Was an accident. Please merge if you can. Thank you! |
Looks great, I'll merge now. Thank you! |
Okay, thank you. |
Closed
Closed
Closed
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Okay, I saw some of the code had some basic Looting enchantment implementation. It was okay, but didn't fit its needs of a looting basic enchantment. I did see this on your to-do list though, so I thought I'd save you the bother of doing it yourself, and allowing me to implement this. By "Basic Looting Enchantment", I'm assuming you mean add Looting enchantment drops on all of the mobs?
If so, then this is the Pull Request for you.
What does this Pull Request add to the plugin?
So this plugin adds basic looting enchantment on all of the mobs that include getDrops() array function. Those that do not, were probably missed out on by the plugin on purpose. If not, I'll just let you implement more drops for the other mobs. If not, then don't worry. I never conflicted those with the non dropped mobs.
This plugin also implements rewrites to the Looting enchantment. This is because adding a + before the looting level isn't very efficient, especially in vanilla. This needs to multiply by the looting level, not adding onto it.
This isn't how vanilla works.
So for example, if I had a looting 3 enchantment level, it'd multiply the drops by 3. Adding onto it just doesn't work very well with Looting. Since Looting levels matter. If you add onto the looting levels, then looting levels are basically pointless, because it's adding one onto it every by level, and not multiplying it. This is why I made a recode with Looting levels. No, this shouldn't require any major plugins for this to work.
Along with this, I've also ticked off Basic looting enchantment implementation in the Readme.MD file just so we know where we are at.
Has this Pull Request been tested?
Start up script - Tested to enable with success.
Mob killing / kills - Untested, but should work. There shouldn't be any other major issues to worry about. Untested, but everything should work as expected.
Thank you!
Let's recape! What have we fixed in this Pull Request?
We have made the following changes:
Yes, zombies are already implemented into Pocketmine too, but there are drops, which means it should count as a lootable mob. When I mean Lootable, I mean those that drop stuff when killed.