Minecraft Blogs / Tutorial

Modding Trouble - Fixing the Biped Model Issue

  • 3,610 views, 1 today
  • 2
  • 0
Neuroticcheeze1101's Avatar Neuroticcheeze1101
Level 60 : High Grandmaster Button Pusher
54
This tutorial will explain how to overcome a common issue when making a mob and how to get yours working how you want it to.

Firstly. Since 1.3 came out, many people had trouble adding their own custom mob. When their mob was rendered in game, it displayed the classic biped model instead of their own.
This will be covered.

This code was written with Modloader,
Firstly, you will want to make your model. I suggest Techne for Windows or the the MCModeler for Mac.(If you already have a model, then.. Great!)
Techne:
www.google.com.au/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCQQFjAA&url=http%3A%2F%2Fwww.minecraftforum.net%2Ftopic%2F200676-modeler-techne-looking-for-help%2F&ei=h_1gUN

MCModeler:
www.google.com.au/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCgQrAIoATAA&url=http%3A%2F%2Fwww.minecraftforum.net%2Ftopic%2F297974-modelertool-mcmodeler-v11-mac-gui-fixed%2F

If you don't know how to use these programs, google it.

Once you have made your model, export it as a texturemap and then a java file.
Either install your model.java into your src folder or open it with notepad(alike) and copy it's contents into a new class that you made in eclipse or editrocket.

THE REAL WORK BEGINS:
Now, inside your mod_MOD.java file, under your 'public void AddRenderer' OR 'map.put;' code, paste this in..

Code

ModLoader.addEntityTracker(this, EntityNameHERE .class, -128, 20, 5, true);}
public void generateSurface(World var1, Random var2, int var3, int var4) {}
public void generateNether(World var1, Random var2, int var3, int var4) {}
public void addRenderer(Map var1){
var1.put(EntityNameHERE .class, new RenderNameHERE (new ModelNameHERE (), 1.0F));}
public Entity spawnEntity(int var1, World var2, double var3, double var5, double var7){
switch (var1){
case -128:
return new EntityNameHERE(var2);
default:
return null;}}
public Packet23VehicleSpawn getSpawnPacket(Entity var1, int var2){return var1 instanceof EntityNameHERE ? new Packet23VehicleSpawn(var1, var2) : null;}{



What to change: Make sure to change the 'NameHere's to your appropriate classes (Eg. EntityRabbit, ModelRabbit)
The rest is self explanatory (Surface, Nether) and stuff like that.

There, your model will work.
NOTE: You don't need to worry about a render class UNLESS you want to change the mob size or get your mob to hold an item where you can copy the giant or zombiepig render class code and modify it accordingly. And please note that even though this is pretty much the only way to get your own model working, there may result some issues between the vehicle and mob packets when working with negative id's (I suggest use a positive one, change the -128). I have not encountered any issues with it at all, though, just a heads up.

Enjoy.
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome