Closed Hecatonchyr closed 11 years ago
Thanks for that. I love the "777th use of sword" & Angelic Ray :)
In regards to the list of ID's I've discovered it's because the code is calling .getStringList() whereas this is a list of numbers so it fails. I'm looking for a way around this but in the meantime note that if you put it in quotes, eg. ["257", "258"] it works fine however the easier way is just putting the @ symbol without a durability, eg. [257@, 258@] as that should work for any durability.
Okay thanks for the additional information, I edited to write these.
Fixed in a local build - [257@, 258] or even [257, 258] now works fine.
I've moved the tutorial stuff here: https://github.com/Zarius/Bukkit-OtherBlocks/wiki/Hecatonchyr's-Tutorial
You should be able to edit that page - look forward to seeing the data value "virtual" entities stuff.
I'll close this issue now by committing the fix.
10% bug report, 90% tutorial which I think could be useful in the Tools reference page When you want to write a config with a specified tool, you can write it in two ways:
Both methods work and you have 20% chance of getting stone instead of cobblestone with a diamond pickaxe, no matter the durability of it. You can also specify multiple tools:
But if you want to use ID numbers instead of ID names (because its shorter):
You can't do it this way. I discovered you need to add data values with ID numbers when using 2 or more tools and then Otherdrops does not crash:
There is one downside: the current config only triggers when the tools are brand new (= durability max), because the data value of a tool is the damage bar. If you want the config to trigger no matter what the durability is, you need to set an interval:
Or you just put an @ without any number after, to specify you want any data value:
Or finally, simply use quotes (") around your ID numbers:
Otherdrops doesn't care if the interval is greater than the max data value a tool can get. For example an iron pickaxe has 251 uses. It means that data value can be from 0 (brand new) to 251 (broken). Setting 0-9999 is just being lazy (I don't want to check the max use of each tool, I will just put 0-9999 and it will cover all data values, since not a single tool in vanilla minecraft exceeds 9999 uses (max is 1562 for diamond tools)). But be careful with modded tools as some can exceed 9999 uses depending on the mod. Why is this feature interesting ? Because you can create configs where durability will trigger different results:
This concludes what I tested so far. I will edit in a few hours to add the use of data values to create "virtual" entities.