diff --git a/CHANGELOG.md b/CHANGELOG.md index bd559ffd50..aa31b93a95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -176,6 +176,7 @@ - Fixed typo while saving/loading NPCEntity causes data loss - Fixed an issue where catching a Pokémon while it was leashed to a fence would not update the fence. - Fixed the `dimensions` spawning condition using the incorrect ResourceLocation, causing it to not function properly. +- Fix issue where locator X axis was not aligned with blockbench. ### Developer - A finished battle now has winners and losers set inside of `PokemonBattle` instead of them always being empty. diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/api/snowstorm/ParticleEmitterShape.kt b/common/src/main/kotlin/com/cobblemon/mod/common/api/snowstorm/ParticleEmitterShape.kt index 9589d96b33..0f0e18a367 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/api/snowstorm/ParticleEmitterShape.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/api/snowstorm/ParticleEmitterShape.kt @@ -14,11 +14,16 @@ import com.bedrockk.molang.ast.NumberExpression import com.bedrockk.molang.runtime.MoLangRuntime import com.cobblemon.mod.common.api.codec.CodecMapped import com.cobblemon.mod.common.api.data.ArbitrarilyMappedSerializableCompanion -import com.cobblemon.mod.common.util.* +import com.cobblemon.mod.common.util.asExpression import com.cobblemon.mod.common.util.codec.EXPRESSION_CODEC +import com.cobblemon.mod.common.util.getString import com.cobblemon.mod.common.util.math.convertSphericalToCartesian import com.cobblemon.mod.common.util.math.getRotationMatrix import com.cobblemon.mod.common.util.math.times +import com.cobblemon.mod.common.util.readString +import com.cobblemon.mod.common.util.resolveDouble +import com.cobblemon.mod.common.util.resolveVec3d +import com.cobblemon.mod.common.util.writeString import com.mojang.serialization.Codec import com.mojang.serialization.DataResult import com.mojang.serialization.DynamicOps @@ -27,10 +32,10 @@ import com.mojang.serialization.codecs.RecordCodecBuilder import net.minecraft.network.RegistryFriendlyByteBuf import net.minecraft.world.entity.Entity import net.minecraft.world.phys.AABB +import net.minecraft.world.phys.Vec3 import kotlin.math.cos import kotlin.math.sin import kotlin.random.Random -import net.minecraft.world.phys.Vec3 interface ParticleEmitterShape : CodecMapped { companion object : ArbitrarilyMappedSerializableCompanion( @@ -261,9 +266,9 @@ class BoxParticleEmitterShape( } } else { Vec3( - Random.nextDouble(sizes.x) - sizes.x / 2, - Random.nextDouble(sizes.y) - sizes.y / 2, - Random.nextDouble(sizes.z) - sizes.z / 2 + Random.nextDouble(sizes.x) - sizes.x / 2.0, + Random.nextDouble(sizes.y) - sizes.y / 2.0, + Random.nextDouble(sizes.z) - sizes.z / 2.0 ) } diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/client/render/MatrixWrapper.kt b/common/src/main/kotlin/com/cobblemon/mod/common/client/render/MatrixWrapper.kt index 0346645361..173656313b 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/client/render/MatrixWrapper.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/client/render/MatrixWrapper.kt @@ -10,7 +10,6 @@ package com.cobblemon.mod.common.client.render import com.cobblemon.mod.common.util.math.geometry.getOrigin import com.cobblemon.mod.common.util.math.geometry.transformPosition -import net.fabricmc.loader.impl.lib.sat4j.core.Vec import org.joml.Matrix4f import net.minecraft.world.phys.Vec3 diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/LocatorAccess.kt b/common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/LocatorAccess.kt index 88af62a0b3..bc7f341c38 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/LocatorAccess.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/LocatorAccess.kt @@ -75,7 +75,7 @@ class LocatorAccess( if (isRoot && null!=entity) { matrixStack.pushPose() - matrixStack.scale(-1F, -1F, 1F) + matrixStack.scale(1F, -1F, 1F) state.getOrPut("root") { MatrixWrapper() }.updateMatrix(matrixStack.last().pose()) matrixStack.popPose()