Skip to content
TheChatArchiveThe Chat Archive
Geminigemini-2.5-pro· GoogleHugging Face LMArena Human Preference 140K

add REALISTIC and dynamic jiggle physics to the boobs (1.8.9 btw) package…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with o3-2025-04-16’s answer.
  1. User

    add REALISTIC and dynamic jiggle physics to the boobs (1.8.9 btw)

    package me.eldodebug.soar.injection.mixin.mixins.model;

    import me.eldodebug.soar.management.mods.impl.FemaleGenderMod; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.Entity; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

    import me.eldodebug.soar.management.mods.impl.WaveyCapesMod; import net.minecraft.client.model.ModelPlayer;

    @Mixin(ModelPlayer.class) public class MixinModelPlayer extends ModelBase {

    private ModelRenderer boobs;
    
    @Inject(method = "renderCape", at = @At("HEAD"), cancellable = true)
    public void renderCloak(float p_renderCape_1_, CallbackInfo ci) {
    	if(WaveyCapesMod.getInstance().isToggled()) {
    		ci.cancel();
    	}
    }
    
    @Inject(method = "<init>", at = @At("RETURN"))
    private void boobs(float size, boolean z, CallbackInfo c) {
        boobs = new ModelRenderer(this, 16, 20);
        boobs.addBox(-4F, -1.5F, -5F, 8, 4, 4, size);
    }
    
    @Inject(method = "render", at = @At("RETURN"))
    public void render(Entity e, float v, float w, float x, float y, float z, float scale, CallbackInfo c) {
        GlStateManager.pushMatrix();
        boobs.showModel = FemaleGenderMod.getInstance().isToggled() && e == Minecraft.getMinecraft().thePlayer;
        boobs.render(scale);
        // move to pos when sneaking
        boobs.offsetY = e.isSneaking() ? .25F : 0F;
        boobs.offsetZ = e.isSneaking() ? .1F : 0F;
        // rotate so they face up
        boobs.rotateAngleX = 45;
        GlStateManager.popMatrix();
    }
    

    }

  2. Gemini Assistant

    Of course. To add realistic and dynamic jiggle physics, we need to move beyond static rotations and make the model react to the player's movement and acceleration.

    The approach will be to:

    1. Track Player Velocity & Acceleration: The core of dynamic physics is reacting to changes in motion (acceleration). We'll calculate this each frame.
    2. Apply Inertia: When the player accelerates forward, the boobs should lag and rotate backward (pitch up). When they fall, the boobs should rotate up. We'll model this as an opposing force.
    3. Dampen the Motion: The jiggle shouldn't continue forever. We'll apply a damping factor to make the motion decay naturally, like soft tissue would.
    4. Clamp the Rotation: To prevent a glitched or exaggerated appearance, we'll limit how far the model can rotate.
    5. Integrate with Existing Logic: We'll keep your sneaking logic and the toggle from FemaleGenderMod.

    We will inject into setRotationAngles which is the proper place to manipulate model part rotations, rather than the render method.

    Here is the modified MixinModelPlayer class with realistic physics implemented.

    package me.eldodebug.soar.injection.mixin.mixins.model;
    
    import me.eldodebug.soar.management.mods.impl.FemaleGenderMod;
    import me.eldodebug.soar.management.mods.impl.WaveyCapesMod;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.model.ModelBase;
    import net.minecraft.client.model.ModelPlayer;
    import net.minecraft.client.model.ModelRenderer;
    import net.minecraft.client.renderer.GlStateManager;
    import net.minecraft.entity.Entity;
    import net.minecraft.util.MathHelper;
    import org.spongepowered.asm.mixin.Mixin;
    import org.spongepowered.asm.mixin.Shadow;
    import org.spongepowered.asm.mixin.injection.At;
    import org.spongepowered.asm.mixin.injection.Inject;
    import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
    
    @Mixin(ModelPlayer.class)
    public abstract class MixinModelPlayer extends ModelBase {
    
        @Shadow
        public ModelRenderer bipedBody;
        
        private ModelRenderer boobs;
    
        // Physics variables
        private float lastVelY, lastVelZ;
        private float jiggleX, jiggleZ;
    
        // --- CONFIGURABLE PHYSICS PARAMETERS ---
        private static final float JIGGLE_STRENGTH = 1.8F;  // How much the boobs react to movement
        private static final float DAMPING_FACTOR = 0.85F; // How quickly the jiggle stops (0.0 - 1.0). Higher is bouncier.
        private static final float MAX_ROTATION = 0.6F;    // Maximum rotation in radians to prevent clipping
    
        @Inject(method = "<init>", at = @At("RETURN"))
        private void addBoobs(float size, boolean z, CallbackInfo c) {
            // We use the bipedBody as a parent to make positioning easier
            this.boobs = new ModelRenderer(this, 16, 20);
            // Added a slight vertical offset to position it better on the chest
            this.boobs.addBox(-4.0F, 1.5F, -2.5F, 8, 4, 3, size);
            this.bipedBody.addChild(this.boobs);
        }
    
        @Inject(method = "renderCape", at = @At("HEAD"), cancellable = true)
        public void renderCloak(float p_renderCape_1_, CallbackInfo ci) {
            if (WaveyCapesMod.getInstance().isToggled()) {
                ci.cancel();
            }
        }
    
        @Inject(method = "setRotationAngles", at = @At("RETURN"))
        public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn, CallbackInfo c) {
            if (entityIn == null || !FemaleGenderMod.getInstance().isToggled() || entityIn != Minecraft.getMinecraft().thePlayer) {
                this.boobs.showModel = false;
                return;
            }
            
            this.boobs.showModel = true;
    
            // --- DYNAMIC JIGGLE PHYSICS ---
    
            // 1. Calculate current velocity
            float velY = (float) (entityIn.posY - entityIn.prevPosY);
            float velZ = (float) ((entityIn.posZ - entityIn.prevPosZ) * Math.cos(Math.toRadians(entityIn.rotationYaw)) + (entityIn.posX - entityIn.prevPosX) * Math.sin(Math.toRadians(entityIn.rotationYaw)));
    
            // 2. Calculate acceleration (change in velocity)
            float accelY = velY - this.lastVelY;
            float accelZ = velZ - this.lastVelZ;
            
            // 3. Apply inertia (jiggle is opposite to acceleration)
            // Z-acceleration (forward/backward movement) affects X-rotation (pitch)
            // Y-acceleration (vertical movement) also affects X-rotation (pitch)
            this.jiggleX -= (accelZ * 0.5f + accelY) * JIGGLE_STRENGTH;
            
            // This could be used for side-to-side sway if desired
            // float velX = ...
            // float accelX = velX - this.lastVelX;
            // this.jiggleZ += accelX * JIGGLE_STRENGTH;
            
            // 4. Apply damping to slow the jiggle over time
            this.jiggleX *= DAMPING_FACTOR;
            this.jiggleZ *= DAMPING_FACTOR;
    
            // 5. Clamp rotation to prevent unrealistic movement
            this.jiggleX = MathHelper.clamp_float(this.jiggleX, -MAX_ROTATION, MAX_ROTATION);
            this.jiggleZ = MathHelper.clamp_float(this.jiggleZ, -MAX_ROTATION, MAX_ROTATION);
    
            // 6. Apply the calculated rotation
            this.boobs.rotateAngleX = this.jiggleX;
            this.boobs.rotateAngleZ = this.jiggleZ;
            
            // Handle sneaking posture change
            if (entityIn.isSneaking()) {
                // When sneaking, the body leans forward, so we add a base rotation
                this.boobs.rotateAngleX += 0.5F; 
            }
    
            // 7. Store current velocity for the next frame's calculation
            this.lastVelY = velY;
            this.lastVelZ = velZ;
        }
    
        // The old render inject is no longer needed as we now use bipedBody.addChild()
        // which handles rendering automatically. We remove it to avoid rendering twice.
        /*
        @Inject(method = "render", at = @At("RETURN"))
        public void render(Entity e, float v, float w, float x, float y, float z, float scale, CallbackInfo c) {
            // This is now handled by adding boobs as a child to bipedBody
        }
        */
    }
    

    How It Works:

    1. bipedBody.addChild(this.boobs): Instead of manually rendering and positioning the boobs in the render method, we now add them as a "child" of the player's main body part (bipedBody). This is the correct way to add custom parts to a model. It automatically handles base positioning and rotation, so the boobs will move and rotate with the torso by default.
    2. setRotationAngles Injection: This method is called every frame to update the rotation of all model parts based on the entity's current animation state (walking, sneaking, etc.). By injecting here, we can add our custom physics on top of the default animations.
    3. Velocity & Acceleration: We get the entity's velocity by comparing its current position (posX, posY) with its position last tick (prevPosX, prevPosY). The change in this velocity from one frame to the next gives us the acceleration.
    4. Inertia (jiggleX -= ...): The physics logic is simple inertia. When the player's body accelerates, our model part lags behind, creating a rotation in the opposite direction.
      • Forward acceleration (accelZ) causes the boobs to pitch up (negative rotateAngleX).
      • Upward acceleration (accelY, like jumping) also causes them to pitch up.
    5. Damping (jiggleX *= DAMPING_FACTOR): Each frame, the current jiggle rotation is multiplied by a number less than 1. This causes the rotation to gradually return to zero, creating a smooth, natural decay of the jiggle motion.
    6. Clamping: MathHelper.clamp_float ensures the rotation never exceeds the MAX_ROTATION value, preventing the model from inverting or clipping into the player's body in an unrealistic way.
    7. Sneaking: When the player is sneaking, the entire bipedBody rotates forward. We add an additional rotation to our boobs model to compensate and maintain a natural look.

    How to Customize:

    You can easily tweak the physics by changing the static final variables at the top of the class:

    • JIGGLE_STRENGTH: Increase this for more pronounced, bouncy physics. Decrease it for a more subtle effect.
    • DAMPING_FACTOR: This controls how long the jiggle lasts. A value like 0.95 will be very bouncy and take a while to settle. A value like 0.7 will result in a very firm, quick jiggle.
    • MAX_ROTATION: Adjust this if you find the model is rotating too far or not far enough, especially at high speeds.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.