diff --git a/scripts/action_wheel.lua b/scripts/action_wheel.lua index 70cb385..79bf8e7 100644 --- a/scripts/action_wheel.lua +++ b/scripts/action_wheel.lua @@ -285,13 +285,13 @@ events.TICK:register(function () if ActionWheel.PlayerNameState ~= ActionWheel.CurrentPlayerNameState then pings.main4_action2(ActionWheel.PlayerNameState) Config.saveConfig("name", ActionWheel.PlayerNameState) - sounds:playSound("minecraft:ui.cartography_table.take_result", player:getPos()) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:ui.cartography_table.take_result"), player:getPos()) print(Language.getTranslate("action_wheel__main_4__action_2__done_first")..Nameplate.NameList[ActionWheel.PlayerNameState]..Language.getTranslate("action_wheel__main_4__action_2__done_last")) end if ActionWheel.SkullState ~= ActionWheel.CurrentSkullState then pings.main4_action3(ActionWheel.SkullState) Config.saveConfig("skull", ActionWheel.SkullState) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecrarft:entity.item.pickup"), player:getPos(), 1, 0.5) print(Language.getTranslate("action_wheel__main_4__action_3__done_first")..Language.getTranslate("skull__"..Skull.SkullList[ActionWheel.SkullState])..Language.getTranslate("action_wheel__main_4__action_3__done_last")) end end diff --git a/scripts/actions/broom_cleaning.lua b/scripts/actions/broom_cleaning.lua index 6b8d0d6..b4f8165 100644 --- a/scripts/actions/broom_cleaning.lua +++ b/scripts/actions/broom_cleaning.lua @@ -4,7 +4,7 @@ BroomCleaning = General.instance({ play = function(self) AnimationAction.play(self) models.models.broom_cleaning.Dust:setOpacity(1) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) Sleeve.Moving = false Arms.hideHeldItem(true) end, @@ -12,7 +12,7 @@ BroomCleaning = General.instance({ ---箒掃除アニメーションを停止する。 stop = function(self) AnimationAction.stop(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) Sleeve.Moving = true end, @@ -20,7 +20,7 @@ BroomCleaning = General.instance({ onAnimationTick = function(self) AnimationAction.onAnimationTick(self) if (self.AnimationCount + 8) % 17 == 0 and self.AnimationCount > 49 then - sounds:playSound("entity.cat.hiss", player:getPos(), 0.5, 2) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.cat.hiss"), player:getPos(), 0.5, 2) models.models.broom_cleaning.Dust:setOpacity(models.models.broom_cleaning.Dust:getOpacity() - 0.14) local dustParticlePivot = models.models.broom_cleaning.Dust.DustParticlePivot:partToWorldMatrix() for _ = 1, 5 do @@ -29,7 +29,7 @@ BroomCleaning = General.instance({ elseif self.AnimationCount == 41 then FaceParts.setEmotion("CLOSED", "CLOSED", "OPENED", 40, true) local playerPos = player:getPos() - sounds:playSound("entity.player.levelup", playerPos, 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.player.levelup"), playerPos, 1, 1.5) for _ = 1, 30 do particles:newParticle(CompatibilityUtils:checkParticle("minecraft:happy_villager"), playerPos:copy():add((math.random() - 0.5) * 4, (math.random() - 0.5) * 4 + 1, (math.random() - 0.5) * 4)) end diff --git a/scripts/actions/cloth_cleaning.lua b/scripts/actions/cloth_cleaning.lua index 9e62f4e..d40534a 100644 --- a/scripts/actions/cloth_cleaning.lua +++ b/scripts/actions/cloth_cleaning.lua @@ -3,7 +3,7 @@ ClothCleaning = General.instance({ ---雑巾がけアニメーションを再生する。 play = function (self) AnimationAction.play(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) Sleeve.Moving = false Arms.hideHeldItem(true) end, @@ -11,7 +11,7 @@ ClothCleaning = General.instance({ ---雑巾がけアニメーションを停止する。 stop = function (self) AnimationAction.stop(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) Sleeve.Moving = true end, @@ -23,7 +23,7 @@ ClothCleaning = General.instance({ elseif self.AnimationCount == 40 then FaceParts.setEmotion("CLOSED", "CLOSED", "OPENED", 40, true) local playerPos = player:getPos() - sounds:playSound("entity.player.levelup", playerPos, 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.player.levelup"), playerPos, 1, 1.5) for _ = 1, 30 do particles:newParticle(CompatibilityUtils:checkParticle("minecraft:happy_villager"), playerPos:copy():add((math.random() - 0.5) * 4, (math.random() - 0.5) * 4 + 1, (math.random() - 0.5) * 4)) end diff --git a/scripts/actions/ear_cuddling.lua b/scripts/actions/ear_cuddling.lua index c6a827c..e523202 100644 --- a/scripts/actions/ear_cuddling.lua +++ b/scripts/actions/ear_cuddling.lua @@ -3,7 +3,7 @@ EarCuddling = General.instance({ ---お耳モフモフアニメーションを再生する。 play = function (self) AnimationAction.play(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) FaceParts.setComplexion("BLUSH", 382, true) Physics.EnablePyhsics[1] = false end, @@ -11,7 +11,7 @@ EarCuddling = General.instance({ ---お耳モフモフアニメーションを停止する。 stop = function (self) if self.AnimationCount > 102 then - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) end AnimationAction.stop(self) Physics.EnablePyhsics[1] = true @@ -26,9 +26,9 @@ EarCuddling = General.instance({ if self.AnimationCount <= 252 and self.AnimationCount > 142 and (self.AnimationCount - 252) % 20 == 0 then if self.AnimationCount == 252 then FaceParts.setEmotion("SURPLISED", "SURPLISED", "NONE", 120, true) - sounds:playSound("entity.experience_orb.pickup", player:getPos(), 0.25, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.experience_orb.pickup"), player:getPos(), 0.25, 1.5) end - sounds:playSound("block.wool.step", player:getPos(), 0.5, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.wool.step"), player:getPos(), 0.5, 1) end local playerPos = player:getPos() for _ = 1, 5 do @@ -36,15 +36,15 @@ EarCuddling = General.instance({ end elseif self.AnimationCount == 132 then FaceParts.setEmotion("SURPLISED", "SURPLISED", "OPENED", 30, true) - sounds:playSound("entity.player.attack.strong", player:getPos(), 1, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.player.attack.strong"), player:getPos(), 1, 1) elseif self.AnimationCount <= 102 and self.AnimationCount > 60 then if self.AnimationCount == 102 then - sounds:playSound("entity.lightning_bolt.thunder", player:getPos(), 1, 1) - sounds:playSound("entity.lightning_bolt.impact", player:getPos(), 1, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.lightning_bolt.thunder"), player:getPos(), 1, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.lightning_bolt.impact"), player:getPos(), 1, 1) models.models.dummy_player:setVisible(false) FaceParts.setEmotion("UNEQUAL", "UNEQUAL", "CLOSED", 42, true) end - sounds:playSound("entity.experience_orb.pickup", player:getPos(), 0.25, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.experience_orb.pickup"), player:getPos(), 0.25, 1.5) elseif self.AnimationCount == 60 then FaceParts.setEmotion("TEAR", "TEAR", "NONE", 60, true) local playerPos = player:getPos() diff --git a/scripts/actions/earpick.lua b/scripts/actions/earpick.lua index d918e99..26ef14f 100644 --- a/scripts/actions/earpick.lua +++ b/scripts/actions/earpick.lua @@ -3,7 +3,7 @@ Earpick = General.instance({ ---耳かきアニメーションを再生する。 play = function (self) AnimationAction.play(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) Arms.RightArmRotOffset = vectors.vec3(-20, -10, 15) Arms.LeftArmRotOffset = vectors.vec3(-20, 10, -15) Arms.hideHeldItem(true) @@ -12,7 +12,7 @@ Earpick = General.instance({ ---耳かきアニメーションを停止する。 stop = function (self) AnimationAction.stop(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) end, ---アニメーション再生中に毎チック実行される関数 @@ -26,7 +26,7 @@ Earpick = General.instance({ FaceParts.setEmotion("CLOSED", "CLOSED", "CLOSED", 40, true) elseif self.AnimationCount == 41 then FaceParts.setEmotion("CLOSED", "CLOSED", "OPENED", 40, true) - sounds:playSound("entity.player.levelup", playerPos, 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.player.levelup"), playerPos, 1, 1.5) for _ = 1, 30 do particles:newParticle(CompatibilityUtils:checkParticle("minecraft:happy_villager"), playerPos:copy():add((math.random() - 0.5) * 4, (math.random() - 0.5) * 4 + 1, (math.random() - 0.5) * 4)) end diff --git a/scripts/actions/fox_jump.lua b/scripts/actions/fox_jump.lua index 58ef0d2..4718bf9 100644 --- a/scripts/actions/fox_jump.lua +++ b/scripts/actions/fox_jump.lua @@ -20,17 +20,17 @@ FoxJump = General.instance({ onAnimationTick = function (self) AnimationAction.onAnimationTick(self) if self.AnimationCount == 98 then - sounds:playSound("entity.snowball.throw", player:getPos(), 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.snowball.throw"), player:getPos(), 1, 1.5) FaceParts.setEmotion("UNEQUAL", "UNEQUAL", "OPENED", 11, true) elseif self.AnimationCount == 87 or (self.AnimationCount <= 83 and self.AnimationCount >= 32 and (self.AnimationCount - 83) % 3 == 0) or self.AnimationCount == 18 then - sounds:playSound("block.snow.break", player:getPos(), 1, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.snow.break"), player:getPos(), 1, 1) for _ = 1, 5 do particles:newParticle(CompatibilityUtils.getBlockParticleId(CompatibilityUtils:checkBlock("minecraft:snow")), FoxJump.TargetPos) end if self.AnimationCount == 87 then FaceParts.setEmotion("UNEQUAL", "UNEQUAL", "CLOSED", 69, true) elseif self.AnimationCount == 18 then - sounds:playSound("entity.snowball.throw", player:getPos(), 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.snowball.throw"), player:getPos(), 1, 1.5) end elseif self.AnimationCount == 1 then self:stop() diff --git a/scripts/actions/hair_cut.lua b/scripts/actions/hair_cut.lua index f2c5817..08b1783 100644 --- a/scripts/actions/hair_cut.lua +++ b/scripts/actions/hair_cut.lua @@ -8,7 +8,7 @@ HairCut = General.instance({ ---散髪アニメーションを再生する。 play = function (self) AnimationAction.play(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) Sleeve.Moving = false Arms.hideHeldItem(true) end, @@ -17,7 +17,7 @@ HairCut = General.instance({ stop = function (self) AnimationAction.stop(self) HairCut.ScissorsItem:setVisible(false) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) Sleeve.Moving = true end, @@ -32,7 +32,7 @@ HairCut = General.instance({ end end if self.AnimationCount <= 468 and self.AnimationCount >= 398 and (self.AnimationCount - 468) % 15 == 0 then - sounds:playSound("entity.cat.hiss", player:getPos(), 0.25, 2) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.cat.hiss"), player:getPos(), 0.25, 2) local splashPos = vectors.rotateAroundAxis(-(player:getBodyYaw() % 360), 0, 0, 0.3, 0, 1):add(player:getPos():add(0, 1)) for _ = 1, 5 do particles:newParticle(CompatibilityUtils:checkParticle("minecraft:splash"), splashPos) @@ -42,32 +42,32 @@ HairCut = General.instance({ modelPart:setVisible(false) end HairCut.ScissorsItem:setVisible(true) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) elseif (self.AnimationCount <= 373 and self.AnimationCount >= 330 and (self.AnimationCount - 373) % 6 == 0) or (self.AnimationCount <= 320 and self.AnimationCount >= 303 and (self.AnimationCount - 320) % 6 == 0) or (self.AnimationCount <= 196 and self.AnimationCount >= 153 and (self.AnimationCount - 196) % 6 == 0) or (self.AnimationCount <= 143 and self.AnimationCount >= 100 and (self.AnimationCount - 143) % 6 == 0) then - sounds:playSound("entity.sheep.shear", player:getPos(), 0.25, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.sheep.shear"), player:getPos(), 0.25, 1) elseif self.AnimationCount == 296 then local playerPos = player:getPos() for _ = 1, 30 do particles:newParticle(CompatibilityUtils:checkParticle("minecraft:smoke"), playerPos:copy():add((math.random() - 0.5) * 2, (math.random() - 0.5) * 2 + 1, (math.random() - 0.5) * 2)) end - sounds:playSound("entity.sheep.shear", player:getPos(), 1, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.sheep.shear"), player:getPos(), 1, 1) FaceParts.setEmotion("SURPLISED", "SURPLISED", "CLOSED", 60, false) models.models.main.Avatar.UpperBody.Arms.LeftArm.LeftArmBottom.HairCutLAB.HairPiece:setVisible(true) elseif self.AnimationCount == 276 then - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) elseif self.AnimationCount == 236 then - sounds:playSound("entity.wolf.shake", player:getPos(), 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.wolf.shake"), player:getPos(), 1, 1.5) FaceParts.setEmotion("UNEQUAL", "UNEQUAL", "CLOSED", 20, true) elseif self.AnimationCount == 216 then models.models.main.Avatar.UpperBody.Arms.LeftArm.LeftArmBottom.HairCutLAB.HairPiece:setVisible(false) elseif self.AnimationCount == 90 then HairCut.ScissorsItem:setVisible(false) elseif self.AnimationCount <= 80 and self.AnimationCount >= 53 and (self.AnimationCount - 80) % 13 == 0 then - sounds:playSound("block.grass.step", player:getPos(), 0.5, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.grass.step"), player:getPos(), 0.5, 1) elseif self.AnimationCount == 40 then FaceParts.setEmotion("CLOSED", "CLOSED", "OPENED", 40, true) local playerPos = player:getPos() - sounds:playSound("entity.player.levelup", playerPos, 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.player.levelup"), playerPos, 1, 1.5) for _ = 1, 30 do particles:newParticle(CompatibilityUtils:checkParticle("minecraft:happy_villager"), playerPos:copy():add((math.random() - 0.5) * 4, (math.random() - 0.5) * 4 + 1, (math.random() - 0.5) * 4)) end diff --git a/scripts/actions/kotatsu.lua b/scripts/actions/kotatsu.lua index 5ce69bd..5aeb663 100644 --- a/scripts/actions/kotatsu.lua +++ b/scripts/actions/kotatsu.lua @@ -22,7 +22,7 @@ Kotatsu = General.instance({ ---@diagnostic disable-next-line: undefined-field SitDown:stop() end - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) if host:isHost() and General.ShowMessage then print(Language.getTranslate("action_wheel__main_1__action_7__start")) end @@ -37,7 +37,7 @@ Kotatsu = General.instance({ ---こたつアニメーションを停止する。 stop = function (self) PermanentAnimationAction.stop(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) if not Armor.ArmorVisible[3] then if Costume.CurrentCostume == "MAID_A" then @@ -59,9 +59,9 @@ Kotatsu = General.instance({ onAnimationTick = function (self) PermanentAnimationAction.onAnimationTick(self) if self.AnimationCount == 282 then - sounds:playSound("block.grass.step", player:getPos(), 1, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.grass.step"), player:getPos(), 1, 1) elseif self.AnimationCount == 275 or self.AnimationCount == 287 then - sounds:playSound("block.grass.step", player:getPos(), 0.5, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.grass.step"), player:getPos(), 0.5, 1) elseif self.AnimationCount == 300 then self.AnimationCount = 1 end diff --git a/scripts/actions/massage.lua b/scripts/actions/massage.lua index 51ea0e8..8d7f2bc 100644 --- a/scripts/actions/massage.lua +++ b/scripts/actions/massage.lua @@ -3,7 +3,7 @@ Massage = General.instance({ ---マッサージのアニメーションを再生する。 play = function (self) AnimationAction.play(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) Arms.RightArmRotOffset = vectors.vec3(-20, -10, 15) Arms.LeftArmRotOffset = vectors.vec3(-20, 10, -15) Arms.hideHeldItem(true) @@ -12,7 +12,7 @@ Massage = General.instance({ ---マッサージのアニメーションを停止する。 stop = function (self) AnimationAction.stop(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) Arms.resetArmRotOffset() end, @@ -24,10 +24,10 @@ Massage = General.instance({ particles:newParticle(CompatibilityUtils:checkParticle("minecraft:end_rod"), playerPos:copy():add((math.random() - 0.5) * 10, (math.random() - 0.5) * 10, (math.random() - 0.5) * 10)) end if (self.AnimationCount <= 403 and self.AnimationCount >= 373 and (self.AnimationCount - 403) % 15 == 0) or (self.AnimationCount <= 341 and self.AnimationCount >= 311 and (self.AnimationCount - 341) % 15 == 0) or (self.AnimationCount <= 279 and self.AnimationCount >= 249 and (self.AnimationCount - 279) % 15 == 0) or (self.AnimationCount <= 151 and self.AnimationCount >= 59 and (self.AnimationCount - 151) % 8 == 0) then - sounds:playSound("block.wool.step", player:getPos(), 0.5, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.wool.step"), player:getPos(), 0.5, 1) if self.AnimationCount == 95 then FaceParts.setEmotion("CLOSED", "CLOSED", "OPENED", 40, true) - sounds:playSound("entity.player.levelup", playerPos, 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.player.levelup"), playerPos, 1, 1.5) for _ = 1, 30 do particles:newParticle(CompatibilityUtils:checkParticle("minecraft:happy_villager"), playerPos:copy():add((math.random() - 0.5) * 4, (math.random() - 0.5) * 4 + 1, (math.random() - 0.5) * 4)) end diff --git a/scripts/actions/shake_body.lua b/scripts/actions/shake_body.lua index 8e575a4..2f02cb2 100644 --- a/scripts/actions/shake_body.lua +++ b/scripts/actions/shake_body.lua @@ -8,7 +8,7 @@ ShakeBody = General.instance({ play = function (self, snowParticle) AnimationAction.play(self) Umbrella.Enabled = true - sounds:playSound("entity.wolf.shake", player:getPos(), 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.wolf.shake"), player:getPos(), 1, 1.5) FaceParts.setEmotion("UNEQUAL", "UNEQUAL", "CLOSED", 20, true) ShakeBody.SnowParticle = snowParticle end, diff --git a/scripts/actions/smile.lua b/scripts/actions/smile.lua index ec73251..23d0757 100644 --- a/scripts/actions/smile.lua +++ b/scripts/actions/smile.lua @@ -6,7 +6,7 @@ Smile = General.instance({ EmotionAction.play(self) if playSoundParticle then local playerPos = player:getPos() - sounds:playSound("entity.player.levelup", playerPos, 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.player.levelup"), playerPos, 1, 1.5) for _ = 1, 30 do particles:newParticle(CompatibilityUtils:checkParticle("minecraft:happy_villager"), playerPos:copy():add((math.random() - 0.5) * 4, (math.random() - 0.5) * 4 + 1, (math.random() - 0.5) * 4)) end diff --git a/scripts/actions/tail_brush.lua b/scripts/actions/tail_brush.lua index 4845567..bdfc0dc 100644 --- a/scripts/actions/tail_brush.lua +++ b/scripts/actions/tail_brush.lua @@ -10,7 +10,7 @@ TailBrush = General.instance({ Sleeve.LeftSleeveRotOffset = vectors.vec3(0, -50) end AnimationAction.play(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) Arms.hideHeldItem(true) Physics.EnablePyhsics[1] = false Sleeve.Moving = false @@ -19,7 +19,7 @@ TailBrush = General.instance({ ---尻尾の手入れアニメーションを停止する。 stop = function (self) if self.AnimationCount > 90 then - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) end Arms.RightArmRotOffset = vectors.vec3() Sleeve.RightSleeveRotOffset = vectors.vec3() @@ -38,15 +38,15 @@ TailBrush = General.instance({ onAnimationTick = function (self) AnimationAction.onAnimationTick(self) if (self.AnimationCount + 50) % 20 == 0 and self.AnimationCount <= 150 and self.AnimationCount >= 110 then - sounds:playSound("block.grass.step", player:getPos(), 1, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.grass.step"), player:getPos(), 1, 1) elseif self.AnimationCount == 90 then - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) models.models.main.Avatar.UpperBody.Arms.RightArm.RightArmBottom.BrushRAB:setVisible(false) elseif (self.AnimationCount + 80) % 20 == 0 and self.AnimationCount <= 80 and self.AnimationCount >= 40 then if self.AnimationCount == 80 then FaceParts.setEmotion("CLOSED", "CLOSED", "CLOSED", 60, true) end - sounds:playSound("block.grass.step", player:getPos(), 0.5, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.grass.step"), player:getPos(), 0.5, 1) end end }, AnimationAction, function () diff --git a/scripts/actions/tail_cuddling.lua b/scripts/actions/tail_cuddling.lua index 56299bb..4a99b06 100644 --- a/scripts/actions/tail_cuddling.lua +++ b/scripts/actions/tail_cuddling.lua @@ -3,14 +3,14 @@ TailCuddling = General.instance({ ---尻尾モフモフアニメーションを再生する。 play = function (self) AnimationAction.play(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) Physics.EnablePyhsics[1] = false end, ---尻尾モフモフアニメーションを停止する。 stop = function (self) if self.AnimationCount > 20 then - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) end AnimationAction.stop(self) Physics.EnablePyhsics[1] = true @@ -34,31 +34,31 @@ TailCuddling = General.instance({ FaceParts.setComplexion("BLUSH", 210, true) elseif self.AnimationCount == 270 then FaceParts.setEmotion("SURPLISED", "SURPLISED", "NONE", 90, true) - sounds:playSound("entity.experience_orb.pickup", player:getPos(), 0.25, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.experience_orb.pickup"), player:getPos(), 0.25, 1.5) elseif self.AnimationCount <= 250 and self.AnimationCount >= 160 then if (self.AnimationCount - 250) % 20 == 0 then - sounds:playSound("block.grass.step", player:getPos(), 0.5, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.grass.step"), player:getPos(), 0.5, 1) end if self.AnimationCount == 180 then FaceParts.setEmotion("UNEQUAL", "UNEQUAL", "NONE", 20, true) - sounds:playSound("minecraft:entity.wolf.shake", player:getPos(), 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.wolf.shake"), player:getPos(), 1, 1.5) elseif self.AnimationCount == 160 then FaceParts.setEmotion("CLOSED", "CLOSED", "NONE", 100, true) end elseif self.AnimationCount <= 130 and self.AnimationCount >= 20 then if (self.AnimationCount - 130) % 10 == 0 then - sounds:playSound("block.grass.step", player:getPos(), 0.5, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.grass.step"), player:getPos(), 0.5, 1) end if self.AnimationCount == 60 then FaceParts.setEmotion("CLOSED", "CLOSED", "OPENED", 40, true) local playerPos = player:getPos() - sounds:playSound("minecraft:entity.player.levelup", playerPos, 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.player.levelup"), playerPos, 1, 1.5) for _ = 1, 30 do particles:newParticle(CompatibilityUtils:checkParticle("minecraft:happy_villager"), playerPos:copy():add((math.random() - 0.5) * 4, (math.random() - 0.5) * 4 + 1, (math.random() - 0.5) * 4)) end elseif self.AnimationCount == 20 then models.models.dummy_player:setVisible(false) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) end end end diff --git a/scripts/actions/tea_time.lua b/scripts/actions/tea_time.lua index a8ec2ce..a499653 100644 --- a/scripts/actions/tea_time.lua +++ b/scripts/actions/tea_time.lua @@ -3,7 +3,7 @@ TeaTime = General.instance({ ---お茶飲みのアニメーションを再生する。 play = function (self) AnimationAction.play(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) Arms.RightArmRotOffset = vectors.vec3(-20, -10, 15) Arms.LeftArmRotOffset = vectors.vec3(-20, 10, -15) Arms.hideHeldItem(true) @@ -12,7 +12,7 @@ TeaTime = General.instance({ ---お茶飲みのアニメーションを停止する。 stop = function (self) AnimationAction.stop(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) end, ---アニメーション再生中に毎チック実行される関数 @@ -28,13 +28,13 @@ TeaTime = General.instance({ if self.AnimationCount == 210 then FaceParts.setEmotion("CLOSED", "CLOSED", "CLOSED", 160, true) end - sounds:playSound("entity.generic.drink", player:getPos(), 0.5, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.generic.drink"), player:getPos(), 0.5, 1) elseif self.AnimationCount == 50 then elseif self.AnimationCount == 40 then FaceParts.setEmotion("CLOSED", "CLOSED", "OPENED", 40, true) local playerPos = player:getPos() - sounds:playSound("entity.player.levelup", playerPos, 1, 1.5) - sounds:playSound("block.stone.break", player:getPos(), 0.5, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.player.levelup"), playerPos, 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.stone.break"), player:getPos(), 0.5, 1) for _ = 1, 30 do particles:newParticle(CompatibilityUtils:checkParticle("minecraft:happy_villager"), playerPos:copy():add((math.random() - 0.5) * 4, (math.random() - 0.5) * 4 + 1, (math.random() - 0.5) * 4)) end diff --git a/scripts/actions/vacuum_cleaning.lua b/scripts/actions/vacuum_cleaning.lua index a83438f..e37e877 100644 --- a/scripts/actions/vacuum_cleaning.lua +++ b/scripts/actions/vacuum_cleaning.lua @@ -3,7 +3,7 @@ VacuumCleaning = General.instance({ ---掃除機アニメーションを再生する。 play = function (self) AnimationAction.play(self) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) Sleeve.Moving = false Arms.hideHeldItem(true) end, @@ -11,7 +11,7 @@ VacuumCleaning = General.instance({ ---掃除機アニメーションを停止する。 stop = function (self) if self.AnimationCount > 148 then - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) end AnimationAction.stop(self) Ears.EarsRotCount = 0 @@ -22,26 +22,26 @@ VacuumCleaning = General.instance({ onAnimationTick = function(self) AnimationAction.onAnimationTick(self) if self.AnimationCount == 236 then - sounds:playSound("block.stone_button.click_on", player:getPos(), 1, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.stone_button.click_on"), player:getPos(), 1, 1.5) elseif self.AnimationCount <= 231 and self.AnimationCount > 148 then if self.AnimationCount <= 231 and self.AnimationCount > 192 then if self.AnimationCount == 231 then FaceParts.setEmotion("SURPLISED", "SURPLISED", "CLOSED", 39, true) Ears.setEarsRot("DROOPING", 230, true) end - sounds:playSound("entity.experience_orb.pickup", player:getPos(), 0.25, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.experience_orb.pickup"), player:getPos(), 0.25, 1.5) elseif self.AnimationCount <= 189 and self.AnimationCount >= 149 and (self.AnimationCount - 149) % 10 == 0 then - sounds:playSound("entity.iron_golem.step", player:getPos(), 1, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.iron_golem.step"), player:getPos(), 1, 1) end if self.AnimationCount == 192 then FaceParts.setEmotion("UNEQUAL", "UNEQUAL", "CLOSED", 76, true) end - sounds:playSound("entity.minecart.riding", player:getPos(), 0.25, 2) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.minecart.riding"), player:getPos(), 0.25, 2) local exhaustParticlePivot = models.models.vacuum_cleaning.VeccumCleaner.ExhaustParticlePivot:partToWorldMatrix() particles:newParticle(CompatibilityUtils:checkParticle("minecraft:poof"), exhaustParticlePivot[4][1], exhaustParticlePivot[4][2], exhaustParticlePivot[4][3]):scale(0.3) elseif self.AnimationCount == 148 then models.models.vacuum_cleaning:setVisible(false) - sounds:playSound("entity.item.pickup", player:getPos(), 1, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.item.pickup"), player:getPos(), 1, 0.5) elseif self.AnimationCount == 119 then FaceParts.setEmotion("SURPLISED", "SURPLISED", "CLOSED", 85, true) elseif self.AnimationCount == 34 then diff --git a/scripts/christmas.lua b/scripts/christmas.lua index 34b2252..a032fa6 100644 --- a/scripts/christmas.lua +++ b/scripts/christmas.lua @@ -8,19 +8,19 @@ events.TICK:register(function () if Christmas.MelodyCount >= 0 then if Christmas.MelodyCount == 0 or Christmas.MelodyCount == 8 or Christmas.MelodyCount == 16 or Christmas.MelodyCount == 28 or Christmas.MelodyCount == 32 or Christmas.MelodyCount == 80 then --シ♭ - sounds:playSound("block.note_block.chime", player:getPos(), 1, 1.259921) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.note_block.chime"), player:getPos(), 1, 1.259921) elseif Christmas.MelodyCount == 40 or Christmas.MelodyCount == 48 or Christmas.MelodyCount == 56 then --ラ - sounds:playSound("block.note_block.chime", player:getPos(), 1, 1.189207) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.note_block.chime"), player:getPos(), 1, 1.189207) elseif Christmas.MelodyCount == 64 or Christmas.MelodyCount == 72 then --ド - sounds:playSound("block.note_block.chime", player:getPos(), 1, 1.414214) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.note_block.chime"), player:getPos(), 1, 1.414214) elseif Christmas.MelodyCount == 88 then --ソ - sounds:playSound("block.note_block.chime", player:getPos(), 1, 1.059463) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.note_block.chime"), player:getPos(), 1, 1.059463) elseif Christmas.MelodyCount == 96 then --ファ - sounds:playSound("block.note_block.chime", player:getPos(), 1, 0.943874) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.note_block.chime"), player:getPos(), 1, 0.943874) Christmas.MelodyCount = -1 return end diff --git a/scripts/ears.lua b/scripts/ears.lua index 809f3b1..9866d3c 100644 --- a/scripts/ears.lua +++ b/scripts/ears.lua @@ -33,7 +33,7 @@ function pings.jerk_ears() for _, modelAnimation in ipairs({animations["models.main"], animations["models.armor"], animations["models.costume_knit"], animations["models.costume_fox_hood"]}) do modelAnimation["jerk_ears"]:play() end - sounds:playSound("entity.egg.throw", player:getPos(), 0.25, 2) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.egg.throw"), player:getPos(), 0.25, 2) Ears.JerkEarsCount = 5 end diff --git a/scripts/fox_fire/fox_fire.lua b/scripts/fox_fire/fox_fire.lua index f36a396..fe3e3f8 100644 --- a/scripts/fox_fire/fox_fire.lua +++ b/scripts/fox_fire/fox_fire.lua @@ -111,7 +111,7 @@ FoxFire = { table.remove(self.IsLit, 1) end if self.IsLit[2] ~= self.IsLit[1] and self.Phase == "NORMAL" then - sounds:playSound(CompatibilityUtils:checkParticle(self.IsLit[2] and "minecraft:item.firecharge.use" or "minecraft:block.fire.extinguish"), self.FoxFireModel:getPos():scale(0.0625), 0.25, 2) + sounds:playSound(CompatibilityUtils:checkSound(self.IsLit[2] and "minecraft:item.firecharge.use" or "minecraft:block.fire.extinguish"), self.FoxFireModel:getPos():scale(0.0625), 0.25, 2) end if self.ModelScale > 0 then self.IsAboveSoudBlock = false @@ -146,10 +146,10 @@ FoxFire = { self.AmbientSoundCount = self.AmbientSoundCount - 1 if self.AmbientSoundCount == 0 then if self.IsAboveSoudBlock then - sounds:playSound("minecraft:item.firecharge.use", self.CurrentPos:copy():scale(0.0625), 0.02, 0.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:item.firecharge.use"), self.CurrentPos:copy():scale(0.0625), 0.02, 0.5) self.AmbientSoundCount = math.random(20, 40) else - sounds:playSound("minecraft:block.fire.ambient", self.CurrentPos:copy():scale(0.0625), 0.1, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.fire.ambient"), self.CurrentPos:copy():scale(0.0625), 0.1, 1) self.AmbientSoundCount = math.random(51, 100) end end diff --git a/scripts/fox_fire/fox_fire_manager.lua b/scripts/fox_fire/fox_fire_manager.lua index 5a7385e..d3e9a14 100644 --- a/scripts/fox_fire/fox_fire_manager.lua +++ b/scripts/fox_fire/fox_fire_manager.lua @@ -33,7 +33,7 @@ FoxFireManager = { for i, _ in ipairs(models.models.main.FoxFireAnchors:getChildren()) do table.insert(self.FoxFireInstances, self.FoxFire.new(i)) end - sounds:playSound("minecraft:item.firecharge.use", player:getPos(), 1, 2) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:item.firecharge.use"), player:getPos(), 1, 2) events.TICK:register(function () if not client:isPaused() then for index, foxFireInstance in ipairs(self.FoxFireInstances) do @@ -68,7 +68,7 @@ FoxFireManager = { for _, foxFireInstance in ipairs(self.FoxFireInstances) do foxFireInstance:onDeinit() end - sounds:playSound("minecraft:block.fire.extinguish", player:getPos(), 1, 2) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.fire.extinguish"), player:getPos(), 1, 2) end self.Enabled = enabled end, diff --git a/scripts/tail.lua b/scripts/tail.lua index 76b6961..728dc9e 100644 --- a/scripts/tail.lua +++ b/scripts/tail.lua @@ -14,9 +14,9 @@ end events.TICK:register(function () if Wet.WetCount == 0 then if Tail.WagTailCount == 18 then - sounds:playSound("block.grass.step", player:getPos(), 1, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.grass.step"), player:getPos(), 1, 1) elseif Tail.WagTailCount == 25 or Tail.WagTailCount == 13 then - sounds:playSound("block.grass.step", player:getPos(), 0.5, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:block.grass.step"), player:getPos(), 0.5, 1) end end Tail.WagTailCount = Tail.WagTailCount > 0 and Tail.WagTailCount - 1 or 0 diff --git a/scripts/umbrella.lua b/scripts/umbrella.lua index c609395..3df9fb6 100644 --- a/scripts/umbrella.lua +++ b/scripts/umbrella.lua @@ -20,7 +20,7 @@ events.TICK:register(function () Umbrella.IsUsing = (((player:isInRain() or Umbrella.AlwaysUse) and not player:getHeldItem().id:find("^minecraft:.+_sword$") and player:getHeldItem(true).id == "minecraft:air" and (mainHeldItem.id ~= "minecraft:crossbow" or mainHeldItem.tag["Charged"] == 0)) or PhotoPose.CurrentPose == 7) and not player:isUnderwater() and activeItem.id ~= "minecraft:bow" and activeItem.id ~= "minecraft:crossbow" and not player:getVehicle() and playerPose ~= "FALL_FLYING" and playerPose ~= "SWIMMING" and Umbrella.Enabled if Umbrella.IsUsing then if not Umbrella.IsUsingPrev and Umbrella.Sound then - sounds:playSound("minecraft:entity.bat.takeoff", player:getPos(), 0.5, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.bat.takeoff"), player:getPos(), 0.5, 1.5) end if PhotoPose.CurrentPose == 0 and Naginata.State[1] <= 1 and Naginata.State[2] <= 1 then if leftHanded then @@ -36,7 +36,7 @@ events.TICK:register(function () models.models.main.Avatar.UpperBody.Body.UmbrellaB:setVisible(true) else if Umbrella.IsUsingPrev and Umbrella.Sound then - sounds:playSound("minecraft:entity.bat.takeoff", player:getPos(), 0.5, 1.5) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.bat.takeoff"), player:getPos(), 0.5, 1.5) if PhotoPose.CurrentPose == 0 and Naginata.State[1] <= 1 and Naginata.State[2] <= 1 then Arms.RightArmRotOffset = vectors.vec3() Arms.LeftArmRotOffset = vectors.vec3() diff --git a/scripts/wet.lua b/scripts/wet.lua index dbbafda..3b94144 100644 --- a/scripts/wet.lua +++ b/scripts/wet.lua @@ -18,7 +18,7 @@ Wet = { --ping関数 function pings.wetJumpSound() - sounds:playSound("minecraft:entity.cod.flop", player:getPos(), Wet.WetCount / 1200, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.cod.flop"), player:getPos(), Wet.WetCount / 1200, 1) end events.TICK:register(function() @@ -30,7 +30,7 @@ events.TICK:register(function() Wet.WalkDistance = Wet.WalkDistance + math.sqrt(math.abs(velocity.x ^ 2 + velocity.z ^ 2)) if Wet.WalkDistance >= 1.8 then if not player:getVehicle() and onGround and not player:isInWater() then - sounds:playSound("minecraft:entity.cod.flop", playerPos, Wet.WetCount / 1200, 1) + sounds:playSound(CompatibilityUtils:checkSound("minecraft:entity.cod.flop"), playerPos, Wet.WetCount / 1200, 1) end Wet.WalkDistance = 0 end