diff --git a/src/main/kotlin/com/bytedice/bde_particles/Bde_particles.kt b/src/main/kotlin/com/bytedice/bde_particles/Bde_particles.kt index 0abab38..1cb671d 100644 --- a/src/main/kotlin/com/bytedice/bde_particles/Bde_particles.kt +++ b/src/main/kotlin/com/bytedice/bde_particles/Bde_particles.kt @@ -49,10 +49,12 @@ import kotlin.reflect.full.declaredMemberProperties // TODO: (future additions) // Allowing the use of regular Minecraft particles instead of just BDEs. + // Will basically require a whole new system. + // Most likely wont ever happen. // Cylinder and cone force field shape. -// Copying particle params in-game -// Custom curve equation command args (parse from strings) -// force field "config" option +// Copying particle params in-game. +// Custom curve equation command args (parse from strings). +// force field "config" option. var ALL_PARTICLE_EMITTERS: Array = emptyArray() diff --git a/src/main/kotlin/com/bytedice/bde_particles/DisplayEntity.kt b/src/main/kotlin/com/bytedice/bde_particles/DisplayEntity.kt index 9b4200a..ce4695f 100644 --- a/src/main/kotlin/com/bytedice/bde_particles/DisplayEntity.kt +++ b/src/main/kotlin/com/bytedice/bde_particles/DisplayEntity.kt @@ -49,11 +49,13 @@ class DisplayEntity(private var properties: DisplayEntityProperties?) { put("Tags", tagList) - put("item", NbtCompound().apply { - putString("id", modelName) - putInt("count", 1) - put("components", NbtCompound().apply { putInt("minecraft:custom_model_data", customModelNum) }) - }) + if (modelName != "none") { + put("item", NbtCompound().apply { + putString("id", modelName) + putInt("count", 1) + put("components", NbtCompound().apply { putInt("minecraft:custom_model_data", customModelNum) }) + }) + } put("transformation", NbtCompound().apply { val offsetList = NbtList().apply { diff --git a/src/main/kotlin/com/bytedice/bde_particles/commands/ConfigArgs.kt b/src/main/kotlin/com/bytedice/bde_particles/commands/ConfigArgs.kt index 7a5f14b..4bc324d 100644 --- a/src/main/kotlin/com/bytedice/bde_particles/commands/ConfigArgs.kt +++ b/src/main/kotlin/com/bytedice/bde_particles/commands/ConfigArgs.kt @@ -219,7 +219,7 @@ fun vec3fArg(access: KProperty1) : RequiredArgumentBuil val valueY = FloatArgumentType.getFloat(context, "Y") val valueZ = FloatArgumentType.getFloat(context, "Z") - updateParam(id, access, Vector3f(valueX, valueY, valueX)) + updateParam(id, access, Vector3f(valueX, valueY, valueZ)) successText(access, "[$valueX, $valueY, $valueZ]", id, context) Command.SINGLE_SUCCESS diff --git a/src/main/kotlin/com/bytedice/bde_particles/particles/Particle.kt b/src/main/kotlin/com/bytedice/bde_particles/particles/Particle.kt index e32be3e..026c6a4 100644 --- a/src/main/kotlin/com/bytedice/bde_particles/particles/Particle.kt +++ b/src/main/kotlin/com/bytedice/bde_particles/particles/Particle.kt @@ -75,7 +75,7 @@ class Particle( val properties = DisplayEntityProperties( pos = entityPos, rot = entityRot, - model = emitterParams.modelCurve.lerp(0.0f), + model = if (emitterParams.modelCurve.array.isNotEmpty()) { emitterParams.modelCurve.lerp(0.0f) } else "none", translation = newPos.add(pos), leftRotation = quatRot, scale = Vector3f(scale).mul(emitterParams.scaleCurve.lerpToVector3f(0.0f)), @@ -130,7 +130,7 @@ class Particle( private fun calcNewProperties() : DisplayEntityProperties { val timeAliveClamped = (timeAlive.toFloat() / lifeTime.toFloat()).coerceIn(0.0f, 1.0f) - val newModel = emitterParams.modelCurve.lerp(timeAliveClamped) + val newModel = if (emitterParams.modelCurve.array.isNotEmpty()) { emitterParams.modelCurve.lerp(timeAliveClamped) } else "none" val (newVel, newPos) = calcPos() val newOriginOffset = Vector3f(originOffset.mul(emitterParams.offsetCurve.lerpToVector3f(timeAliveClamped))) diff --git a/src/main/kotlin/com/bytedice/bde_particles/particles/Shapes.kt b/src/main/kotlin/com/bytedice/bde_particles/particles/Shapes.kt index 31e657d..dcea6c0 100644 --- a/src/main/kotlin/com/bytedice/bde_particles/particles/Shapes.kt +++ b/src/main/kotlin/com/bytedice/bde_particles/particles/Shapes.kt @@ -51,7 +51,7 @@ sealed class SpawningShape() { } fun randomOnEdge(): Vector3f { - val edgeIndex = randomIntBetween(0, 11) // 12 edges + val edgeIndex = randomIntBetween(0, 12) // 12 edges val randPos = randomFloatBetween(0.0f, 1.0f) return when (edgeIndex) {