Skip to content

Developer's Guide

kernel_ edited this page Sep 10, 2025 · 2 revisions

Mob Pipeline Guide

This guide explains how to safely add new mobs to Minecraft-Classic-Reborn without breaking stability.


Required Tools

  • Classic Model Editor (included with this project)
    Always use this tool to build new mob models.
  • Eclipse/IntelliJ IDEA for Java editing.
  • Textures in .png format.

Pipeline Steps

1. Create the model

  • Open the Classic Model Editor.
  • Design your mob with correct part hierarchy.
  • Export/save the model .java file.

2. Add the model to the codebase

  • Place the file in:

src/net/classicremastered/minecraft/model

  • Fix imports and compile errors if needed.

3. Create the mob class

  • Place it under:

src/net/classicremastered/minecraft/mob

  • Subclass Mob (or a subclass like HumanoidMob).

Example:

public class MyMob extends Mob {
  public MyMob(Level level, float x, float y, float z) {
      super(level);
      this.setPos(x,y,z);
      this.modelName   = "mymob";               // must match ModelManager
      this.textureName = "/mob/mymob.png";
      this.soundIdle   = "mymob.idle";
      this.soundHurt   = "mymob.hurt";
      this.soundDeath  = "mymob.death";
  }
}
  1. Register the mob

In MobRegistry.bootstrapDefaults() add:

tryRegister((short) 50, "MyMob",
    MyMob.class, (l,x,y,z) -> new MyMob(l,x,y,z));
Use a unique short ID (50 in this case).

Never reuse IDs.
  1. Hook into ModelManager

In ModelManager.getModel() add:

case "mymob": return new MyMobModel();
The key "mymob" must match the modelName in your mob class.
  1. Add textures

    Place your mob’s PNG in:

    resources/mob/mymob.png

    Ensure UVs match the model editor output.

  2. Test in-game

Run:

/spawn MyMob

Verify:

Animations (walk/run/attack)

Idle/hurt/death sounds

Hitbox alignment

Rules

Always use Classic Model Editor to generate models.

Fix only compile issues in generated model files — do not hand-write models.

Each mob must have a permanent unique ID in MobRegistry.

Every model must be mapped in ModelManager.

All textures must live under /resources/mob/.
- Example Registry IDs
- Mob Name	ID	Model Key
- Zombie	1	zombie
- Enderman	7	enderman
- Bee	26	bee
- Iron Golem	27	irongolem
- MyMob (custom)	50	mymob

By following this pipeline, forks and new features will remain save-compatible and stable.

Clone this wiki locally