Doors, sirens and blocks

This commit is contained in:
Andrew-71 2023-08-06 14:37:17 +03:00
parent 9da21d3fe8
commit 6c6c90ed4b
40 changed files with 280 additions and 7 deletions

View file

@ -43,7 +43,7 @@ public class SirenBlock extends HorizontalFacingBlock {
if (bl) {
world.scheduleBlockTick(pos, this, 4);
} else {
world.playSound((PlayerEntity)null, pos.getX(), pos.getY(), pos.getZ(), NSE_Custom.SIREN_SOUND, SoundCategory.NEUTRAL, 1F, 1f);
world.playSound((PlayerEntity)null, pos.getX(), pos.getY(), pos.getZ(), NSE_Custom.SIREN_SOUND, SoundCategory.NEUTRAL, 5F, 1f);
world.setBlockState(pos, (BlockState)state.cycle(ON), 2);
world.scheduleBlockTick(pos, this, 140);
}
@ -88,7 +88,7 @@ public class SirenBlock extends HorizontalFacingBlock {
} else {
NewSoviet.LOG.info("Playing!");
world.playSound((PlayerEntity)null, pos.getX(), pos.getY(), pos.getZ(), NSE_Custom.SIREN_SOUND, SoundCategory.NEUTRAL, 1F, 1f);
world.playSound((PlayerEntity)null, pos.getX(), pos.getY(), pos.getZ(), NSE_Custom.SIREN_SOUND, SoundCategory.NEUTRAL, 5F, 1f);
world.scheduleBlockTick(pos, this, 140);
}
}