mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-11-13 03:38:53 -05:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dac4eb3501 |
No files matched your search
@@ -29,6 +29,7 @@
|
||||
- Added `v.spawnable_position` to the weight spawn rule component's "weight" expression
|
||||
|
||||
### Particles
|
||||
- Fixes emitters being rotated by a model's locators when local rotation was off. This should fix some niche unexpected rotation issues from occurring.
|
||||
|
||||
### Localization
|
||||
- Updated translations for:
|
||||
@@ -31,8 +31,8 @@ class EmitterSpace(
|
||||
}
|
||||
}
|
||||
|
||||
fun initializeEmitterMatrix(rootMatrix: MatrixWrapper, locatorMatrix: MatrixWrapper): MatrixWrapper {
|
||||
var rootRotation = rootMatrix.matrix.getRotation(AxisAngle4f())
|
||||
fun initializeEmitterMatrix(rootMatrix: MatrixWrapper, locatorMatrix: MatrixWrapper, localSpaceRotation: Boolean = true): MatrixWrapper {
|
||||
var rootRotation = if (localSpaceRotation) rootMatrix.matrix.getRotation(AxisAngle4f()) else AxisAngle4f()
|
||||
//When the locator hasn't yet been initialized, we start getting NaNs, so default to no rotation instead
|
||||
if (rootRotation.x.isNaN() || rootRotation.y.isNaN() || rootRotation.z.isNaN() || rootRotation.angle.isNaN()) {
|
||||
rootRotation = AxisAngle4f()
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ object SpawnSnowstormEntityParticleHandler : ClientNetworkPacketHandler<SpawnSno
|
||||
sourceLocators.forEach { locator ->
|
||||
val locatorMatrix = sourceState.locatorStates[locator]!!
|
||||
|
||||
val particleMatrix = effect.emitter.space.initializeEmitterMatrix(rootMatrix, locatorMatrix)
|
||||
val particleMatrix = effect.emitter.space.initializeEmitterMatrix(rootMatrix, locatorMatrix, effect.space.localRotation)
|
||||
val particleRuntime = MoLangRuntime().setup().setupClient()
|
||||
particleRuntime.environment.query.addFunction("entity") { sourceState.runtime.environment.query }
|
||||
|
||||
|
||||
+1
-1
@@ -355,7 +355,7 @@ abstract class PosableState : Schedulable {
|
||||
|
||||
val rootMatrix = locatorStates["root"] ?: return@addFunction DoubleValue.ZERO // Played before it's on screen for the first time
|
||||
val locatorMatrix = locatorStates[locator] ?: rootMatrix
|
||||
val particleMatrix = effect.emitter.space.initializeEmitterMatrix(rootMatrix, locatorMatrix)
|
||||
val particleMatrix = effect.emitter.space.initializeEmitterMatrix(rootMatrix, locatorMatrix, effect.space.localRotation)
|
||||
val particleRuntime = MoLangRuntime().setup().setupClient()
|
||||
particleRuntime.environment.query.addFunction("entity") { runtime.environment.query }
|
||||
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ class BedrockParticleKeyframe(
|
||||
|
||||
val rootMatrix = state.locatorStates["root"]!!
|
||||
val locatorMatrix = state.locatorStates[locator] ?: state.locatorStates["root"]!!
|
||||
val particleMatrix = effect.emitter.space.initializeEmitterMatrix(rootMatrix, locatorMatrix)
|
||||
val particleMatrix = effect.emitter.space.initializeEmitterMatrix(rootMatrix, locatorMatrix, effect.space.localRotation)
|
||||
|
||||
if (this in state.poseParticles) {
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user