Make main source set compile against 1.19.3

This commit is contained in:
DBotThePony 2024-01-01 22:12:39 +07:00
parent 41ce2841b1
commit b9f6b65900
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import com.mojang.blaze3d.vertex.Tesselator
import com.mojang.blaze3d.vertex.VertexConsumer
import net.minecraft.core.Vec3i
import org.joml.Matrix4f
import org.joml.Quaternionf
import org.joml.Vector3f
import ru.dbotthepony.mc.otm.core.math.IAngle
import ru.dbotthepony.mc.otm.core.math.RGBAColor
@ -52,6 +53,12 @@ fun PoseStack.rotateAroundPoint(point: Vector3f, rotation: IAngle) {
// last.normal().mul(rotation.forward().rotateAroundThis(rotation))
}
fun PoseStack.rotateAround(rotationMatrix: Quaternionf, x: Float, y: Float, z: Float) {
val pose = last
pose.pose.rotateAround(rotationMatrix, x, y, z)
pose.normal().rotate(rotationMatrix)
}
fun PoseStack.translation(): Vector3f {
return last().pose().translation
}

View File

@ -18,6 +18,7 @@ import net.minecraftforge.fluids.FluidStack
import net.minecraftforge.fluids.capability.IFluidHandler
import ru.dbotthepony.mc.otm.block.entity.decorative.FluidTankBlockEntity
import ru.dbotthepony.mc.otm.client.minecraft
import ru.dbotthepony.mc.otm.client.render.rotateAround
import ru.dbotthepony.mc.otm.core.ifPresentK
import ru.dbotthepony.mc.otm.core.math.RGBAColor
import ru.dbotthepony.mc.otm.core.math.linearInterpolation