[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

    Retrophaze

    Can I use this to make it so only selected players spawn skelletons on death?
     
  3. Offline

    Zarius

    Yes, you can use PLAYER@NAME:
     
  4. Offline

    RugRats

    Did you get my message with the bug video?
     
  5. Offline

    Zarius

    Yes, but can't watch the video until I get home tonight.
     
  6. Offline

    RugRats

    Okay there a torch on the side of dirt block and then theres a grass block and if you try to till the grass block it wont let you because the torch is in the way but you can still get unlimited seeds
     
  7. Offline

    Zarius

    Odd one, will test it out tonight.
     
  8. Saw this today, its rare tho.

    Code:
    15:01:21 [SEVERE] Could not pass event ENTITY_DEATH to OtherBlocks
    java.util.ConcurrentModificationException
            at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819)
            at java.util.ArrayList$Itr.next(ArrayList.java:791)
            at org.bukkit.craftbukkit.CraftWorld.getPlayers(CraftWorld.java:555)
            at com.gmail.zariust.bukkit.otherblocks.OtherBlocksDrops.getPlayerFromWeapon(OtherBlocksDrops.java:576)
            at com.gmail.zariust.bukkit.otherblocks.OtherBlocksDrops.checkDrops(OtherBlocksDrops.java:161)
            at com.gmail.zariust.bukkit.otherblocks.OtherBlocksEntityListener.onEntityDeath(OtherBlocksEntityListener.java:113)
            at org.bukkit.plugin.java.JavaPluginLoader$59.execute(JavaPluginLoader.java:656)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at net.minecraft.server.EntitySheep.q(EntitySheep.java:36)
            at net.minecraft.server.EntityLiving.die(EntityLiving.java:447)
            at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:391)
            at net.minecraft.server.EntitySheep.damageEntity(EntitySheep.java:21)
            at org.bukkit.craftbukkit.entity.CraftLivingEntity.damage(CraftLivingEntity.java:177)
            at com.gmail.nossr50.skills.Swords.bleedSimulate(Swords.java:269)
            at com.gmail.nossr50.mcTimer.run(mcTimer.java:103)
            at java.util.TimerThread.mainLoop(Timer.java:555)
            at java.util.TimerThread.run(Timer.java:505)
    
     
  9. Offline

    Zarius

    Yeah, I think I know what that one is. In "getPlayerFromWeapon" I loop through a list of players I get from the server (because I couldn't find a "getPlayerByName" function).

    This is pretty quick but if someone logs of in the middle of this then you'll see that error. Not sure of a way around this - I can pass the player directly from the damage event to the kill event but there are potential (rare) issues with that too if players log out.
     
  10. Offline

    Celtic Minstrel

    Um, what about Server.getPlayer(String)?
     
  11. Offline

    Dothackking

    I couldn't get this plugin to force Cobwebs (Data value WEB?) to drop NOTHING. They always dropped string.
     
  12. Offline

    Zarius

    Thanks, found that players drops were broken-fixed in 1.92.

    Celtic Minstrels suggestion worked, this particular bug should be guided in 1.92.

    Thanks, I was trying to use world.

    Will test that tonight.
     
  13. Offline

    RugRats

    Bug: If you punch log (destroy it) it takes 1 of whatever you have in your hand away.
     
  14. Offline

    Zarius

    Isn't that the same as the last bug you posted? Should be fixed in 1.92, can you test the latest version?

    New release:
    Version 1.92 (2011/08/16)
    * fixed bug with clickright/clickleft defaulting to "damagetool: 1"
    * fixed player drops (NullPointerException)

    * fixed rare ConcurrentModificationException

    Please note that PLAYER drops were broken in 1.9 - now fixed.
     
  15. Offline

    Meteo

    Can anyone help me? I'm using itemcraft for guns, and when i use the bullets to kill, i get no drops, and if i use the gun for melee it drops. Can anyone please make it so that they drop regardless of what you use?
     
  16. Offline

    Zarius

    Hmm.. that's a new one :) So you have the tool set to the gun? eg.

    Code:
        CREATURE_ZOMBIE:
            - tool: gunid
              drop: mything
              range: ">3" # make sure the player is more than 3 blocks away to avoid allowing melee.
    
    Yes, this will still work if you hit them with the gun but should also work if you shoot them with it too. You can then use the "range" condition to make sure they shoot them from a distance (not sure what the max melee range is, I think it's 3).

    Let me know if this doesn't work.
     
  17. Offline

    Meteo

  18. Offline

    Celtic Minstrel

    I suspect it may not be possible as it currently stands to detect a custom type of projectile, because unlike items, projectiles don't (as far as I know) have a unique ID associated with them. The same applies to custom mobs.
     
  19. Offline

    Meteo

    Can't it be so that they drop by anything? including anything not even possible or not, fist, herobrine, etc.
     
  20. Offline

    Celtic Minstrel

    Custom blocks are almost certainly fully supported (but only by their IDs); custom entities (which includes mobs, vehicles, and projectiles) are probably not.
     
  21. Offline

    Zarius

    Confirmed (only if you have something configured for the log) - working on a fix :)
     
  22. Code:
    15:41:29 [SEVERE] Could not pass event PAINTING_BREAK to OtherBlocks
    java.lang.NullPointerException
            at com.gmail.zariust.bukkit.otherblocks.OtherBlocksDrops.checkDrops(OtherBlocksDrops.java:203)
            at com.gmail.zariust.bukkit.otherblocks.OtherBlocksEntityListener.onPaintingBreak(OtherBlocksEntityListener.java:124)
            at org.bukkit.plugin.java.JavaPluginLoader$58.execute(JavaPluginLoader.java:648)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at net.minecraft.server.EntityPainting.damageEntity(EntityPainting.java:205)
            at net.minecraft.server.EntitySnowball.m_(EntitySnowball.java:173)
            at net.minecraft.server.World.entityJoinedWorld(World.java:1215)
            at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:48)
            at net.minecraft.server.World.playerJoinedWorld(World.java:1197)
            at net.minecraft.server.World.cleanUp(World.java:1113)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:452)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  23. Offline

    Zarius

    Version 1.92? What's your config? Painting breaks work here ok.
     
  24. Offline

    Cultist O

    I love this plugin, in fact it's probably the most important one on our server except for permissions, but I am having a few (small) issues, could someone help me out?

    I am having trouble with messages, though I understand it might be due to Citizens. Are the messages global or do they only send to the individual who caused them? Is there any way to chose?

    Also having trouble with saddled pigs (all my many other drops work except the messages) does anyone see a problem with the following?

    CREATURE_PIG@SADDLED:
    - tool: ANY
    drop: SADDLE
    - tool: ANY
    drop: DEFAULT

    Pigs with saddles are supposed to drop them and whatever pork chops they would naturally, but with or without the last two lines, they are dropping the default only. (No error message)

    Finally, is there support for PLAYER or CREATURE_PLAYER as a tool? (so that you can have drops only when a player's attack kills something, as opposed to a different mob, or the other damage values.) Does DAMAGE_ENTITY_ATTACK include player attacks?
     
  25. Offline

    Zarius

    Messages are to the player that initiated the drop only at the moment - do you have examples where you'd want global messages? (hmm... messages to a particular group, say admins, could be useful in some situations).

    That config looks ok - will test it.

    No player specific damage event yet but DAMAGE_ENTITY_ATTACK does not include player attacks.
     
  26. Offline

    jycs

    No better exemples ?
     
  27. Offline

    Zarius

    "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?" - not good enough? :D

    Yeah, I know the "other examples" section is a bit old - haven't thought of anything better to put there yet. :)
     
  28. Offline

    jycs

    Boaf... :/
     
  29. Offline

    Zarius

    Good news, RB 1060 now allows you to track the shooter of projectiles - I'm working on some changes that might work with the guns.

    Do you have better suggestions? :p
     
  30. Offline

    Cultist O

    Yes I do, I have players who are killed by zombies, dropping zombies 50% of the time. I'd like a global message that says "It seems and old friend has risen from the dead..."

    I also realized just now, that it would be nice to have tamed wolves forward their kill messages to their owners or have the player get a unique message when their wolf kills something, but that might be a bit more of a challenge.

    There are a number of other instances where there is no initiating player (any of the damages for example) where the possibility of a global (ooh or radius) message would be nice, also It'd be nice to be able to message a the player who is dropping things, not just the one who made him drop it
     
  31. Offline

    Zarius

    Had considered global and radius messages but not the wolf kills :) Some good ideas - will add them to the todo list.

    You hit a good one - seems that pigs weren't dropping items at all. Sheep/cows/zombies/etc work - odd.

    * Worked it out - pigs are also considered vehicles and it was hitting that part of the code first. Will be fixed in next build.
     

Share This Page