diff options
author | speakeasy <mekevin1917@gmail.com> | 2011-01-19 08:59:22 +0800 |
---|---|---|
committer | Warren <evilseph@unaligned.org> | 2011-01-19 09:00:56 +0800 |
commit | bdd3c4dabe7fdcb8a5e1e1225c2789999fac7c7d (patch) | |
tree | 3971e6ffd7231bf838e9b66a67be9d31c6818a1a /src/main/java/net | |
parent | abb3c5eee6d06b5746f941cd561be42d9a84ad1e (diff) | |
download | craftbukkit-bdd3c4dabe7fdcb8a5e1e1225c2789999fac7c7d.tar craftbukkit-bdd3c4dabe7fdcb8a5e1e1225c2789999fac7c7d.tar.gz craftbukkit-bdd3c4dabe7fdcb8a5e1e1225c2789999fac7c7d.tar.lz craftbukkit-bdd3c4dabe7fdcb8a5e1e1225c2789999fac7c7d.tar.xz craftbukkit-bdd3c4dabe7fdcb8a5e1e1225c2789999fac7c7d.zip |
Change block ignite in flint and steel to be seperate from item use
Diffstat (limited to 'src/main/java/net')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemFlintAndSteel.java | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/main/java/net/minecraft/server/ItemFlintAndSteel.java b/src/main/java/net/minecraft/server/ItemFlintAndSteel.java index cd54a2b7..0f644ac1 100644 --- a/src/main/java/net/minecraft/server/ItemFlintAndSteel.java +++ b/src/main/java/net/minecraft/server/ItemFlintAndSteel.java @@ -59,15 +59,20 @@ public class ItemFlintAndSteel extends Item { server.getPluginManager().callEvent(pie); boolean preventLighter = pie.isCancelled(); - boolean preventFire = false; - if (blockClicked.getTypeId() != Block.ar.bi){ - IgniteCause igniteCause = BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL; - BlockIgniteEvent bie = new BlockIgniteEvent(blockClicked, igniteCause, thePlayer); - server.getPluginManager().callEvent(bie); - preventFire = bie.isCancelled(); - } + + + IgniteCause igniteCause = BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL; + BlockIgniteEvent bie = new BlockIgniteEvent(blockClicked, igniteCause, thePlayer); + server.getPluginManager().callEvent(bie); + boolean preventFire = bie.isCancelled(); + - if (preventLighter || preventFire) { + if (preventLighter) { + return false; + } + + if (preventFire) { + itemstack.b(1); return false; } // CraftBukkit end |