Lowered the chest opening/closing sounds

master
Wynd 2023-04-06 20:15:13 +03:00
parent b0582dfd8f
commit 82465867d9
1 changed files with 2 additions and 2 deletions

View File

@ -29,14 +29,14 @@ public class ClientPlayerMixin {
@Inject(method = "openChestScreen", at = @At("TAIL")) @Inject(method = "openChestScreen", at = @At("TAIL"))
public void openChestScreen(Inventory arg, CallbackInfo ci) { public void openChestScreen(Inventory arg, CallbackInfo ci) {
Player player = (Player) (Object) this; Player player = (Player) (Object) this;
player.level.playSound(player, "random.chestopen", 0.5f, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F); player.level.playSound(player, "random.chestopen", 0.3f, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
} }
@Inject(method = "closeContainer", at = @At("HEAD")) @Inject(method = "closeContainer", at = @At("HEAD"))
public void closeContainer(CallbackInfo ci) { public void closeContainer(CallbackInfo ci) {
Player player = (Player) (Object) this; Player player = (Player) (Object) this;
if(player.container instanceof ChestContainer) { if(player.container instanceof ChestContainer) {
player.level.playSound(player, "random.chestclosed", 0.5f, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F); player.level.playSound(player, "random.chestclosed", 0.3f, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
} }
} }
} }