jovial_beagle_75371

"Create a mod that removes all existing Minecraft mobs and replaces them with custom dinosaur entities. Each dinosaur should have different behaviors: some should be aggressive on sight, others neutral until provoked, and some should hide or flee if approached. The mod should work with Minecraft version 1.21.4 on Fabric, and include custom AI for each dinosaur type

Kodari AI
KodariJun 22 at 8:43 pm 61
DinoWorld
A Fabric 1.21.4 mod that replaces all vanilla Minecraft mobs with custom dinosaur entities. Features three behavioral archetypes: aggressive dinosaurs that attack on sight (T-Rex, Raptor), neutral dinosaurs that only retaliate when provoked (Triceratops, Ankylosaur), and timid dinosaurs that flee when approached (Parasaur, Brachiosaurus). Each dinosaur has unique AI goals, custom stats, and natural spawn rules replacing vanilla mob spawns.

Planning all files before writing any code:

Plan:

  • build.gradle + settings.gradle + gradle.properties — build setup

  • fabric.mod.json + dinoworld.mixins.json + en_us.json — resources

  • DinoWorldMod.java + ModEntities.java + DinoSpawnHandler.java — core server logic

  • 3 base entity classes (AggressiveDinoEntity, NeutralDinoEntity, TimidDinoEntity)

  • 6 concrete dino entities (TRexEntity, RaptorEntity, TriceratopsEntity, AnkylosaурEntity, ParasaurEntity, BrachiosaurusEntity)

  • Client: DinoWorldClient, ModModelLayers, DinoRenderState, two model types (biped/quadruped), 6 renderers

Here’s a summary of everything that was built and what you’ll need to finish it:


What was created (28 files)

Entity Hierarchy

Entity
Base
Behavior
Stats
T-Rex
HostileEntity
Attacks players + all other dinos on sight
120 HP, 18 dmg, slow
Raptor
HostileEntity
Fast pack hunter, attacks on sight
35 HP, 9 dmg, very fast
Triceratops
PathAwareEntity
Wanders, retaliates when hit
90 HP, 12 dmg, high armor
Ankylosaurus
PathAwareEntity
Retaliates when hit, barely moves
140 HP, 10 dmg, max knockback resistance
Parasaur
PathAwareEntity
Flees players and predators
45 HP, fastest flee speed
Brachiosaurus
PathAwareEntity
Flees despite enormous size
180 HP, very slow flee

Key Systems

  • DinoSpawnHandler — uses BiomeModifications to clear all vanilla monster/creature/ambient spawns from every overworld biome, then injects all 6 dinos with appropriate weights

  • BipedDinoModel — T-Rex/Raptor shape: forward-tilted torso, tiny forelimbs, massive hind legs

  • QuadrupedDinoModel — four-legged shape for herbivores with animated leg cycles

  • All renderers populate DinoRenderState.limbAngle/limbDistance from entity.limbAnimator for walking animation

⚠️ Required Before the Mod is Fully Visual

You need to add 6 PNG textures (64×64 pixels each) at:

Plain Text
src/main/resources/assets/dinoworld/textures/entity/
  t_rex.png
  raptor.png
  triceratops.png
  ankylosaurus.png
  parasaur.png
  brachiosaurus.png

Without them, entities will render with the purple-black “missing texture” pattern — the mod will still run and function correctly.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
29 1,129
src/main/java/com/dinoworld/DinoWorldMod.java
package com.dinoworld;

import com.dinoworld.entity.ModEntities;
import com.dinoworld.spawn.DinoSpawnHandler;
import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DinoWorldMod implements ModInitializer {

    public static final String MOD_ID = "dinoworld";
    public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

    @Override
    public void onInitialize() {
        ModEntities.initialize();
        DinoSpawnHandler.initialize();
        LOGGER.info("DinoWorld initialized — vanilla mobs replaced with dinosaurs.");
    }
}