dyels9019-maker

сделай мод на большого(6 блоков в длинну) монстра с улыбкой

Kodari AI
KodariJun 22 at 4:17 pm 51
SmileMonsterMod
A Fabric 1.21.11 mod that adds a large, terrifying smiling monster mob. The creature is 6 blocks long, crawls on the ground, and has a wide grin texture. It spawns in dark areas, attacks players on sight, and has custom animations powered by GeckoLib — including an idle breathing animation, a walk cycle, and a lunge attack animation.
SmileMonsterMod
A Fabric 1.21.11 mod adding a terrifying 6-block-long crawling monster with a wide grin. Powered by GeckoLib 5 with three animations: idle jaw-breathing, a 6-legged walk cycle, and a lunge-bite attack. The creature spawns underground in the overworld, hunts players on sight, and has high health and damage. Includes a full GeckoLib model, animation JSON, and a 256×256 texture UV layout ready for Blockbench editing.

Plan:

  1. Build files (gradle.properties, settings.gradle, build.gradle)

  2. Mod resources (fabric.mod.json, mixin config, lang)

  3. Common code — main mod class, entity registration, entity AI

  4. Client code — render state, renderer, client initializer

  5. GeckoLib assets — geo.json model (6-block crawler), animation.json

  6. manifest.kod


Now the GeckoLib assets. The model is a 6-block-long crawler (96 model units) with head, lower jaw, three body segments, tail, and six legs. Texture atlas is 256×256.


What was built:

File
Purpose
ModEntities.java
Registers the entity type (3×2 hitbox), attributes, and overworld underground spawn (weight 8, solo)
SmileMonsterEntity.java
PathAwareEntity + GeoEntity
— 80 HP, 12 damage, hunts players; triggers
attack
anim via
tryAttack
SmileMonsterRenderer.java
GeoEntityRenderer
using
DefaultedEntityGeoModel
smile_monster.geo.json
12-bone crawler: head + lower jaw + 3 body segments + tail + 6 legs. Total extent: 96 units =
6 blocks
exactly
smile_monster.animation.json
idle
(jaw breathing),
walk
(alternating tripod gait + body sway),
attack
(rear + jaw snap)

Texture: Create assets/smilemonster/textures/entity/smile_monster.png at 256×256. Import the geo.json in Blockbench — it will show you the exact UV islands. The smile/face is on the north face of the head cube (top-left of the UV island starting at pixel 24, 24).

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
manifest.kod
settings.gradle
Code
15 674
src/client/java/com/example/smilemonster/SmileMonsterModClient.java
package com.example.smilemonster;

import com.example.smilemonster.client.render.SmileMonsterRenderer;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry;

public class SmileMonsterModClient implements ClientModInitializer {

    @Override
    public void onInitializeClient() {
        EntityRendererRegistry.register(ModEntities.SMILE_MONSTER, SmileMonsterRenderer::new);
    }
}