package common.block.tech;

import common.block.Block;
import common.block.Material;
import common.entity.npc.EntityNPC;
import common.init.SoundEvent;
import common.item.CheatTab;
import common.model.Model;
import common.model.ModelProvider;
import common.util.BlockPos;
import common.util.Facing;
import common.world.State;
import common.world.World;

public class BlockJukebox extends Block {
	public BlockJukebox() {
		super(Material.WOOD);
		this.setTab(CheatTab.TECHNOLOGY);
	}
	
	public boolean onBlockActivated(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ) {
		if(!worldIn.client)
			worldIn.playSound(worldIn.rand.pick(SoundEvent.values()), pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 1.0f);
		return true;
	}
	
	public Model getModel(ModelProvider provider, String name, State state) {
		return provider.getModel("jukebox_side").add().dnswe().u("jukebox_top");
	}
}
