#Cannot seem to set position of bone, only position of geometry

6 messages · Page 1 of 1 (latest)

earnest cosmos
#

Hi! I'm trying to take a 1.18.2 LivingEntity and backport it to 1.16. I've got the deobfuscated java file and I'm using that to try to reconstruct the model in block bench. However, there's a method, PartPose.offsetAndRotation, that doesn't seem to have a BlockBench analogue.

Here is the code for the first two bones:

            CubeListBuilder.create()
                .texOffs(0, 30).addBox(-3.0F, -1.5F, -1.5F, 6.0F, 3.0F, 3.0F)
                .texOffs(64, 19).addBox(-3.5F, -2.0F, -2.0F, 7.0F, 4.0F, 4.0F), 
            PartPose.offsetAndRotation(0.0F, -13.5F, 0.0F, 0.3927F, 0.0F, 0.0F));

        PartDefinition bodymiddle = bodybottom.addOrReplaceChild("bodymiddle", 
            CubeListBuilder.create()
                .texOffs(0, 25).addBox(-2.0F, -2.5F, -1.5F, 4.0F, 3.0F, 2.0F)
                .texOffs(0, 25).addBox(-0.5F, -2.0F, -1.6F, 1.0F, 2.0F, 0.0F),
            PartPose.offsetAndRotation(0.0F, -1.5F, 0.5F, -0.1745F, 0.0F, 0.0F));```

Pictured below is what I have so far.

Now, the `PartPose.offsetAndRotation` seems to be setting a position for the bone itself, and the first three arguments of the `addBox` command seems to be placing the geometry's position _relative_ to the bone. The problem is that I don't seem to be able to place the bone's position in the editor. (See red question marks where position normally is.)

How do I handle this? Is the intended flow to add the cube's translation to the bone's translation, then set the bone's "pivot point" to be the offset? If I do that, then export to an MCP java file, will it subtract the bone's translation from the geometry's translation automatically?
coarse swallow
#

Have you considered asking the mods author whether you're allowed to use their model?

#

They could give it to if they're fine with it.

earnest cosmos
#

I was eventually able to figure it out. Once I'd done one by hand, and thus knew the process thoroughly, I was able to automate it, and now I've got a script now that will convert 1.18 models into 1.16 format. Ironically, these 1.16 java files can then be loaded by blockbench, so in a roundabout way I've gotten blockbench to accept 1.18 models.

coarse swallow
#

Welp, then at least make sure that the mod author learns to keep the bbmodel, and stops ignoring the massive warning it gives you on export.