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.
This commit is contained in:
SenseiKiwi 2014-06-26 12:17:59 -04:00
parent 59f335ac8c
commit e40168954f

View file

@ -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++;
}