[MECH] OtherDrops 2.8- Ultimate block/mob/player drop editing [1.5.2]

Discussion in 'Archived: Plugin Releases' started by Zarius, Jun 12, 2011.

  1. Offline

    Zarius

    [​IMG]


    Want to fix glass/stairs/boat drops? Want to gather ice/glowstone/grass in a balanced manner? Want to smelt ore with golden tools? Want to cause chaos with undead that rise again? Now you can, simply by enabling the included example files or delve into the more advanced customisation and make drops work the way you want.

    OtherBlocks aims to give you ultimate control over what item that blocks/entities drop when destroyed, depending on how they were destroyed. Compatible with WorldGuard. Lightweight! Only scans what it needs to and ignores the rest.
    Download: BukkitDev (download link on there) | Source Code

    Included Modules
    * Fix undroppables: fix drops for stairs, glass (don't use your hands - ouch), boats & bookshelves (1.8 stairs included)
    * Gold tools (basic): gold tools have a chance of dropping the complete block for grass, ice & glowstone.
    * Gold tools (smelt): gold tools have a chance of mining an ingot directly from ores.
    * Ore Extraction: using the usual tools, ingots are ripped out of ores, leaving the stone behind.
    * Leaf overhaul: adds leaf drops (apples, cocoa, leaves, sticks & a very small chance of golden apple).
    * Undead Chaos: beware the night! Zombies & skeletons rise again and even players rise back from the dead (player deaths spawn more zombies/skeletons).
    * and more...

    Custom Configuration Examples
    Code:
        # Simple glass drop fix
        GLASS:
          - drop: GLASS
     
        # Players drop Zombies on death, 50% of the time
        PLAYER:
          - drop: CREATURE_ZOMBIE
            chance: 50%
     
        # Spiders killed with any sword at night have a 10% chance to drop web,
        # otherwise they drop whatever they normally would
        CREATURE_SPIDER:
          - tool: ANY_SWORD
            time: NIGHT
            drop: WEB
            chance: 10%
     
        # Trees drop apples (or cocoa from birch trees)
        SPECIAL_LEAFDECAY@GENERIC:
          - drop: APPLE
            chance: 5%
        SPECIAL_LEAFDECAY@BIRCH:
          - drop: DYE@BROWN
            chance: 5%
    
    If you are getting errors with the word "snakeyaml" in it, your config file isn't properly formatted.
    Test it on this website (or this one).

    See the dev.bukkit page for full details on how to set up OtherDrops, a complete parameters list and further examples.


    Changelog

    Newest changelog details here.


    Main author: @Zarius
    Contributors: @Celtic Minstrel, raws
    Original author: @cyklo
     
  2. Offline

    _Vegar_

    Cool plugin, I'll test it out.
     
  3. Offline

    Zarius

    Thanks, hope it suits your needs - let me know if you need help with anything.

    @ Everyone:
    current status: 2.8 alpha release soon - some small optimisations (remove obselete Register & Profiling classes, only register listeners if a config for that type exists, etc), support for drop: NOXP or NOITEMS (as currently drop: NOTHING clears both), and ZOMBIE@BABY as drop or target - eg:

    Code:
        GRASS:
          - drop: ZOMBIE@BABY
     
        ZOMBIE@ADULT:
          - drop: DIAMOND
     
        ZOMBIE@BABY:
          - drop: EMERALD
    
    Will add options for other baby animals at a later date (or earlier if specific mobs requested),

    Also, I'm planning on adding more details to items and mobs: lorename/text, book title/author/pages, leather armor color & skull owners for items - and for entities: equipmenthead/chest/legs/feet/held, health/maxhealth/damage?/passenger.
    Since it's too hard to fit all these into a single "drop: mob@eq...../health/damage/etc..." line I'm planning on adding a "customitem" and "custommob" section to create an alias, eg:
    Code:
    customitem:
      mybook:
        lorename: ...
        loredesc: ...
        title: ...
        etc
    custommob:
      zombieWithArmour:
        eqHead: item/chance
        eqLegs: item/chance
        health: ...
        etc
    otherdrops:
      grass:
        - drop: mybook
        - drop: zombieWithArmour
    
    Any comments, suggestions, or improvements on how this can be done better are welcome. Also, let me know if you can think of other special info that would be useful in these sections.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  4. Offline

    Zarius

    Ok, worked on a completely different bit for a while :D

    2.8-dev1 build is <Edit by Moderator: Redacted mediafire url>

    * CreatureData overhaul - big change to how CreatureData is handled, alllows for:
    ** Villager professions and "baby" status - eg. VILLAGER@BUTCHER, VILLAGER@LIBRARIAN!BABY or just VILLAGER@BABY.
    ** Ocelot "baby" status and make config easier/more resilient (can be OCELOT@RED!TAME!BABY or wild!BLACK, etc). Config is OCELOT@<type>!<wild or tame>!<baby - optional> order of type/wild/baby doesn't matter.
    ** added Zombie "baby" status, "villager" status and maxhealth (any number given) - eg. (ZOMBIE@VILLAGER!BABY!20). This can be used in both the drop and the target, eg:
    Code:
        GRASS:
          - drop: ZOMBIE@20  # zombie with maxhealth 20
     
        ZOMBIE@20:   # drop TNT, _only_ for maxhealth 20 zombies.
          - drop: TNT
    
    * shift dependency loading to a separate class - more consistent
    * only register event listeners if a config for that type of event exists
    * remove obselete Register, useYetiPermissions & Profiler sections
     
    Last edited by a moderator: Nov 27, 2016
  5. Offline

    jorisk322

    Zarius It's nice to see you got back to coding this plugin again. Glad to have you back, and thanks for this amazing plugin!
     
  6. Offline

    Zarius

    [quote uid=7904 name="jorisk322" post=1538572]Zarius It's nice to see you got back to coding this plugin again. Glad to have you back, and thanks for this amazing plugin![/quote]

    Thanks, glad your enjoying it - new release coming up :)


    New Release - 2.8-Beta1 (download [<Edit by Moderator: Redacted mediafire url>

    * CreatureData overhaul - big change to how CreatureData is handled, alllows for:
    ** Villager professions and "baby" status - eg. VILLAGER@BUTCHER, VILLAGER@LIBRARIAN!BABY or just VILLAGER@BABY.
    ** Baby: chicken, cow, pig, mushroom_cow (note: sheep & wolf not added yet due to complexities)
    ** Ocelot "baby" status and make config easier/more resilient (can be OCELOT@RED!TAME!BABY or wild!BLACK, etc). Config is OCELOT@<type>!<wild or tame>!<baby - optional> order of type/wild/baby doesn't matter.
    ** added Zombie "baby" status, "villager" status and maxhealth (any number given) - eg. (ZOMBIE@VILLAGER!BABY!20). This can be used in both the drop and the target, eg:
    Code:
        GRASS:
          - drop: ZOMBIE@20  # zombie with maxhealth 20
     
        ZOMBIE@20:  # drop TNT, _only_ for maxhealth 20 zombies.
          - drop: TNT
    
    *
    ** Skeleton: support wither.
    ** Skeleton: default to holding bow.
    ** Skeleton: test version of equipment config (allows for setting all armour slots and holding, any item including datavalues and enchantments) - format is SKELETON@eq:<slot>:<material>@<data>\!<enchantment>#<ench level><<dropchance>!!<next slot....>. Yes, there is a "<" character before the dropchance and you do need "!!" rather than "!" as the main separator and "\!" as the separator before any enchantments - couldn't process the config properly any easier way. Here's an example:

    Code:
      SAND:
        - drop: SKELETON@eq:head:DIAMOND_HELMET@\!THORNS<50!!eq:hands:DIAMOND_SWORD@\!DAMAGE_ALL#3<50
    
    * fix a NPE error occuring when using "message.server" for leaf decay
    * allow creature aliases, added alias "witherskeleton" = "skeleton@wither"
    * shift dependency loading to a separate class - more consistent
    * only register event listeners if a config for that type of event exists
    * remove obselete Register, useYetiPermissions & Profiler sections
     
    Last edited by a moderator: Nov 27, 2016
  7. Offline

    Abnormal Zombie

    Zarius This plugin is amazing! But it cannot do some things which skript can, like enchanting any type of item and not just armor/tools. Could you please allow any type of item to be enchanted? Thanks.

    I have since thought of a few more ideas:

    - If "action: SPAWN" could be implemented, we could customize mobs as they appear naturally (I know it isn't exactly related to your plugin, but it is awesome).

    -A "potion: <effect>/<duration>" parameter for mobs!

    -A parameter such as "cancel: true", which will cancel the break/death/event in the first place if the other given parameters are true. Therefore I could stop creepers from killing eachother:
    Code:
    CREEPER:
          - tool: CREEPER
            cancel: true
    PS: I cannot wait for the new changes specified 4 posts above! Especially the armor colors, since I want specific armor colors to each have unique effects on my server, and will be rare drops from mobs.
     
  8. Offline

    Zarius

    Abnormal Zombie

    You mean like this: [​IMG] :D Not sure that it actually does anything but I could add an option to use unsafe enchantments... or possibly just make that the default...

    Yeah, was thinking about the action: SPAWN - if I'm going to be watching spawn events anyway for the mobspawner (planning on making a spawn condition with MOBSPAWNER, OTHERDROPS & NATURAL options) I may as well add an action for it (it since it wont even register the listener unless something is configured it wont effect other users).
     
  9. Offline

    Abnormal Zombie

    Yes, like that :D. The reason is I'd like to have rare melon slices with sharpness 3, rare feathers to have silk touch, creeper heads to have explosive resistance 4, and custom enchanted books. I also edited my previous post, which I added another idea or two to.
     
  10. Offline

    Zarius

    Would this apply the potion effect to the mob? Should be able to do that.

    I believe that "drop: DENY" should already work that way - I can't test it out at the moment, will check it out later.
     
  11. Offline

    Abnormal Zombie

    Zarius Yes; regarding the potion effect. "drop: DENY" does not work. A creeper can still kill a creeper using this unfortunately.

    NOTE: The following information is based off of testing inside of an included file (under "include-files:")

    Bugs:
    - tool: PLAYER does nothing
    - tool: ANY_OBJECT does nothing (note: there could be other tools which have no effect)
    - permissions don't rule out everything but a PLAYER (since only players can have permissions)
    - TINY, SMALL, LARGE, and HUGE sizes don't seem to work for the Magma cube and possibly slime as well.
    - "effect:" under "defaults:" has no effect - pun not intended. I was not using a hyphen.
    - "tool:" may not have any effect under defaults, I don't understand the conditions.
    - "defaults:" is really messed up. Adding parameters there seems to have odd results (and no, I am not using a hyphen). EDIT(regarding defaults): This may have had something to do with where I was placing #notes. Still needs some further investigating though.

    PS: ENDER_SIGNAL does work.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  12. Offline

    Zarius

    Abnormal Zombie


    A heap of stuff for me to check! :D But many thanks for looking into it. Will test the drop: DENY & slimes/magma-cube.


    Defaults currently only contains a subset of common conditions, currently the following:


    Show Spoiler
    Code:
    defaultWorlds = parseWorldsFrom(defaults, null);
    defaultRegions = parseRegionsFrom(defaults, null);
    defaultWeather = Weather.parseFrom(defaults, null);
    defaultBiomes = parseBiomesFrom(defaults, null);
    defaultTime = Time.parseFrom(defaults, null);
    defaultPermissionGroups = parseGroupsFrom(defaults, null);
    defaultPermissions = parsePermissionsFrom(defaults, null);
    defaultHeight = Comparative.parseFrom(defaults, "height", null);
    defaultAttackRange = Comparative.parseFrom(defaults, "attackrange", null);
    defaultLightLevel = Comparative.parseFrom(defaults, "lightlevel", null);
    defaultAction = Action.parseFrom(defaults, defaultAction);
    



    I could add effect but then there'd be a lot of other actions I'd be missing. I'll have to think about ways to improve that section to maybe automatically support defaults for any parameter.



    Not sure what you mean by tool: PLAYER = tool: ANY - do you mean that tool: PLAYER will still drop something if the mob falls off a cliff (for example)?


    Yeah, I agree that permissions should default to only players, will look into that.



    You mean default: permission breaks default: tool? Odd, I didn't think there was a default: tool. If you mean default: permission breaks the tool parameter later on that could happen but still odd as there's no interaction that I can see between permissions and tools in the config loading.


    edit: grr - spoiler refused to close properly - until I worked out I put /spoiler and /code the wrong way around :D
     
  13. Offline

    Abnormal Zombie

    Zarius
    Sorry, the format I had my post in at the time you saw it was bad (the threads seem to take a while to update). It's easier to understand now.

    But since you explained that not all conditions are under defaults, some of the problems I came across are solved.
     
  14. Offline

    Zarius

    [quote uid=49373 name="Abnormal Zombie" post=1545315]NOTE: The following information is based off of testing inside of an included file (under "include-files:")

    Bugs:
    - tool: PLAYER does nothing
    - tool: ANY_OBJECT does nothing (note: there could be other tools which have no effect)
    - permissions don't rule out everything but a PLAYER (since only players can have permissions)
    - TINY, SMALL, LARGE, and HUGE sizes don't seem to work for the Magma cube and possibly slime as well.
    - "effect:" under "defaults:" has no effect - pun not intended. I was not using a hyphen.
    - "tool:" may not have any effect under defaults, I don't understand the conditions.
    - "defaults:" is really messed up. Adding parameters there seems to have odd results (and no, I am not using a hyphen). EDIT(regarding defaults): This may have had something to do with where I was placing #notes. Still needs some further investigating though.

    PS: ENDER_SIGNAL does work.[/quote]

    Ok, fixed a couple of things:

    * tool: PLAYER and ANY_OBJECT were the same. I've fixed this any PLAYER should now match any object & any projectile whereas ANY_OBJECT just matches any object. Although - phew, was it complicated fixing it :D
    * Slime tiny/small/etc worked fine but the code wasn't complete for Magmacubes - I've fixed this.
    * defaults: is still just conditions for now - how were you intending to use tool/effects in "default"?

    Release - 2.8-beta2 (waiting on dev.bukkit.org approval - brave souls can try the unapproved version <Edit by Moderator: Redacted mediafire url>

    * add "spawnedby" condition - will check against any possible SpawnReason and custom reasons (eg. "OtherDrops"). Example:
    Code:
    COW:
    - spawnedby: OTHERDROPS
    drop: DIAMOND
     
    - spawnedby: SPAWNER_EGG
    drop: GOLDINGOT
     
    - tool: ANY
    drop: SNOWBALL
    
    * add OtherDrops-config.yml options: "enchantments_use_unsafe" (add any enchant to any item/tool) and "enchantments_ignore_level" (ignore enchant start/max level) - eg. "drop: diamond_pickaxe@!dig_speed#50" or "feather@!damage_all#3".
    * add WolfData - now supports baby, maxhealth, tamed/untamed, angry/neutral & collar color - eg. wolf@tamed!blue (for blue collar) or wolf@baby.
    * fix MagmaCube data so magmacube@tiny or small, normal, huge now works
    * fix tool: PLAYER (now correctly matches any object or projectile) and ANY_OBJECT (now correctly matches any object and not environmental or other creature damage)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 27, 2016
  15. Offline

    Abnormal Zombie

    Zarius I was wanting to use effect: ENDER_SIGNAL under defaults so that it applies to all of the drops in the .sk file I had (which were spawner eggs, requiring a permission which only high donators would receive) - just so that I didn't have to apply it to all of the drops individually.

    The only reason I tried using tool: PLAYER under defaults was because the permission: eggs didn't seem to rule out the drop from occurring from every other form of death non-player related. Not like it mattered though, since tool: PLAYER didn't do what it was suppose to at the time.

    PS: You are awesome

    [quote uid=29094 name="Zarius" post=1545881]Release - 2.8-beta2 (waiting on dev.bukkit.org approval - brave souls can try the unapproved version <Edit by Moderator: Redacted mediafire url>

    * add "spawnedby" condition - will check against any possible SpawnReason and custom reasons (eg. "OtherDrops"). [/quote]
    So I can use spawnedby: -SPAWNER instead of msir.not now :D EDIT: negative matches don't work :/

    [quote uid=29094 name="Zarius" post=1545881]
    * fix tool: PLAYER (now correctly matches any object or projectile)[/quote]
    Doesn't that mean that a projectile from another mob can trigger the event as well?

    EDIT: lore names for dropped items (such as drop: DIAMOND_SWORD@!Player Slayer) don't work because they get confused for enchantments. Also, is it possible to get player heads to drop and look like the player head it belongs to, or do I (currently) need another plugin for that?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 27, 2016
  16. Offline

    Zarius

    Will look into adding "effect" to defaults and "tool" too (if it's not too difficult), still got the permissions thing to check & thanks :)

    It was very late - I had to stop somewhere :D Will be looking into allowing lists and negatives soon. You can try this in the meantime:

    Code:
      ZOMBIE:
        - drop: DIAMOND
     
        - spawnedby: SPAWNER
          drop: NOTHING
          flags: UNIQUE   # this will override the other drops and therefore drop nothing if from a mobspawner
    
    Sorry, should have made it more clear - PLAYER = any object and any projectile (from players only) - test skeletons killing mobs and it correctly ignored that.

    Lore names need a ~ - eg. "drop: diamondsword@!~Player Slayer".

    Player owned heads are not yet possible (haven't really looked into metadata for items yet) but planned.
     
  17. Offline

    Abnormal Zombie

    Oops. I meant to say ".yml file".

    Ohhh... didn't think of that! Thanks.

    Thank you! There are so many possibilities with the lore names. :)
     
  18. Offline

    Zarius

    No worries, knew what you meant :)

    Hmm... a thought occured to me, since you can now put helmets on skeletons I wonder if you can put a player/zombie/creeper/etc head on instead? :D
     
  19. Offline

    Abnormal Zombie

    A lore name won't work when it is after a data value (and perhaps other values as well).
    In the following example a creeper should drop a creeper head named "Mr Creeps":
    Code:
      CREEPER:
          - drop: 397@4!~Mr Creeps
    
    I also noticed the console will always get an error even if the lore name is working.
    Code:
    [INFO] [OtherDrops:2.8-beta2] Enchantment (=>) not valid.
    
     
  20. Offline

    Zarius

    Abnormal Zombie

    Looks like I have more testing to do - will try that out tonight and look into the enchantment message.
     
  21. Offline

    Abnormal Zombie

    Zarius So I have creepers which drop creeper heads with blast protection 10 under certain conditions (drop:397@4!PROTECTION_EXPLOSIONS#10)... but I want the item to keep the enchantment after placing and breaking it off of the ground - so I did this:
    Code:
      144@4:
          - drop: 397@4!PROTECTION_EXPLOSIONS#10
    
    EDIT: As it turns out, the SKULL block (ID: 144) can't have a data value, therefore there is no way to identify that the block being broken is a creeper head. Perhaps the values SKELETON, WITHER, ZOMBIE, PLAYER and CREEPER could be placed after SKULL to determine what type of head it was. Example:

    Code:
      SKULL@CREEPER:
          - drop: 397@4!PROTECTION_EXPLOSIONS#10
    
    This page might help http://jd.bukkit.org/rb/apidocs/org/bukkit/SkullType.html
     
  22. Offline

    Zarius

    Ok, I can see that I'll need to cast the block to a "Skull" specific class and use .setSkullType (this page here). Will look into that too as time permits.

    Oh, and raw id's need to be used like "144@4": because the Bukkit YAML config reading stuff doesn't like it if it's an integer (although the @ in the middle might be enough to make it think it's a string).
     
  23. Offline

    Abnormal Zombie

    Show Spoiler

    [​IMG]
    [​IMG]
    [​IMG]

    lol

    - EXPLOSION_TNT won't work as a tool parameter for a block. I'll be testing more explosion related tools (I think I remember a couple explosive damage types which were applicable for players/creatures that didn't work).

    EDIT: It's just EXPLOSION_FIREBALL and EXPLOSION_TNT which don't work. ANY_EXPLOSION does work in place of both of them though.

    - If you don't want the default drops to occur, but instead want another drop with a chance, you have to specify a drop NOTHING always last. Example:
    Code:
      BLAZE:
          - drop: [COAL/10%, NOTHING]
    
    If NOTHING is specified before the COAL/20%, the default drop will happen whenever coal does not drop, therefore NOTHING won't have an effect.

    - For some reason a dropgroup will create a blank line of text in the client.

    - A player can log out and back in to reset the spawnedby value of any mobs which were present.

    - The enchantment level of a tool under the parameter tool won't have any effect.

    For anybody else reading, don't get the wrong idea from some of these bugs. This is one of the most important plugins my server is using.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  24. Offline

    Zarius

    Ok, I've fixed the lorename so it works with data values, spawnedby now uses a list (eg. [NORMAL, OTHERDROPS] or [-SPAWNER]), removed the "invalid enchantment" message that appears with lorenames and no enchantment and added some extra data value support - wood/wood slab (oak/birch/etc), cobble wall (cobble/moss), sandstone (cracked/glyphed/smooth) and changed smooth_brick@circle to chiseled (circle is still an alias).

    Didn't manage to add the Skull block variations - because it doesn't use the usual data values it's gonna require a rethink of that section of code to fit it in, will keep working on that later.

    It's just EXPLOSION_FIREBALL and EXPLOSION_TNT which don't work. ANY_EXPLOSION does work in place of both of them though.

    I'll look into the specific explosion conditions.

    If you don't want the default drops to occur, but instead want another drop with a chance, you have to specify a drop NOTHING always last. Example:
    Code:
    BLAZE:
    - drop: [COAL/10%, NOTHING]
    If NOTHING is specified before the COAL/20%, the default drop will happen whenever coal does not drop, therefore NOTHING won't have an effect.

    I must admit, I've not used NOTHING in a group like that, I always specific it as a separate drop (eg. - drop: NOTHING, - drop: COAL/10%). Will look into it.

    For some reason a dropgroup will create a blank line of text in the client.

    I think this is a debug message supposed to show the name of the dropgroup - will fix and move to an appropriate verbosity.

    A player can log out and back in to reset the spawnedby value of any mobs which were present.

    Odd, I didn't think that would happen as I'm storing the value in the entity's metadata - I though that would only reset when the whole server reset. Did you test it with just one player or multiple players on the server? Will test it out tonight.

    - The enchantment level of a tool under the parameter tool won't have any effect.

    Will check this out.

    For anybody else reading, don't get the wrong idea from some of these bugs. This is one of the most important plugins my server is using.

    Abnormal Zombie
    Thanks heaps for the feedback - when trying to cover the multitude of datavalues, conditions, actions and different interactions it's hard to catch everything. Reports like this help a lot :)
     
  25. Offline

    Abnormal Zombie

    I was testing it with one player, but I just tested it with another (with each player in a separate world), and I got the same results.
     
  26. Offline

    Zarius

    Can you try it with both players in the same world? I suspect that it'll work ok if you only log one out - seems like it's removing the metadata when the world is unloaded :( I could try a different way using an internal list (as long and the entity unique ID's don't change with the world unload...) but using the metadata would have let other plugins add a custom spawnreason.
     
  27. Offline

    Abnormal Zombie

    I tested two players in the same world (nether) and had one log out. Each player was not within viewing distance of eachother, and I got the same result. I'm guessing that since the mobs are being unloaded then reloaded, they are losing their unique ID's which correspond to what they spawnedby.

    EDIT: Just checking... after a mob dies you have set it so it's unique ID is no longer related to a spawn reason right? Would it also be reset if I were to do something such as /butcher?
     
  28. Offline

    Zarius

    Not sure about the unique IDs yet - I'll have to test that. I'm currently using metadata rather than the unique IDs - I knew the metadata was temporary (ie. lost on server restart) but I guess it's more temporary than I thought.
     
  29. Offline

    Abnormal Zombie

    Zarius
    - Unlike everything else, the wither skeleton will always drop it's default drops (the wither skeleton might not be the only mob).
    - If the same object which drops originate from is written more than once in the same .yml file, the last one will overwrite any others. - The reason I was doing this was so I could organize my stuff into sections, since it's getting a little complicated. This isn't a problem though.
    - DEFAULT has to be at the end of a drop group just like NOTHING, or it will have no effect (I actually don't think these are much of a problem at all).
    -GAHH! Enchanted books with enchantments actually make the books themselves enchanted (drop: 403@!DAMAGE_ALL#5). A regular enchanted book will have a yellow name (to distinguish the difference). - Basically an enchanted book shouldn't do any damage with the enchantment sharpness 5 for example (and doesn't if gotten from creative mode).
     
  30. Offline

    Zarius

    Unlike everything else, the wither skeleton will always drop it's default drops (the wither skeleton might not be the only mob).

    Odd, will look into it.

    If the same object which drops originate from is written more than once in the same .yml file, the last one will overwrite any others. - The reason I was doing this was so I could organize my stuff into sections, since it's getting a little complicated. This isn't a problem though.

    Yeah, that's a limitation of YAML files. Can't do anything about that without changing the whole config layout and we'd lose some other benefits (like YAML aliases). I highly recommend checking out the page on OtherDrops aliases (here) if you have a complicated config. Separating things into separate files can also help.

    I'll keep in mind to see if I can make the limitation more apparent in the documentation.


    - DEFAULT has to be at the end of a drop group just like NOTHING, or it will have no effect (I actually don't think these are much of a problem at all).

    Will check that one too - I should get it working, for the sake of consistency at least.

    GAHH! Enchanted books with enchantments actually make the books themselves enchanted (drop: 403@!DAMAGE_ALL#5). A regular enchanted book will have a yellow name (to distinguish the difference). - Basically an enchanted book shouldn't do any damage with the enchantment sharpness 5 for example (and doesn't if gotten from creative mode).


    Abnormal Zombie

    Be careful editing previous posts - easy to miss (took me a while to see what had changed). Yes, that's be design :D The current enchantment stuff only adds the enchantment to the item in question.

    As for books that add enchantments to other items that will have to wait until I get the customitem/custommob section up and running which is a lot more complicated (as it effects a lot of different areas of the code). When it's done though you should be able to define custom books with title/author/text/enchantments and use those as a droppable object.

    Missed this bit:

    EDIT: Just checking... after a mob dies you have set it so it's unique ID is no longer related to a spawn reason right? Would it also be reset if I were to do something such as /butcher?

    Not using the UUID's yet but when I do, I intend to remove them from the list upon death. /butcher should work but if it doesn't then OtherDrops isn't seeing the death anyway so it doesn't matter.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  31. Offline

    Abnormal Zombie

    Zarius When you start working on the enchanted books I think this page might help: http://jd.bukkit.org/rb/apidocs/org/bukkit/inventory/meta/EnchantmentStorageMeta.html

    PS: Did you see the edit I did on my post #2303? :rolleyes: EDIT: nvm, you got to it before I made this post lol.

    If OtherDrops doesn't see the death, but still has saved information from the mob when it spawned, wouldn't there be lots of information being made but not deleted after a while?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016

Share This Page