Files
2019-02-24 22:29:41 +08:00

12 lines
850 B
Diff

--- ../src-base/minecraft/net/minecraft/item/ItemDoor.java
+++ ../src-work/minecraft/net/minecraft/item/ItemDoor.java
@@ -48,7 +48,7 @@
int j = enumfacing.getFrontOffsetZ();
boolean flag = i < 0 && hitZ < 0.5F || i > 0 && hitZ > 0.5F || j < 0 && hitX > 0.5F || j > 0 && hitX < 0.5F;
placeDoor(worldIn, pos, enumfacing, this.block, flag);
- SoundType soundtype = this.block.getSoundType();
+ SoundType soundtype = worldIn.getBlockState(pos).getBlock().getSoundType(worldIn.getBlockState(pos), worldIn, pos, player);
worldIn.playSound(player, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F);
itemstack.shrink(1);
return EnumActionResult.SUCCESS;