mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-10-21 14:46:25 -04:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09eb3395c0 | ||
|
|
48d289279a |
+25
@@ -326,6 +326,31 @@ abstract class PosableState : Schedulable {
|
||||
}
|
||||
}
|
||||
}
|
||||
.addFunction("recurring_sound") { params ->
|
||||
if (params.get<MoValue>(0) !is StringValue) {
|
||||
return@addFunction Unit
|
||||
}
|
||||
//param 0 - sound
|
||||
//param 1 - offset
|
||||
//param 2 -
|
||||
val curr_time = reusableAnimTime.value
|
||||
val entity = getEntity()
|
||||
val soundEvent = SoundEvent.createVariableRangeEvent(params.getString(0).asIdentifierDefaultingNamespace())
|
||||
val offset = params.getDouble(1)
|
||||
val loopLength = params.getDouble(2)
|
||||
if (soundEvent != null) {
|
||||
val volume = 1F
|
||||
val pitch = 1F
|
||||
if( )
|
||||
if (entity != null) {
|
||||
if (!entity.isSilent) {
|
||||
entity.level().playLocalSound(entity, soundEvent, entity.soundSource, volume, pitch)
|
||||
}
|
||||
} else {
|
||||
Minecraft.getInstance().soundManager.play(SimpleSoundInstance.forUI(soundEvent, volume, pitch))
|
||||
}
|
||||
}
|
||||
}
|
||||
.addFunction("render_item") { params ->
|
||||
if (params.get<MoValue>(0) !is StringValue) return@addFunction Unit
|
||||
|
||||
|
||||
+8
@@ -17503,6 +17503,10 @@
|
||||
"3.1667": {
|
||||
"effect": "animation.leather.wing_flap.medium"
|
||||
}
|
||||
},
|
||||
"timeline": {
|
||||
"1.125": "q.has_entity ? { q.sound('animation.chitin.wing_flap.medium'); };",
|
||||
"3.1667": "q.has_entity ? { q.particle('cobblemon:ambient_shiny_sparkle', 'root'); };"
|
||||
}
|
||||
},
|
||||
"animation.charizard.air_fly": {
|
||||
@@ -18791,6 +18795,10 @@
|
||||
"3.0833": {
|
||||
"effect": "animation.leather.wing_flap.medium"
|
||||
}
|
||||
},
|
||||
"timeline": {
|
||||
"1.0833": "q.particle('cobblemon:ambient_shiny_sparkle', 'root');",
|
||||
"3.0833": "q.sound('animation.chitin.wing_flap.medium');"
|
||||
}
|
||||
},
|
||||
"animation.charizard.air_glide_TEST": {
|
||||
|
||||
Reference in New Issue
Block a user