mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 13:36:44 +01:00
1358d1e914
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 881e06e5 PR-725: Add Item Unlimited Lifetime APIs CraftBukkit Changes: 74c08312 SPIGOT-6962: Call EntityChangeBlockEvent when when FallingBlockEntity starts to fall 64db5126 SPIGOT-6959: Make /loot command ignore empty items for spawn 2d760831 Increase outdated build delay 9ed7e4fb SPIGOT-6138, SPIGOT-6415: Don't call CreatureSpawnEvent after cross-dimensional travel fc4ad813 SPIGOT-6895: Trees grown with applyBoneMeal() don't fire the StructureGrowthEvent 59733a2e SPIGOT-6961: Actually return a copy of the ItemMeta Spigot Changes: ffceeae3 SPIGOT-6956: Drop unload queue patch as attempt at fixing stop issue e19ddabd PR-1011: Add Item Unlimited Lifetime APIs 34d40b0e SPIGOT-2942: give command fires PlayerDropItemEvent, cancelling it causes Item Duplication
66 lines
2.3 KiB
Diff
66 lines
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: simpleauthority <jacob@algorithmjunkie.com>
|
|
Date: Tue, 28 May 2019 03:48:51 -0700
|
|
Subject: [PATCH] Implement CraftBlockSoundGroup
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/block/CraftBlockSoundGroup.java b/src/main/java/com/destroystokyo/paper/block/CraftBlockSoundGroup.java
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..9a516520d975f52169e346adc4ec6d9db843db2f
|
|
--- /dev/null
|
|
+++ b/src/main/java/com/destroystokyo/paper/block/CraftBlockSoundGroup.java
|
|
@@ -0,0 +1,38 @@
|
|
+package com.destroystokyo.paper.block;
|
|
+
|
|
+import net.minecraft.world.level.block.SoundType;
|
|
+import org.bukkit.Sound;
|
|
+import org.bukkit.craftbukkit.CraftSound;
|
|
+
|
|
+public class CraftBlockSoundGroup implements BlockSoundGroup {
|
|
+ private final SoundType soundEffectType;
|
|
+
|
|
+ public CraftBlockSoundGroup(SoundType soundEffectType) {
|
|
+ this.soundEffectType = soundEffectType;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public Sound getBreakSound() {
|
|
+ return CraftSound.getBukkit(soundEffectType.getBreakSound());
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public Sound getStepSound() {
|
|
+ return CraftSound.getBukkit(soundEffectType.getStepSound());
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public Sound getPlaceSound() {
|
|
+ return CraftSound.getBukkit(soundEffectType.getPlaceSound());
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public Sound getHitSound() {
|
|
+ return CraftSound.getBukkit(soundEffectType.getHitSound());
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public Sound getFallSound() {
|
|
+ return CraftSound.getBukkit(soundEffectType.getFallSound());
|
|
+ }
|
|
+}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
|
index ba8f9ffed49bf377be8b37532d4f2bdcb8c44d82..250185af0abcfea380cc00e670c0076f7fe87446 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
|
@@ -644,4 +644,11 @@ public class CraftBlock implements Block {
|
|
|
|
return iblockdata.canSurvive(world, this.position);
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public com.destroystokyo.paper.block.BlockSoundGroup getSoundGroup() {
|
|
+ return new com.destroystokyo.paper.block.CraftBlockSoundGroup(getNMS().getBlock().defaultBlockState().getSoundType());
|
|
+ }
|
|
+ // Paper end
|
|
}
|