[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

    Vorsath

    Hi Zarius,
    There seems to be a problem with SHEEP@THIS, White sheep keep dropping Black wool... tested a few other colours and they seem to work fine. I set verbosity to extreme and checked the logs and found no errors.
    OtherDrops 2.3-beta1
    CraftBukkit 1.1 R3 (1846)
    Code:
      SHEEP:
          - tool: ANY
            drop: [WOOL@THIS/1, PORK/1-3, XP/1]
          - tool: DAMAGE_FIRE
            flags: UNIQUE
            drop: [WOOL@THIS/50%/1, GRILLED_PORK/1-3, XP/1]
     
  3. Offline

    Zarius

    Vorsath - thanks for that, found the bug and will be fixed in the next release.

    Celtic Minstrel - didn't think of parsing the key as a list (I kinda fake-listed using "split"), will look into that.
     
  4. Offline

    Kane

    I seem to be getting this error:
    Code:
    23:14:00 [SEVERE] Could not pass event org.bukkit.event.player.PlayerInteractEvent to OtherDrops
    java.lang.NullPointerException
            at com.gmail.zariust.common.CommonMaterial.getBlockOrItemData(CommonMaterial.java:132)
            at com.gmail.zariust.otherdrops.data.SimpleData.get(SimpleData.java:237)
            at com.gmail.zariust.otherdrops.data.SimpleData.get(SimpleData.java:102)
            at com.gmail.zariust.otherdrops.subject.BlockTarget.toString(BlockTarget.java:183)
            at java.lang.String.valueOf(Unknown Source)
            at java.lang.StringBuilder.append(Unknown Source)
            at com.gmail.zariust.otherdrops.OtherDrops.performDrop(OtherDrops.java:346)
            at com.gmail.zariust.otherdrops.listener.OdPlayerListener.onPlayerInteract(OdPlayerListener.java:44)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:340)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:57)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:453)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:187)
            at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:283)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:602)
            at net.minecraft.server.Packet15Place.handle(SourceFile:39)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100)
            at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:537)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    
     
  5. Offline

    Zarius

    Kane - hmm... what version? The current code has nothing at that particular line.
     
  6. Offline

    Kane

    I might be drunk but my wiki I wrote down:
     
  7. Offline

    Zarius

    Cool, I found the spot and put extra protection in there. A log message (verbosity normal) should help work out why that happened (seems to be to do with a datavalue for treespecies?)
     
  8. Offline

    Sorken

    Using CB 1917 and OD 2.2.1

    Code:
    14:24:31 [SEVERE] Error occurred while enabling OtherDrops v2.2.1 (Is it up to date?): MONSTER
    java.lang.NoSuchFieldError: MONSTER
            at com.gmail.zariust.common.CreatureGroup.<clinit>(CreatureGroup.java:30)
            at com.gmail.zariust.otherdrops.OtherDropsConfig.isCreature(OtherDropsConfig.java:747)
            at com.gmail.zariust.otherdrops.OtherDropsConfig.parseTarget(OtherDropsConfig.java:734)
            at com.gmail.zariust.otherdrops.OtherDropsConfig.loadDropsFile(OtherDropsConfig.java:288)
            at com.gmail.zariust.otherdrops.OtherDropsConfig.loadConfig(OtherDropsConfig.java:203)
            at com.gmail.zariust.otherdrops.OtherDropsConfig.load(OtherDropsConfig.java:131)
            at com.gmail.zariust.otherdrops.OtherDrops.onEnable(OtherDrops.java:251)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:230)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:1057)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:379)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:191)
            at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:174)
            at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:357)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:344)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:175)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    
     
  9. Offline

    Zarius

    Sorken

    Thanks - fixed that already in local build, will be in next release :)
     
  10. Offline

    Sorken

  11. Offline

    Zarius

    New Version 2.3-beta2 (2012/02/06) (download)

    * remove MONSTER from group
    * fix error with WOOL@THIS (white sheep dropped black wool)
    * honor mobarena protection
    * support multiple enchantments for tools (not levels yet)
    * minor fixes and NPE catching
     
  12. Offline

    Celtic Minstrel

    It's possible you already know this, but it may now be possible to implement the DEFAULT drop as a normal drop; check out Block.breakNaturally(ItemStack).
     
  13. Offline

    Zarius

    Hmm, not sure this helps us. Default drops are already normal drops (as in DEFAULT just means that the event doesn't get cancelled). What we really need is BlockBreakEvent.drops().clear(); so that we don't need to cancel the event just to cancel the drop.
     
  14. Offline

    Celtic Minstrel

    Yeah, but what I meant is that you could maybe have an actual drop class for DEFAULT. There may be additional complications making this impractical though.
     
  15. Offline

    kahlilnc

    Is it possible to drop exp from blocks with this plugin? I swear I saw it say so in the wiki some where before but I looked again and cant find it again :(
     
  16. Offline

    Zarius

    Yup. Example:
    Code:
      STONE:
        - drop: XP
          quantity: 10
          chance: 50%
    
     
    kahlilnc likes this.
  17. Offline

    kahlilnc

    lol :( Im dumb. . . Yet so simple
     
  18. Offline

    Zarius

    Nah, there's a lot of options so it's not always obvious what you can and can't do :) Have you looked over the documentation on BukkitDev? The wiki is kinda out of date.
     
  19. Offline

    Zarius

    Release 2.3-beta3 (download)
    * fix another NPE due to measuring "range" between two worlds (and refactor "range" safety checks into one function)
    * fix od-goldtools-basic.yml (allows you to gather ice which will produce water in nether) to drop: NOTHING in nether
    * add default_dropspread option to otherdrops-config.yml
    * fix issue where drops without a drop (eg. just a message or an event) overrode default drop
    * allow setting "default_dropspread" in config file (false means drops will be one stack unless override with a dropspread
    * handle custom damage (fixes BukkitDev ticket 65 - MCMMO custom damage causing NPE)
    * fix hawkeye logging so it only occurs on Action.BREAK

    Be careful with this one - I had to change a lot to fix the issues with drops without a drop overriding default drop. I ran it through a full test but still could have missed something - please let me know if there are any issues.
     
  20. Offline

    H34DSH07

    I want to make a 'job' plugin out of your plugin. How can I make that only certain people that are in a group can get a drop from certain mobs/blocks if I am using bPermissions? If I can't using bPerm then how can I do that? Do the bukkit permissions work just as good? Why don't you add support for bPerm?

    Thank-you.

    Oh, nvm I just went into the config and saw the yetipermissions. I tried turnning it on and surprisingly I guess it works with bPermissions now. Thank-you for supporting bPerm even if I guess it was not wanted. ;)

    I really love that plugin btw. Keep updating! :D

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

    Zarius

    I haven't really tried bPermissions - I thought it would work with the Bukkit Perms (ie. yetipermissions off) but glad it works with yetipermissions on :)
     
  22. Offline

    Celtic Minstrel

    bPermissions supports superperms, so you shouldn't need yetiperms enabled.
     
  23. Offline

    Zarius

    Release 2.3-beta4 (download)

    * fix NPE when using DEFAULT drop
    * add "disable_xp_on_non_default" to stop mobs dropping XP if no default drop is added
    * allow DENY to work with explosions (denies the particular block type from exploding)
    * fish_caught "drops" are now thrown at the player from the location caught (ie. fishing rod sinker)
    * fix for some cases when logging (logblock/hawkeye/bigbrother) would log two messages for one event
     
  24. Offline

    H34DSH07

    Well it wasn't working before... But anyways it's working properly now
     
  25. Offline

    kaasinees

    Code:
    14:21:16 [INFO] [OtherDrops] Loading OtherDrops v2.2.1.
    14:21:16 [INFO] [OtherDrops:2.2.1] Events node created.
    14:21:16 [INFO] [OtherDrops:2.2.1] Events loaded: [EXPLOSION, LIGHTNING, STORM, THUNDER, SHEAR, UNSHEAR, SHEARTOGGLE, DYE, TREE, FORCETREE]
    14:21:16 [INFO] [OtherDrops:2.2.1] Loading file: otherdrops-drops.yml
    14:21:16 [INFO] [OtherDrops:2.2.1] Loading file: includes/od-fix_undroppables.yml
    14:21:16 [SEVERE] Error occurred while enabling OtherDrops v2.2.1 (Is it up to date?): MONSTER
    java.lang.NoSuchFieldError: MONSTER
            at com.gmail.zariust.common.CreatureGroup.<clinit>(CreatureGroup.java:30)
            at com.gmail.zariust.otherdrops.OtherDropsConfig.isCreature(OtherDropsConfig.java:747)
            at com.gmail.zariust.otherdrops.OtherDropsConfig.parseTarget(OtherDropsConfig.java:734)
            at com.gmail.zariust.otherdrops.OtherDropsConfig.loadDropsFile(OtherDropsConfig.java:288)
            at com.gmail.zariust.otherdrops.OtherDropsConfig.loadDropsFile(OtherDropsConfig.java:310)
            at com.gmail.zariust.otherdrops.OtherDropsConfig.loadConfig(OtherDropsConfig.java:203)
            at com.gmail.zariust.otherdrops.OtherDropsConfig.load(OtherDropsConfig.java:131)
            at com.gmail.zariust.otherdrops.OtherDrops.onEnable(OtherDrops.java:251)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:230)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:1057)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:380)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:199)
            at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:182)
            at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:357)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:344)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:175)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    
    Code:
    >plugins
    14:23:40 [INFO] Plugins: Backup, BKCommonLib, MobCatcher, SnoGro, My Worlds, DwarfForge, OtherDrops, DragonTravel
     
  26. Offline

    maller

    You should upgrade to the latest beta version. http://dev.bukkit.org/server-mods/otherdrops/
     
  27. Offline

    Zarius

    Yup, that bug's fixed in the newest version.
     
  28. Offline

    kaasinees

    alright thats fixed.
     
  29. Offline

    Sorken

    Zarius
    Using v2.3-Beta2:
    Dropping a MONSTER_EGG@THIS from a CREATURE_BLAZE will not work. It results in a 383 generic egg which cant be used. Other mobs seem to work but i have not tested all yet though.
     
  30. Offline

    Zarius

    Release 2.3-beta5 (download link on BukkitDev page, link in top post)
    • fix bug where player drops if configured would override default drop and clear the players inventory on death
    • add WHEAT as alias for CROPS & SEED as alias for SEEDS
    • fix NPE in onPlayerInteract where item in player hands is null (shouldn't happen, as empty hands is Material.AIR - not null, but it does)
    • add BLOCK_DAMAGED as alias for LEFT_CLICK action
    • remove a debug message for enchantments that showed on each config reload
    • fix NPE where currentEvent.getTool().getShooter() is null (shouldn't happen, will investigate cause later)


    Sorken - thanks for that - I've replicated the issue with blaze/spawn-eggs and will look into it for the next release.
     
  31. Offline

    kaasinees

    please a direct link to a jar file?​
     

Share This Page