Lot of formatting.

This commit is contained in:
drcrazy 2018-06-22 18:22:16 +03:00
parent ec13f82628
commit 1de3fe5dc5
29 changed files with 540 additions and 544 deletions

View file

@ -71,7 +71,7 @@ public class TileAlarm extends TileEntity
@Override
public void readFromNBT(NBTTagCompound compound) {
if (compound != null && compound.hasKey("selectedSound")) {
this.selectedSound = compound.getInteger("selectedSound");
selectedSound = compound.getInteger("selectedSound");
}
super.readFromNBT(compound);
}
@ -88,13 +88,13 @@ public class TileAlarm extends TileEntity
BlockAlarm.setActive(true, world, pos);
switch (selectedSound) {
case 1:
world.playSound(null, getPos().getX(), getPos().getY(), getPos().getZ(), ModSounds.ALARM, SoundCategory.BLOCKS, 4F, 1F);
world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), ModSounds.ALARM, SoundCategory.BLOCKS, 4F, 1F);
break;
case 2:
world.playSound(null, getPos().getX(), getPos().getY(), getPos().getZ(), ModSounds.ALARM_2, SoundCategory.BLOCKS, 4F, 1F);
world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), ModSounds.ALARM_2, SoundCategory.BLOCKS, 4F, 1F);
break;
case 3:
world.playSound(null, getPos().getX(), getPos().getY(), getPos().getZ(), ModSounds.ALARM_3, SoundCategory.BLOCKS, 4F, 1F);
world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), ModSounds.ALARM_3, SoundCategory.BLOCKS, 4F, 1F);
break;
}