Zarius / Bukkit-OtherBlocks

OtherBlocks (now known as OtherDrops) plugin for Bukkit (dev build: https://www.mediafire.com/?i6ows1g6kus2o0l)
http://dev.bukkit.org/server-mods/otherdrops/
GNU General Public License v3.0
17 stars 17 forks source link

Different drops for clicking ANVIL@0, ANVIL@1, and ANVIL@2 #200

Closed sehrgut closed 11 years ago

sehrgut commented 11 years ago

I'm trying to implement anvil repair with the following drop:

ANVIL:
  - action: LEFTCLICK
    tool: IRON_INGOT
    consumetool: 1
    replacementblock: ANVIL@0
    event: LIGHTNING@HARMLESS
    message: Your anvil has been repaired.

What I'd like to do is have separate rules with separate costs and effects for each damage level, so that repairing ANVIL@0 would be a no-op, repairing ANVIL@1 would yield ANVIL@0, and repairing ANVIL@2 would yield ANVIL@1. 4 could then yield 3, and 5 could yield 4, preserving orientation.

Would this be a feature you could add?

Zarius commented 11 years ago

Already added :-)

You need to start with replacementblock: anvil@1 though because anvil@0 is just a normal anvil.

Zarius commented 11 years ago

Note: perhaps it does effect orientation, well have to test and perhaps try higher numbers like anvil@12

sehrgut commented 11 years ago

I'll retest when I get home, because I may have been trying to repair an ANVIL@4 with a rule for ANVIL@2.

Sent from my iPhone

On Apr 2, 2013, at 7:15 PM, Zarius notifications@github.com wrote:

Already added :-)

You need to start with replacementblock: anvil@1 though because anvil@0 is just a normal anvil.

— Reply to this email directly or view it on GitHub.

sehrgut commented 11 years ago

Okay, silly me forgot that data values were multiplied by orientation, and only tried the entity data values 0-3. A full mapping of 0-11 covers it. This is, then, a non-issue . . . thanks again for the great plugin! It's one of the central plugins to every server I've run.

Edit: Oh, for reference:

New Anvils: 0-3 Slightly-Damaged Anvils: 4-7 Badly-Damaged Anvils: 8-11

They group like: 0->4->8 through 3->7->11.

CelticMinstrel commented 11 years ago

In that case, perhaps OtherDrops should provide aliases to split the data, as I believe it does with other things. For example:

ANVIL@NEW - matches any new anvil ANVIL@DAMAGED - matches any damaged anvil ANVIL@NORTH - matches any anvil facing north

And so forth.

sehrgut commented 11 years ago

That would be absolutely wonderful.

Sent from my iPhone

On Apr 4, 2013, at 9:55 PM, CelticMinstrel notifications@github.com wrote:

In that case, perhaps OtherDrops should provide aliases to split the data, as I believe it does with other things. For example:

ANVIL@NEW - matches any new anvil ANVIL@DAMAGED - matches any damaged anvil ANVIL@NORTH - matches any anvil facing north

And so forth.

— Reply to this email directly or view it on GitHub.