package game.block; import game.entity.npc.EntityNPC; import game.init.SoundEvent; import game.item.CheatTab; import game.material.Material; import game.renderer.blockmodel.ModelBlock; import game.world.BlockPos; import game.world.Facing; import game.world.State; import game.world.World; public class BlockJukebox extends Block { public BlockJukebox() { super(Material.wood); this.setTab(CheatTab.tabTech); } 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 ModelBlock getModel(String name, State state) { return new ModelBlock("jukebox_side").add().dnswe().u("jukebox_top"); } }