Start work on the alarm
This commit is contained in:
parent
5be3163eeb
commit
7594b55fb5
7 changed files with 53 additions and 0 deletions
15
src/main/java/techreborn/tiles/TileAlarm.java
Normal file
15
src/main/java/techreborn/tiles/TileAlarm.java
Normal file
|
@ -0,0 +1,15 @@
|
|||
package techreborn.tiles;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import techreborn.init.ModSounds;
|
||||
|
||||
public class TileAlarm extends TileEntity implements ITickable{
|
||||
@Override
|
||||
public void update() {
|
||||
if(!world.isRemote && world.getTotalWorldTime() % 25 == 0 && world.isBlockPowered(getPos())){
|
||||
world.playSound(null, getPos().getX(), getPos().getY(), getPos().getZ(), ModSounds.ALARM, SoundCategory.BLOCKS, 4F, 1F);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue