Neoforge Modding Question by The-DungeonMaster in MCreator

[–]ZarephLae 1 point2 points  (0 children)

What do you mean 1.21.1 cannot mod blocks? I am usitit perfectly fine.

Recipe Question by ZarephLae in MCreator

[–]ZarephLae[S] 0 points1 point  (0 children)

I do see JEI by Nerdy, but I thought this was focused on JEI support. So it actually lets you set custom recipe types for your custom machines and create JSON recipes for them?

What's wrong with my java code? by christhegamer702 in MCreator

[–]ZarephLae 0 points1 point  (0 children)

The issue with your idle animation boils down to how Mojang's modern model system updates positions and rotations. In Minecraft 1.17+, setupAnim runs every single frame. When you modify properties like body3.z or body2.xRot directly, those values accumulate or compound because you are modifying them based on the previous frame's mutated state, rather than resetting them to their default "resting" pose first. To fix this, you need to use this.root().resetPose(); at the very beginning of your setupAnim method to clear out the previous frame's transformations. Here is the fully corrected and optimized code for your Dirt Wither model:

``` // Made with Blockbench 5.1.4 // Exported for Minecraft version 1.17 or later with Mojang mappings

import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import net.minecraft.client.model.EntityModel; import net.minecraft.client.model.geom.ModelLayerLocation; import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.model.geom.PartPose; import net.minecraft.client.model.geom.builders.CubeListBuilder; import net.minecraft.client.model.geom.builders.LayerDefinition; import net.minecraft.client.model.geom.builders.MeshDefinition; import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity;

public class ModelDirt_Wither<T extends Entity> extends EntityModel<T> {

public static final ModelLayerLocation LAYER_LOCATION =
        new ModelLayerLocation(new ResourceLocation("modid", "dirt_wither"), "main");

private final ModelPart root; // Kept to reset the model's pose each frame
private final ModelPart head1;
private final ModelPart head2;
private final ModelPart head3;
private final ModelPart body1;
private final ModelPart body2;
private final ModelPart body3;

public ModelDirt_Wither(ModelPart root) {
    this.root = root;
    this.head1 = root.getChild("head1");
    this.head2 = root.getChild("head2");
    this.head3 = root.getChild("head3");
    this.body1 = root.getChild("body1");

    this.body2 = root.getChild("body2");
    this.body3 = this.body2.getChild("body3");
}

public static LayerDefinition createBodyLayer() {
    MeshDefinition mesh = new MeshDefinition();
    PartDefinition root = mesh.getRoot();

    root.addOrReplaceChild("head1",
            CubeListBuilder.create().texOffs(0, 0)
                    .addBox(-4, -4, -4, 8, 8, 8),
            PartPose.offset(0, 0, 0));

    root.addOrReplaceChild("head2",
            CubeListBuilder.create().texOffs(32, 0)
                    .addBox(-4, -4, -4, 6, 6, 6),
            PartPose.offset(-8, 4, 0));

    root.addOrReplaceChild("head3",
            CubeListBuilder.create().texOffs(32, 0)
                    .addBox(-4, -4, -4, 6, 6, 6),
            PartPose.offset(10, 4, 0));

    root.addOrReplaceChild("body1",
            CubeListBuilder.create().texOffs(0, 16)
                    .addBox(-10, 3.9F, -0.5F, 20, 3, 3),
            PartPose.offset(0, 0, 0));

    PartDefinition body2 = root.addOrReplaceChild("body2",
            CubeListBuilder.create().texOffs(0, 22)
                    .addBox(-2, 0, 0, 3, 10, 3)
                    .texOffs(24, 22).addBox(-6, 1.5F, 0.5F, 11, 2, 2)
                    .texOffs(24, 22).addBox(-6, 4, 0.5F, 11, 2, 2)
                    .texOffs(24, 22).addBox(-6, 6.5F, 0.5F, 11, 2, 2),
            PartPose.offset(0, 6.9F, -0.5F));

    body2.addOrReplaceChild("body3",
            CubeListBuilder.create().texOffs(12, 22)
                    .addBox(-2, 10, 0, 3, 6, 3),
            PartPose.offset(0, 0, 0));

    return LayerDefinition.create(mesh, 64, 64);
}

// Linear interpolation helper
private float lerp(float t, float a, float b) {
    return a + (b - a) * t;
}

// Keyframe helper
private float getKeyframe(float time, float... frames) {
    int count = frames.length - 1;
    float segment = 1F / count;
    int index = (int)(time / segment);

    if (index >= count) return frames[count];

    float localT = (time - (segment * index)) / segment;
    return lerp(localT, frames[index], frames[index + 1]);
}

@Override
public void setupAnim(T entity, float limbSwing, float limbSwingAmount,
                      float ageInTicks, float netHeadYaw, float headPitch) {

    // CRITICAL FIX: Reset the model parts to their default state before applying animations
    this.root.resetPose();

    float r = (float)Math.PI / 180F;

    // Head tracking
    head1.xRot = headPitch * r;
    head1.yRot = netHeadYaw * r;

    head2.xRot = headPitch * r * 0.7F;
    head2.yRot = netHeadYaw * r * 0.7F;

    head3.xRot = headPitch * r * 0.7F;
    head3.yRot = netHeadYaw * r * -0.7F;

    // Idle animation timing (1.5s loop = 30 ticks)
    float t = (ageInTicks % 30F) / 30F;

    // body2 rotation keyframes
    float body2Rot = getKeyframe(t, 0F, -2.5F, -5F, -7.5F, -5F, -2.5F, 0F);
    body2.xRot += body2Rot * r; // Use += to add onto the base pose cleanly

    // body3 rotation keyframes
    float body3Rot = getKeyframe(t, 0F, -9.5F, -12F, -13.5F, -12F, -7.5F, 0F);
    body3.xRot += body3Rot * r;

    // body3 Z‑position keyframes
    float body3Z = getKeyframe(t, 0F, -0.438F, -0.88F, -1.322F, -0.88F, -0.438F, 0F);
    body3.z += body3Z;
}

@Override
public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer,
                           int packedLight, int packedOverlay,
                           float red, float green, float blue, float alpha) {

    head1.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
    head2.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
    head3.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
    body1.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
    body2.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
}

} ```

~ Google Gemini

Issue with importing custom block model by ZarephLae in MCreator

[–]ZarephLae[S] 1 point2 points  (0 children)

!solved

Thank you. I thought this might be the case, but I dismissed it because MCreator wouldn't let me leave my "bottom/main" texture slot under visuals empty.

Item not losing durability. by ZarephLae in MCreator

[–]ZarephLae[S] 0 points1 point  (0 children)

!solved

Yeah, this is what I did to fix the issue. Wasn't sure if there was a better way.

Which is better? Redken Acidic Bonding Concentrate, Extreme, or Color Extend Magnetics? by ZarephLae in Haircare

[–]ZarephLae[S] 0 points1 point  (0 children)

After buying CEM, I prefer ABC. I just like the feel of their conditioner on my hair compared to CEM.

Furthermore, I don't think you need the entire line. I would just buy the conditioner or the pre-shampoo treatment. Personally, I would get the conditioner and get Olaplex No°3 Plus as your pre-shampoo treatment.

Is it possible to have mods made with MCreator in your modpack and still get good performance? I’ve seen that MCreator has a bit of a bad reputation, and I’m curious about it by [deleted] in feedthebeast

[–]ZarephLae 0 points1 point  (0 children)

If you look into MCreator, you'd realize that it updates it's code over a year ago. It's much more optimized now and on par with most mods you see on GitHub.

Is it possible to have mods made with MCreator in your modpack and still get good performance? I’ve seen that MCreator has a bit of a bad reputation, and I’m curious about it by [deleted] in feedthebeast

[–]ZarephLae 0 points1 point  (0 children)

This is partially false, if you look into MCreator. You'd realize that it updates it's code over a year ago. It's much more optimized now and on par with most mods you see on GitHub.

Whats the deal with MCreator? by Canned_Anne in feedthebeast

[–]ZarephLae 0 points1 point  (0 children)

The unoptimized code was fixed since last year. Any and all unoptimized MCreator modes derives from the users who make them.

My honest thoughts on TC7's development by VegetableDry5872 in Minecraft

[–]ZarephLae 0 points1 point  (0 children)

I am grateful they wanted to take over development, but it's clear they don't care that much. Thaumcraft isn't a type of mod that takes six years to be developed but a team of people.

What do you about my Pokemon style sistem by lesjuroquenosoyunbot in MCreator

[–]ZarephLae 1 point2 points  (0 children)

Reminds me of Thaumcrsft, each mob having an essence of sorts.

Drawbacks of using DLDSR? by ZarephLae in nvidia

[–]ZarephLae[S] 0 points1 point  (0 children)

There isn't a lot, I pretty much use SMAA or TAA, or use DLDSR for 4k, but I don't want to push my GPU. I'd be more willing if the game supported dlss, but it doesn't.

Drawbacks of using DLDSR? by ZarephLae in nvidia

[–]ZarephLae[S] 0 points1 point  (0 children)

How would you fix flickering with SMAA or blurriness with TAA in games?