aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/events/OnBlockBreakSoundEffect.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/events/OnBlockBreakSoundEffect.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/events/OnBlockBreakSoundEffect.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/events/OnBlockBreakSoundEffect.java b/src/main/java/io/github/moulberry/notenoughupdates/events/OnBlockBreakSoundEffect.java
new file mode 100644
index 00000000..aeffa7da
--- /dev/null
+++ b/src/main/java/io/github/moulberry/notenoughupdates/events/OnBlockBreakSoundEffect.java
@@ -0,0 +1,40 @@
+package io.github.moulberry.notenoughupdates.events;
+
+import net.minecraft.block.state.BlockState;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.client.audio.ISound;
+import net.minecraft.util.BlockPos;
+
+public class OnBlockBreakSoundEffect extends NEUEvent {
+
+ private ISound sound;
+ private final BlockPos position;
+ private final IBlockState block;
+
+ public OnBlockBreakSoundEffect(ISound sound, BlockPos position, IBlockState block) {
+ this.sound = sound;
+ this.position = position;
+ this.block = block;
+ }
+
+ @Override
+ public boolean isCancelable() {
+ return true;
+ }
+
+ public BlockPos getPosition() {
+ return position;
+ }
+
+ public IBlockState getBlock() {
+ return block;
+ }
+
+ public ISound getSound() {
+ return sound;
+ }
+
+ public void setSound(ISound sound) {
+ this.sound = sound;
+ }
+}