Start work on the alarm

This commit is contained in:
modmuss50 2017-12-18 19:58:52 +00:00
parent 5be3163eeb
commit 7594b55fb5
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
7 changed files with 53 additions and 0 deletions

View 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);
}
}
}