Filled Change to Anvil + Enchantment table (item combiner, enchanter, etc.)

Discussion in 'Plugin Requests' started by Xp10d3, Jul 20, 2020.

  1. Offline

    Xp10d3

    ~Plugin Category~: Misc/RPG
    ~Version~: 1.8.8
    ~Suggested Name~: Item ___?
    ~What I want~:
    This is a pretty complex concept, but hopefully if I explain this well enough it'll be easy to pull off. Anyways, I need a plugin that will combine, enchant, or change certain properties of an item (ALL PROPERTIES EXPLAINED). This post is divided into multiple sections:
    **Combining**
    **Enchanting**
    And
    **Other**
    Each section explains a certain part of the plugin that I need.
    _**Combining**_
    Combining all takes place in an anvil. Please replace the GUI of the anvil entirely (so instead of right-clicking the anvil to do anvil things, a different GUI should pop up). Instead, there should be a GUI that looks pretty similar to the smithing table. I don't have access to Minecraft at the moment, so it's kinda hard for me to explain. It might be something like this, though:
    https://gyazo.com/871db5deeb7f52f31906b3993180969a
    You can put one item in one slot, and another weapon (in this case the enchantment book) in the other slot to combine the two to create a new item. To control the combining process and also to make things easier for the developer, to add a combiner you can execute the command ~/addcombine~. This will open up a GUI where you can put item one in slot one, and item two in slot two. Then finally another item in the last slot. Finally to add the combine system click the green wool to add a combine. Please copy all enchants, lore, NBT tags, and name of the item. I hope this makes sense. If it doesn't let me know. PLEASE ADD A PERMISSION SO THAT ONLY PLAYERS WITH THE PERMISSION ~item.combine~ CAN USE THIS.
    _**Enchanting**_
    Similar to how you replace the anvil GUI with another GUI, enchanting replaces the GUI of enchantment tables. Upon right-clicking the enchanting table, a GUI with two options should appear. Random enchant, or add enchant should be the two option names. Random enchant is a bit complex. There should be 4 levels of enchanting, and they require a certain item. So for example, if a player is trying to randomly enchant a sword, it will require gold nuggets (and also if they have the permission ~item.randomenchant~) with lore and such. However, I'd like to be able to set that item by using the command ~/addenchantreq~. Please copy all NBT data, lore, and the name of the item as usual. So upon randomly enchanting the sword or whatever item is in the GUI (which should look like the Hypixel Skyblock enchanting area except instead of experience bottles it should be gold nuggets), there will be different options. One being 5 gold nuggets (to use it requires the permission ~item.randomenchant.5~), the other being 30 gold nuggets (requires the permission ~item.randomenchant.30~), the third being 60 gold nuggets (requires the permission ~item.randomenchant.60~), and finally the fourth being 100 gold nuggets (requires the permission ~item.randomenchant.100~). If a player clicks the 5 gold nugget option, has 5 of the required item, AND has the permission to use the enchant, it will randomly enchant the item with whatever is specified by an Admin. The way to add enchants to the random enchant table is a bit complex. There should be the regular enchanting table enchantments, but the level can be specified. To do this is ~/randomenchant level <5/30/60/100> <range>~. So for example if the command ~/randomenchant level 5 1-1~ is sent, then all level 5 enchants will only be from level 1 to level 1. If a sword is put in the random enchant area, it can only get sharpness I, looting I, etc. And not sharpness 2, 3, 4, 5, 6, etc. The same goes for level 100 enchants. If the command ~/randomenchant level 100 3-16~, then sharpness 3 to sharpness 16 can be added to a sword (please add unsafe enchantments as well). Anyways, that's random enchants. For the add enchant section, it's pretty much just an anvil but for enchantment tables (requires permission item.enchant to use). You can add any enchantment as long as it's an enchantment book. Lore, name, etc. doesn't matter. As long as it's an enchantment book. So if the enchant book has the name &1[Sharpness V] and the lore &f&lCommon, but has the NBT data of sharpness V, it should still be considered a sharp V enchantment book.
    _**Other**_
    There isn't much to say here other than a change to cauldrons. Upon right-clicking a cauldron, a GUI should appear for dipping swords and such. Much like the combiner, to add dipping items it will have to be manually added. So upon using the command ~/adddip~, a GUI should appear that looks exactly like the GUI when you right-click the cauldron. You can put item one in slot one, and another item in slot two. Then put the final item in slot three and click the green wool to confirm adding a dipped item. Please copy all enchants, lore, NBT tags, and name of the item.
    That's pretty much it... I'd like the src code of the plugin if possible so that in case I want to change something I don't have to keep coming back lol.
    ~Commands~:
    /addcombine: Add's an item combine.
    /addenchantreq: Changes the enchantment requirement to whatever item is in the player's hand.
    /adddip: Add's an item dipping.
    ~Permissions~:
    item.combine: Allows the use of the combiner. If they right-click an anvil and don't have the permission, please send a message in chat.
    item.randomenchant.<#>: Allows the use of a certain level of random enchantments. Again, if they don't have the permission and click the random enchant option, please close the GUI and send a message in chat.
    item.enchant: Allows the use of adding enchantments to an item. Again, if they don't have the permission or any of the required enchantment item and click the enchant option, please close the GUI and send a message in chat.
    ~When I'd like this~: Of course, A.S.A.P.
     
  2. Offline

    Xp10d3

  3. Offline

    colmalle

    I will try. But why such an early version?
     
  4. Offline

    Xp10d3

    Hey thanks for doing this :) It's an early version because that's the best version for PvP. Also partly because most of the plugins I have are in 1.8.8 :p
     
  5. Offline

    colmalle

    I have made the anvil combining GUI and now I am working on the enchanting mechanism. In the random enchant, do you want for every specific item there is a custom item that enchants it?
    Or one item required for all enchantments?
     
    Last edited: Jul 25, 2020
  6. Offline

    Xp10d3

    For the random enchantments, the required item should be used for all items in order to enchant that item. So for example, if the required item is a Gold Nugget with the name &e[Gold Nugget], in order for an item to be enchanted a Gold Nugget with the name &e[Gold Nugget] has to be added to the GUI in order for that item to be enchanted. Please note that if there is a Gold Nugget in that GUI but it doesn't have the name &e[Gold Nugget] it won't work.
    EDIT: Hope this makes sense :) let me know if you need any more info.
     
    Last edited: Jul 25, 2020
  7. Offline

    colmalle

    Do you want to specify the enchantments for each level in the random enchant?
    And is it possible to enchant an item if its already enchanted?
    And in the add enchantment do you want to be able to only enchant books? I didn't understand what you meant.
    And dipping is the same as anvil combining? if it is what's the point?
     
    Last edited: Jul 26, 2020
  8. Offline

    Xp10d3

    Sorry for all the confusion. To answer your questions:
    1. Yes, specifying the enchantments for each level would be helpful :)
    2. Yes. It should be possible to enchant an item if it's already enchanted.
    3. Adding enchantments should only apply to enchantment books. However, if the enchantment book has additional lore which I will likely add, I'd still like the enchantment table to apply to that book. So for example, if the enchantment book is Sharpness V but I add the line of lore that says "Common" the enchantment table should still sense that the book is an enchantment book with Sharpness V. Hope that clarifies things...
    4. Dipping only applies to potions. With the anvil combining system, the point was to combine two swords to create a new one. With the cauldron, I'll be adding a system with throwable daggers. If that dagger inflicts poison, I'll need a system that combines a potion and a sword into a sword that inflicts poison (which I'll handle, don't worry).

    Hope that clears things up!
     
  9. Offline

    colmalle

    I'm very sorry but I still don't understand how the adding enchantment works
     
  10. Offline

    Xp10d3

    @colmalle no worries. I'll try and explain this as best as possible.
    Adding enchantments is literally the same as the regular enchantment table set up, except I'm adding a few other features. Upon right-clicking an enchantment table, a GUI should appear with two options. One, to add an enchantment directly, and the other to randomly enchant an item. To add an enchantment directly a user has to have a certain permission (item.enchant) in order to use that option. If they don't, close the GUI. If they do, they can put an item down (let's say a diamond sword) in the first slot and an enchantment book in the other. Let's say the book is a Sharpness II book. This should be the exact same mechanics as an anvil. If the sword has sharpness II already on it, adding the sharpness II enchantment book will make the diamond sword have sharpness III. Otherwise, add sharpness II onto it. The confusing part is this (I'll do my best to explain it). I am going to add rarities to the enchantment books. So if the book has lore on it, the plugin should NOT sense it. Here is an example of the book:
    upload_2020-7-27_13-54-42.png
    However, the plugin should not sense any attributes except for the fact that it's a sharpness II book. Sorry, this is really confusing, but in a technical sense, I will be changing the name and lore of the book. Try and sense the NBT data of the enchantment book and check if it gives the user sharpness II or not. Anyways, that's adding enchantments. If you don't understand the random enchant part or adding enchantments directly let me know. Sorry that this is so confusing. I'm bad at explaining things ;-;
     
  11. Offline

    colmalle

    Here is the plugin. If there is any bug or suggestion just open a new issue. I've just opened the project so you might need to wait until it's approved.
     
    Xp10d3 likes this.
  12. Offline

    Xp10d3

    Thank you so much! I'll do my best to test this plugin A.S.A.P. I'll let you know on any issues (if there are any). If there aren't any bugs/suggestions I'll let you know and mark this as solved. :)
     
  13. Offline

    colmalle

    Did you find any bugs?
     
  14. Offline

    Xp10d3

    Seems to be working perfectly, however I'd suggest adding infinite combinations to the anvil/cauldron recipes. I'll add that to the Bukkit page :) Marking as solved! Thanks so much <3
    EDIT: Whoops looks like there are already infinite recipes. My bad :p
     
    Last edited: Aug 1, 2020

Share This Page