diff options
author | mbax <matt@phozop.net> | 2013-11-04 07:07:38 -0600 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-11-30 19:26:12 -0600 |
commit | 2726696652179a5ead7dc07dd39edf7dfda687f7 (patch) | |
tree | ff78e22fdd4fc01889a5f6cc482b599f965cd93a /src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java | |
parent | ff8b70fbb7a96b9d2ff078afcf3b3ff90f200981 (diff) | |
download | craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.gz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.lz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.xz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.zip |
Update CraftBukkit to Minecraft 1.7.2
Diffstat (limited to 'src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java index 0cfddf40..53173a17 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java @@ -8,6 +8,7 @@ import org.bukkit.Note; import org.bukkit.block.Block; import org.bukkit.block.NoteBlock; import org.bukkit.craftbukkit.CraftWorld; +import org.bukkit.craftbukkit.util.CraftMagicNumbers; public class CraftNoteBlock extends CraftBlockState implements NoteBlock { private final CraftWorld world; @@ -47,22 +48,24 @@ public class CraftNoteBlock extends CraftBlockState implements NoteBlock { } } + @Override public boolean play(byte instrument, byte note) { Block block = getBlock(); if (block.getType() == Material.NOTE_BLOCK) { - world.getHandle().playNote(getX(), getY(), getZ(), block.getTypeId(), instrument, note); + world.getHandle().playNote(getX(), getY(), getZ(), CraftMagicNumbers.getBlock(block), instrument, note); return true; } else { return false; } } + @Override public boolean play(Instrument instrument, Note note) { Block block = getBlock(); if (block.getType() == Material.NOTE_BLOCK) { - world.getHandle().playNote(getX(), getY(), getZ(), block.getTypeId(), instrument.getType(), note.getId()); + world.getHandle().playNote(getX(), getY(), getZ(), CraftMagicNumbers.getBlock(block), instrument.getType(), note.getId()); return true; } else { return false; |