github.com/df-mc/dragonfly@v0.9.13/server/world/sound/block.go (about) 1 package sound 2 3 import ( 4 "github.com/df-mc/dragonfly/server/world" 5 "github.com/go-gl/mathgl/mgl64" 6 ) 7 8 // BlockPlace is a sound sent when a block is placed. 9 type BlockPlace struct { 10 // Block is the block which is placed, for which a sound should be played. The sound played depends on 11 // the block type. 12 Block world.Block 13 14 sound 15 } 16 17 // BlockBreaking is a sound sent continuously while a player is breaking a block. 18 type BlockBreaking struct { 19 // Block is the block which is being broken, for which a sound should be played. The sound played depends 20 // on the block type. 21 Block world.Block 22 23 sound 24 } 25 26 // GlassBreak is a sound played when a glass block or item is broken. 27 type GlassBreak struct{ sound } 28 29 // Fizz is a sound sent when a lava block and a water block interact with each other in a way that one of 30 // them turns into a solid block. 31 type Fizz struct{ sound } 32 33 // AnvilLand is played when an anvil lands on the ground. 34 type AnvilLand struct{ sound } 35 36 // AnvilUse is played when an anvil is used. 37 type AnvilUse struct{ sound } 38 39 // AnvilBreak is played when an anvil is broken. 40 type AnvilBreak struct{ sound } 41 42 // ChestOpen is played when a chest is opened. 43 type ChestOpen struct{ sound } 44 45 // ChestClose is played when a chest is closed. 46 type ChestClose struct{ sound } 47 48 // BarrelOpen is played when a barrel is opened. 49 type BarrelOpen struct{ sound } 50 51 // BarrelClose is played when a barrel is closed. 52 type BarrelClose struct{ sound } 53 54 // Deny is a sound played when a block is placed or broken above a 'Deny' block from Education edition. 55 type Deny struct{ sound } 56 57 // DoorOpen is a sound played when a door is opened. 58 type DoorOpen struct { 59 // Block is the block which is being opened, for which a sound should be played. The sound played depends on the 60 // block type. 61 Block world.Block 62 63 sound 64 } 65 66 // DoorClose is a sound played when a door is closed. 67 type DoorClose struct { 68 // Block is the block which is being closed, for which a sound should be played. The sound played depends on the 69 // block type. 70 Block world.Block 71 72 sound 73 } 74 75 // TrapdoorOpen is a sound played when a trapdoor is opened. 76 type TrapdoorOpen struct { 77 // Block is the block which is being opened, for which a sound should be played. The sound played depends on the 78 // block type. 79 Block world.Block 80 81 sound 82 } 83 84 // TrapdoorClose is a sound played when a trapdoor is closed. 85 type TrapdoorClose struct { 86 // Block is the block which is being closed, for which a sound should be played. The sound played depends on the 87 // block type. 88 Block world.Block 89 90 sound 91 } 92 93 // FenceGateOpen is a sound played when a fence gate is opened. 94 type FenceGateOpen struct { 95 // Block is the block which is being opened, for which a sound should be played. The sound played depends on the 96 // block type. 97 Block world.Block 98 99 sound 100 } 101 102 // FenceGateClose is a sound played when a fence gate is closed. 103 type FenceGateClose struct { 104 // Block is the block which is being closed, for which a sound should be played. The sound played depends on the 105 // block type. 106 Block world.Block 107 108 sound 109 } 110 111 // DoorCrash is a sound played when a door is forced open. 112 type DoorCrash struct{ sound } 113 114 // Click is a clicking sound. 115 type Click struct{ sound } 116 117 // Ignite is a sound played when using a flint & steel. 118 type Ignite struct{ sound } 119 120 // TNT is a sound played when TNT is ignited. 121 type TNT struct{ sound } 122 123 // FireExtinguish is a sound played when a fire is extinguished. 124 type FireExtinguish struct{ sound } 125 126 // Note is a sound played by note blocks. 127 type Note struct { 128 sound 129 // Instrument is the instrument of the note block. 130 Instrument Instrument 131 // Pitch is the pitch of the note. 132 Pitch int 133 } 134 135 // MusicDiscPlay is a sound played when a music disc has started playing in a jukebox. 136 type MusicDiscPlay struct { 137 sound 138 139 // DiscType is the disc type of the music disc. 140 DiscType DiscType 141 } 142 143 // MusicDiscEnd is a sound played when a music disc has stopped playing in a jukebox. 144 type MusicDiscEnd struct{ sound } 145 146 // ItemFrameAdd is a sound played when an item is added to an item frame. 147 type ItemFrameAdd struct{ sound } 148 149 // ItemFrameRemove is a sound played when an item is removed from an item frame. 150 type ItemFrameRemove struct{ sound } 151 152 // ItemFrameRotate is a sound played when an item frame's item is rotated. 153 type ItemFrameRotate struct{ sound } 154 155 // FurnaceCrackle is a sound played every one to five seconds from a furnace. 156 type FurnaceCrackle struct{ sound } 157 158 // BlastFurnaceCrackle is a sound played every one to five seconds from a blast furnace. 159 type BlastFurnaceCrackle struct{ sound } 160 161 // SmokerCrackle is a sound played every one to five seconds from a smoker. 162 type SmokerCrackle struct{ sound } 163 164 // ComposterEmpty is a sound played when a composter has been emptied. 165 type ComposterEmpty struct{ sound } 166 167 // ComposterFill is a sound played when a composter has been filled, but not gone up a layer. 168 type ComposterFill struct{ sound } 169 170 // ComposterFillLayer is a sound played when a composter has been filled and gone up a layer. 171 type ComposterFillLayer struct{ sound } 172 173 // ComposterReady is a sound played when a composter has produced bone meal and is ready to be collected. 174 type ComposterReady struct{ sound } 175 176 // LecternBookPlace is a sound played when a book is placed in a lectern. 177 type LecternBookPlace struct{ sound } 178 179 // sound implements the world.Sound interface. 180 type sound struct{} 181 182 // Play ... 183 func (sound) Play(*world.World, mgl64.Vec3) {}