Fixed more sounds -.-
This commit is contained in:
parent
ef590bfa0b
commit
7d90ae8ddf
4 changed files with 11 additions and 10 deletions
|
@ -198,7 +198,7 @@ public class TileEntityArmbot extends TileEntityAssemblyNetwork implements IMult
|
||||||
this.renderYaw -= 360;
|
this.renderYaw -= 360;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.ticks % 5 == 0) // sound is 0.5 seconds long (20 ticks/second)
|
if (this.ticks % 5 == 0 && FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) // sound is 0.5 seconds long (20 ticks/second)
|
||||||
Minecraft.getMinecraft().sndManager.playSound("assemblyline.conveyor", this.xCoord, this.yCoord, this.zCoord, 2f, 1.7f);
|
Minecraft.getMinecraft().sndManager.playSound("assemblyline.conveyor", this.xCoord, this.yCoord, this.zCoord, 2f, 1.7f);
|
||||||
if (Math.abs(this.renderYaw - this.rotationYaw) < this.ROTATION_SPEED + 0.1f)
|
if (Math.abs(this.renderYaw - this.rotationYaw) < this.ROTATION_SPEED + 0.1f)
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,8 +53,7 @@ public class TileEntityConveyorBelt extends TileEntityAssemblyNetwork implements
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is overriden to allow conveyor belts to power belts that are diagonally going
|
* This function is overriden to allow conveyor belts to power belts that are diagonally going up.
|
||||||
* up.
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void updatePowerTransferRange()
|
public void updatePowerTransferRange()
|
||||||
|
@ -118,11 +117,11 @@ public class TileEntityConveyorBelt extends TileEntityAssemblyNetwork implements
|
||||||
PacketManager.sendPacketToClients(this.getDescriptionPacket());
|
PacketManager.sendPacketToClients(this.getDescriptionPacket());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isRunning()&& this.worldObj.isRemote)
|
if (this.isRunning())
|
||||||
{
|
{
|
||||||
if (this.ticks % (10) == 0 ) //sound is 0.5 seconds long (20 ticks/second)
|
if (this.ticks % (10) == 0 && this.worldObj.isRemote) // sound is 0.5 seconds long (20 ticks/second)
|
||||||
Minecraft.getMinecraft().sndManager.playSound("assemblyline.conveyor", this.xCoord, this.yCoord, this.zCoord, 0.125f, 0.3f);
|
Minecraft.getMinecraft().sndManager.playSound("assemblyline.conveyor", this.xCoord, this.yCoord, this.zCoord, 0.125f, 0.3f);
|
||||||
|
|
||||||
this.wheelRotation += 40;
|
this.wheelRotation += 40;
|
||||||
|
|
||||||
if (this.wheelRotation > 360)
|
if (this.wheelRotation > 360)
|
||||||
|
|
|
@ -20,7 +20,8 @@ public class CommandDrop extends Command
|
||||||
entity.worldObj = this.tileEntity.worldObj;
|
entity.worldObj = this.tileEntity.worldObj;
|
||||||
if (entity instanceof EntityItem)
|
if (entity instanceof EntityItem)
|
||||||
world.spawnEntityInWorld(entity); //items don't move right, so we render them manually
|
world.spawnEntityInWorld(entity); //items don't move right, so we render them manually
|
||||||
Minecraft.getMinecraft().sndManager.playSound("random.pop", this.tileEntity.xCoord, this.tileEntity.yCoord, this.tileEntity.zCoord, 0.2F, ((this.tileEntity.worldObj.rand.nextFloat() - this.tileEntity.worldObj.rand.nextFloat()) * 0.7F + 1.0F) * 1.0F);
|
if (this.world.isRemote)
|
||||||
|
Minecraft.getMinecraft().sndManager.playSound("random.pop", this.tileEntity.xCoord, this.tileEntity.yCoord, this.tileEntity.zCoord, 0.2F, ((this.tileEntity.worldObj.rand.nextFloat() - this.tileEntity.worldObj.rand.nextFloat()) * 0.7F + 1.0F) * 1.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.tileEntity.grabbedEntities.clear();
|
this.tileEntity.grabbedEntities.clear();
|
||||||
|
|
|
@ -41,12 +41,13 @@ public class CommandGrab extends Command
|
||||||
{
|
{
|
||||||
for (int i = 0; i < found.size(); i++)
|
for (int i = 0; i < found.size(); i++)
|
||||||
{
|
{
|
||||||
if (found.get(i) != null && !(found.get(i) instanceof EntityPlayer) && found.get(i).ridingEntity == null) //isn't null, isn't a player, and isn't riding anything
|
if (found.get(i) != null && !(found.get(i) instanceof EntityPlayer) && found.get(i).ridingEntity == null) // isn't null, isn't a player, and isn't riding anything
|
||||||
{
|
{
|
||||||
this.tileEntity.grabbedEntities.add(found.get(i));
|
this.tileEntity.grabbedEntities.add(found.get(i));
|
||||||
if (found.get(i) instanceof EntityItem)
|
if (found.get(i) instanceof EntityItem)
|
||||||
this.tileEntity.worldObj.removeEntity(found.get(i)); //items don't move right, so we render them manually
|
this.tileEntity.worldObj.removeEntity(found.get(i)); // items don't move right, so we render them manually
|
||||||
Minecraft.getMinecraft().sndManager.playSound("random.pop", this.tileEntity.xCoord, this.tileEntity.yCoord, this.tileEntity.zCoord, 0.2F, ((this.tileEntity.worldObj.rand.nextFloat() - this.tileEntity.worldObj.rand.nextFloat()) * 0.7F + 1.0F) * 1.0F);
|
if (this.world.isRemote)
|
||||||
|
Minecraft.getMinecraft().sndManager.playSound("random.pop", this.tileEntity.xCoord, this.tileEntity.yCoord, this.tileEntity.zCoord, 0.2F, ((this.tileEntity.worldObj.rand.nextFloat() - this.tileEntity.worldObj.rand.nextFloat()) * 0.7F + 1.0F) * 1.0F);
|
||||||
found.get(i).isDead = false;
|
found.get(i).isDead = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue