github.com/df-mc/dragonfly@v0.9.13/server/world/sound/instrument.go (about)

     1  package sound
     2  
     3  // Instrument represents a note block instrument.
     4  type Instrument struct {
     5  	instrument
     6  }
     7  
     8  type instrument int32
     9  
    10  // Int32 ...
    11  func (i instrument) Int32() int32 {
    12  	return int32(i)
    13  }
    14  
    15  // Piano is an instrument type for the note block.
    16  func Piano() Instrument {
    17  	return Instrument{0}
    18  }
    19  
    20  // BassDrum is an instrument type for the note block.
    21  func BassDrum() Instrument {
    22  	return Instrument{1}
    23  }
    24  
    25  // Snare is an instrument type for the note block.
    26  func Snare() Instrument {
    27  	return Instrument{2}
    28  }
    29  
    30  // ClicksAndSticks is an instrument type for the note block.
    31  func ClicksAndSticks() Instrument {
    32  	return Instrument{3}
    33  }
    34  
    35  // Bass is an instrument type for the note block.
    36  func Bass() Instrument {
    37  	return Instrument{4}
    38  }
    39  
    40  // Bell is an instrument type for the note block.
    41  func Bell() Instrument {
    42  	return Instrument{5}
    43  }
    44  
    45  // Flute is an instrument type for the note block.
    46  func Flute() Instrument {
    47  	return Instrument{6}
    48  }
    49  
    50  // Chimes is an instrument type for the note block.
    51  func Chimes() Instrument {
    52  	return Instrument{7}
    53  }
    54  
    55  // Guitar is an instrument type for the note block.
    56  func Guitar() Instrument {
    57  	return Instrument{8}
    58  }
    59  
    60  // Xylophone is an instrument type for the note block.
    61  func Xylophone() Instrument {
    62  	return Instrument{9}
    63  }
    64  
    65  // IronXylophone is an instrument type for the note block.
    66  func IronXylophone() Instrument {
    67  	return Instrument{10}
    68  }
    69  
    70  // CowBell is an instrument type for the note block.
    71  func CowBell() Instrument {
    72  	return Instrument{11}
    73  }
    74  
    75  // Didgeridoo is an instrument type for the note block.
    76  func Didgeridoo() Instrument {
    77  	return Instrument{12}
    78  }
    79  
    80  // Bit is an instrument type for the note block.
    81  func Bit() Instrument {
    82  	return Instrument{13}
    83  }
    84  
    85  // Banjo is an instrument type for the note block.
    86  func Banjo() Instrument {
    87  	return Instrument{14}
    88  }
    89  
    90  // Pling is an instrument type for the note block.
    91  func Pling() Instrument {
    92  	return Instrument{15}
    93  }