Code Duplication    Length = 7-8 lines in 12 locations

src/VectorNetworkProject/TheMix/lib/sound/LevelSounds.php 12 locations

@@ 21-28 (lines=8) @@
18
     *
19
     * @return void
20
     */
21
    public static function LevelUp(Player $player): void
22
    {
23
        $packet = new LevelSoundEventPacket();
24
        $packet->position = $player->asVector3();
25
        $packet->sound = LevelSoundEventPacket::SOUND_LEVELUP;
26
        $packet->extraData = 0x10000000;
27
        $player->sendDataPacket($packet);
28
    }
29
30
    /**
31
     * @param Player $player
@@ 35-41 (lines=7) @@
32
     *
33
     * @return void
34
     */
35
    public static function Anvil(Player $player): void
36
    {
37
        $packet = new LevelSoundEventPacket();
38
        $packet->position = $player->asVector3();
39
        $packet->sound = LevelSoundEventPacket::SOUND_RANDOM_ANVIL_USE;
40
        $player->sendDataPacket($packet);
41
    }
42
43
    /**
44
     * @param Player $player
@@ 48-54 (lines=7) @@
45
     *
46
     * @return void
47
     */
48
    public static function Travle(Player $player): void
49
    {
50
        $packet = new LevelSoundEventPacket();
51
        $packet->position = $player->asVector3();
52
        $packet->sound = LevelSoundEventPacket::SOUND_PORTAL_TRAVEL;
53
        $player->sendDataPacket($packet);
54
    }
55
56
    /**
57
     * @param Player $player
@@ 61-67 (lines=7) @@
58
     *
59
     * @return void
60
     */
61
    public static function EndPortalSpawn(Player $player): void
62
    {
63
        $packet = new LevelSoundEventPacket();
64
        $packet->position = $player->asVector3();
65
        $packet->sound = LevelSoundEventPacket::SOUND_BLOCK_END_PORTAL_SPAWN;
66
        $player->sendDataPacket($packet);
67
    }
68
69
    /**
70
     * @param Player $player
@@ 74-80 (lines=7) @@
71
     *
72
     * @return void
73
     */
74
    public static function Portal(Player $player): void
75
    {
76
        $packet = new LevelSoundEventPacket();
77
        $packet->position = $player->asVector3();
78
        $packet->sound = LevelSoundEventPacket::SOUND_BLOCK_END_PORTAL_SPAWN;
79
        $player->sendDataPacket($packet);
80
    }
81
82
    /**
83
     * @param Player $player
@@ 87-93 (lines=7) @@
84
     *
85
     * @return void
86
     */
87
    public static function Thunder(Player $player): void
88
    {
89
        $packet = new LevelSoundEventPacket();
90
        $packet->position = $player->asVector3();
91
        $packet->sound = LevelSoundEventPacket::SOUND_ITEM_TRIDENT_THUNDER;
92
        $player->sendDataPacket($packet);
93
    }
94
95
    /**
96
     * @param Player $player
@@ 100-106 (lines=7) @@
97
     *
98
     * @return void
99
     */
100
    public static function Remedy(Player $player): void
101
    {
102
        $packet = new LevelSoundEventPacket();
103
        $packet->position = $player->asVector3();
104
        $packet->sound = LevelSoundEventPacket::SOUND_REMEDY;
105
        $player->sendDataPacket($packet);
106
    }
107
108
    /**
109
     * @param Player $player
@@ 113-119 (lines=7) @@
110
     *
111
     * @return void
112
     */
113
    public static function Launch(Player $player): void
114
    {
115
        $packet = new LevelSoundEventPacket();
116
        $packet->position = $player->asVector3();
117
        $packet->sound = LevelSoundEventPacket::SOUND_LAUNCH;
118
        $player->sendDataPacket($packet);
119
    }
120
121
    /**
122
     * @param Player $player
@@ 126-132 (lines=7) @@
123
     *
124
     * @return void
125
     */
126
    public static function Blast(Player $player): void
127
    {
128
        $packet = new LevelSoundEventPacket();
129
        $packet->position = $player->asVector3();
130
        $packet->sound = LevelSoundEventPacket::SOUND_BLAST;
131
        $player->sendDataPacket($packet);
132
    }
133
134
    /**
135
     * @param Player $player
@@ 139-145 (lines=7) @@
136
     *
137
     * @return void
138
     */
139
    public static function LargeBlast(Player $player): void
140
    {
141
        $packet = new LevelSoundEventPacket();
142
        $packet->position = $player->asVector3();
143
        $packet->sound = LevelSoundEventPacket::SOUND_LARGE_BLAST;
144
        $player->sendDataPacket($packet);
145
    }
146
147
    /**
148
     * @param Player $player
@@ 152-158 (lines=7) @@
149
     *
150
     * @return void
151
     */
152
    public static function Twinklt(Player $player): void
153
    {
154
        $packet = new LevelSoundEventPacket();
155
        $packet->position = $player->asVector3();
156
        $packet->sound = LevelSoundEventPacket::SOUND_TWINKLE;
157
        $player->sendDataPacket($packet);
158
    }
159
160
    /**
161
     * @param Player $player
@@ 163-169 (lines=7) @@
160
    /**
161
     * @param Player $player
162
     */
163
    public static function NotePiano(Player $player): void
164
    {
165
        $packet = new LevelSoundEventPacket();
166
        $packet->position = $player->asVector3();
167
        $packet->sound = LevelSoundEventPacket::SOUND_NOTE;
168
        $player->sendDataPacket($packet);
169
    }
170
}
171