Work around issue placing decorated pots

This commit is contained in:
md_5 2023-06-13 19:05:00 +10:00
parent 9c5d600d13
commit 789324e30a
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -267,7 +267,7 @@
+ +
+ // SPIGOT-1288 - play sound stripped from ItemBlock + // SPIGOT-1288 - play sound stripped from ItemBlock
+ if (this.item instanceof ItemBlock) { + if (this.item instanceof ItemBlock) {
+ SoundEffectType soundeffecttype = ((ItemBlock) this.item).getBlock().getSoundType(null); + SoundEffectType soundeffecttype = ((ItemBlock) this.item).getBlock().defaultBlockState().getSoundType(); // TODO: not strictly correct, however currently only affects decorated pots
+ world.playSound(entityhuman, blockposition, soundeffecttype.getPlaceSound(), SoundCategory.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F); + world.playSound(entityhuman, blockposition, soundeffecttype.getPlaceSound(), SoundCategory.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F);
+ } + }
+ +