From e40168954f17b6832c4f3cea997c59641cd790f2 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Thu, 26 Jun 2014 12:17:59 -0400 Subject: [PATCH] Minor Change to TileEntityRift Changed the function call for playing the rift-closing sound to match other similar calls in Minecraft - the sound should target the center of the block. I also switched the last flag argument. It seems to determine whether distance between the player and the source should be checked when playing back the sound, although documentation is lacking so I can't be sure. Other blocks that use that function use "false", while things involving sounds that should be heard uniformly, such as rainfall, use "true". --- I noticed that this code runs on the client and server. Some parts modify link data and rifts on the client side. We should really stop this from happening as it could lead to inconsistencies. --- .../mod_pocketDim/tileentities/TileEntityRift.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/tileentities/TileEntityRift.java b/src/main/java/StevenDimDoors/mod_pocketDim/tileentities/TileEntityRift.java index 0effc8bf..13f9f96a 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/tileentities/TileEntityRift.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/tileentities/TileEntityRift.java @@ -174,8 +174,7 @@ public class TileEntityRift extends DDTileEntityBase } } worldObj.setBlockToAir(xCoord, yCoord, zCoord); - worldObj.playSound(xCoord, yCoord, zCoord, "mods.DimDoors.sfx.riftClose", (float) .7, 1, true); - return; + worldObj.playSound(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "mods.DimDoors.sfx.riftClose", 0.7f, 1, false); } closeTimer++; }