I tried adapting this to make a flying mob and so far the flying part has been successful. The model has not been though. Is there any reason why my model would not show up and a biped model would instead be shown with the custom skin on it? The model I am trying to use is just a box but I tried also using an exact replica of a Ghast as well, neither worked.
Help please?
Yoda12999
You'll have to post some source code first.
Sorry about not posting code I wasn't able to access my code at the time.
Are you using obfuscated code? If you are, you'll have to obtain the obfuscated names, methods, and fields from their respective classes.
um... i haven't done anything to obfuscate them so no.
/facepalm
If you've used an external decompiler, the class names will be the same as the files found in the jar. Properly configure MCP (including adding mappings for ModLoader) and decompile. This will allow you to use the original method and field names, instead of the obfuscated ones.
Rollback Post to RevisionRollBack
While I may be inactive, you can check up on what I'm doing on my website Gamer's Den.
I changed it to a base model but it still is not showing up in game. I know im doing something wrong...
here is the code for all 4 sorry for all of the questions im not getting any errors
modeldumbo
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public class Modeldumbo extends ModelBase
{
public Modeldumbo()
{
head = new ModelRenderer(0, 0); // this sets up the ModelRender part. The "0, 0" is the texture index (top left corner) where the part will start overlaying this texture onto itself
head.addBox(0F, 0F, 0F, 8, 8, 8); // these set up offset, size, and scale. Rotation points in Techne are what's considered the center of the part, so try keeping the blue circles in the very center of the part (unless setting the rotation point inside another, like a neck or head)
head.setPosition(0F, -11F, 2); // this moves the part (from the rotation point) into the desired placement.
nose = new ModelRenderer(16, 9);
nose.addBox(0F, 0F, 0F, 1, 2, 2);
nose.setPosition(-1F, -8F, 3);
tentacles = new ModelRenderer(32, 8);
tentacles.addBox(0F, 0F, 0F, 8, 8, 3);
tentacles.setPosition(0F, -11F, -1);
ear1 = new ModelRenderer(0, 4);
ear1.addBox(0F, 0F, 0F, 1, 2, 2);
ear1.setPosition(1F, -11F, 10);
ear2 = new ModelRenderer(0, 4);
ear2.addBox(0F, 0F, 0F, 1, 2, 2);
ear2.setPosition(1F, -5F, 10);
}
public void render(float f, float f1, float f2, float f3, float f4, float f5)
{
tentacles.render(f5); // whenever adding a part that ISN'T included in the EXTENDED class, you'll have to add the variable for that part down below, and also add one of these lines to have the model "draw" your new part. Without it, your part will not show up at runtime.
ear1.render(f5);
ear2.render(f5);
nose.render(f5);
head.render(f5);
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
{
}
ModelRenderer tentacles; // add any new parts here that aren't initialized by the EXTENDED class
ModelRenderer ear1;
ModelRenderer ear2;
ModelRenderer nose;
ModelRenderer head;
}
renderdumbo
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public class Renderdumbo extends RenderLiving
{
public Renderdumbo(ModelBase modelbase, float f)
{
super(modelbase, f); // try not to modify anything here, except the referenced class names, for example, "EntityTiger".
}
public void func_177_a(Entitydumbo entitydumbo, double d, double d1, double d2,
float f, float f1)
{
super.doRenderLiving(entitydumbo, d, d1, d2, f, f1);
}
public void doRenderLiving(EntityLiving entityliving, double d, double d1, double d2,
float f, float f1)
{
func_177_a((Entitydumbo)entityliving, d, d1, d2, f, f1);
}
public void doRender(Entity entity, double d, double d1, double d2,
float f, float f1)
{
func_177_a((Entitydumbo)entity, d, d1, d2, f, f1);
}
}
mod_dumbo
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
import java.util.*;
import java.util.Map;
public class mod_dumbo extends BaseMod
{
public mod_dumbo()
{
ModLoader.RegisterEntityID(Entitydumbo.class, "dumbo", ModLoader.getUniqueEntityId()); // this registers the mob's ID, making it spawnable in-game
ModLoader.AddSpawn(Entitydumbo.class, 2, EnumCreatureType.creature); // this adds the mob to the list of "to-spawn" mobs. The "2" is the rarity of the mob. The EnumCreatureType is what kind of mob it is. For example, squids are "waterCreature", enemies are "monster", and animals are "creature".
}
// RENDERERS
public void AddRenderer(Map map)
{
map.put(Entitydumbo.class, new Renderdumbo(new Modeldumbo(), 0.5F)); // this assigns the Entity class to the appropriate renderer and model class.
}
public String Version()
{
return "| Test Dumbo Squid"; // you can put whatever you want here, it will show up in ModLoader logs.
}
}
Entitydumbo
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public class Entitydumbo extends EntityAnimals
{
public Entitydumbo(World world)
{
super(world);
texture = "/mob/dumbo.png"; // this initializes the texture used for the mob.
setSize(1.5F, 1.9F); // this sets the HIT AREA of the mob.
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound); // this saves the mob to disk, so it can be loaded later
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound); // this retrieves saved data about the mob from the hard drive
}
protected String getLivingSound()
{
return null; // any sound your mob makes will be set here. Look in other Entity classes to see what code it uses.
}
protected String getHurtSound()
{
return null;
}
protected String getDeathSound()
{
return null;
}
protected float getSoundVolume()
{
return 0.4F;
}
protected int getDropItemId()
{
return 351; // this is the drop item ID for your mob. For example, set this to "return 278;" to drop a diamond pickaxe upon dying.
}
}
hey man i was having the same problem. have you added your mob to the spawnlist?
in other words have you changed the MobSpawnerBase.java and the RenderManager.java ?
if you have just make sure all the names are the same throughout although it should give you an error if theyre not so if anything it might be spelt incorrectly in the mobspawnerbase.java.
im only new to this so i might not be of any help but jsut trying to throw my input in for prownes sake.
hey man i was having the same problem. have you added your mob to the spawnlist?
in other words have you changed the MobSpawnerBase.java and the RenderManager.java ?
if you have just make sure all the names are the same throughout although it should give you an error if theyre not so if anything it might be spelt incorrectly in the mobspawnerbase.java.
im only new to this so i might not be of any help but jsut trying to throw my input in for prownes sake.
ModLoader has its own built-in function for adding entities to the spawn list. @Jalcober: you'll need to be a little more specific. What do you mean by "isn't showing up"? Is your entity not spawning, or is the entity not appearing when you manually spawn it with SSP commands, or something?
Rollback Post to RevisionRollBack
While I may be inactive, you can check up on what I'm doing on my website Gamer's Den.
ModLoader has its own built-in function for adding entities to the spawn list. @Jalcober: you'll need to be a little more specific. What do you mean by "isn't showing up"? Is your entity not spawning, or is the entity not appearing when you manually spawn it with SSP commands, or something?
yeah i can spawn it with ssp commands but not naturally
and the mobs end up looking like this...
Edit:Wait nevermind i figured it out it was pretty simple lol
The Meaning of Life, the Universe, and Everything.
Join Date:
1/17/2011
Posts:
184
Location:
USA
Minecraft:
Plazmaz
Member Details
Quote from PROWNE »
/facepalm
If you've used an external decompiler, the class names will be the same as the files found in the jar. Properly configure MCP (including adding mappings for ModLoader) and decompile. This will allow you to use the original method and field names, instead of the obfuscated ones.
i havent used an external decompiler. i used mcp. i know that i have set it up properly.
[UPDATE]
ok i dont have the black screen :smile.gif: lets hope it works!
[UPDATE 2]
hmmm i can't spawn it and i don't see it. :sad.gif:
please help.
i havent used an external decompiler. i used mcp. i know that i have set it up properly.
[UPDATE]
ok i dont have the black screen :smile.gif: lets hope it works!
[UPDATE 2]
hmmm i can't spawn it and i don't see it. :sad.gif:
please help.
are you using ssp commands? if so type "spawn list" for a list of mobs type "spawn nameofmob" if its not in the list then i dont know.
For some reason the mobs like to float why is that? Is there a way to fix it?
by the way video of 1st mob :biggrin.gif:
For the floating problem it looks like you set the height of the mob to high.
it's the setSize( float, float ) in you Entity file. I it is setSize( width, height ) though I don't know how it figures depth... (probably assumes width = depth)
For some reason the mobs like to float why is that? Is there a way to fix it?
by the way video of 1st mob :biggrin.gif:
For the floating problem it looks like you set the height of the mob to high.
it's the setSize( float, float ) in you Entity file. I it is setSize( width, height ) though I don't know how it figures depth... (probably assumes width = depth)
Try moving your actual model (in Techne) down. Changing the setSize() only sets the hit area.
Rollback Post to RevisionRollBack
While I may be inactive, you can check up on what I'm doing on my website Gamer's Den.
Sorry about not posting code I wasn't able to access my code at the time.
EntityFlyingMob.java
RenderFlyingMob.java
ModelFlyingMob.java
um... i haven't done anything to obfuscate them so no.
+1 If I help please
/facepalm
If you've used an external decompiler, the class names will be the same as the files found in the jar. Properly configure MCP (including adding mappings for ModLoader) and decompile. This will allow you to use the original method and field names, instead of the obfuscated ones.
here is the code for all 4 sorry for all of the questions im not getting any errors
modeldumbo
renderdumbo
mod_dumbo
Entitydumbo
Again sorry for all of the questions...
hey man i was having the same problem. have you added your mob to the spawnlist?
in other words have you changed the MobSpawnerBase.java and the RenderManager.java ?
if you have just make sure all the names are the same throughout although it should give you an error if theyre not so if anything it might be spelt incorrectly in the mobspawnerbase.java.
im only new to this so i might not be of any help but jsut trying to throw my input in for prownes sake.
ModLoader has its own built-in function for adding entities to the spawn list. @Jalcober: you'll need to be a little more specific. What do you mean by "isn't showing up"? Is your entity not spawning, or is the entity not appearing when you manually spawn it with SSP commands, or something?
oh yeah my bad i did it without the modloader part because i couldnt get it working when i had it added lol
yeah i can spawn it with ssp commands but not naturally
and the mobs end up looking like this...
Edit:Wait nevermind i figured it out it was pretty simple lol
i havent used an external decompiler. i used mcp. i know that i have set it up properly.
[UPDATE]
ok i dont have the black screen :smile.gif: lets hope it works!
[UPDATE 2]
hmmm i can't spawn it and i don't see it. :sad.gif:
please help.
+1 If I help please
are you using ssp commands? if so type "spawn list" for a list of mobs type "spawn nameofmob" if its not in the list then i dont know.
+1 If I help please
are you still getting errors?
+1 If I help please
Have you registered the entity ID?
you have to recompile 1st
ok but when i compile i get the same error as before. Back to the beginning.
+1 If I help please
by the way video of 1st mob :biggrin.gif:
For the floating problem it looks like you set the height of the mob to high.
it's the setSize( float, float ) in you Entity file. I it is setSize( width, height ) though I don't know how it figures depth... (probably assumes width = depth)
Try moving your actual model (in Techne) down. Changing the setSize() only sets the hit area.