I simply have no clue how to do texture mapping, would anybody mind helping me?
Rollback Post to RevisionRollBack
Check out my minecraft tools, mods, or maybe my website! I've got tons of applications (both minecraft related and not) which some of you may find useful. Thanks!
I want to make that mob as big as a giant zombie but, I don't know what code line to add I have this right now:
mod_Cyclope.java
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_Cyclope extends BaseMod
{
public mod_Cyclope()
{
ModLoader.RegisterEntityID(EntityCyclope.class, "Cyclope", ModLoader.getUniqueEntityId()); // this registers the mob's ID, making it spawnable in-game
ModLoader.AddSpawn(EntityCyclope.class, 100, EnumCreatureType.monster); // 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(EntityCyclope.class, new RenderCyclope(new ModelCyclope(), 0.5F)); // this assigns the Entity class to the appropriate renderer and model class.
}
public String Version()
{
return "Mob:Cyclope"; // you can put whatever you want here, it will show up in ModLoader logs.
}
}
EntityCyclope.java
// 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
I tried to change the last variable of the .addbox line to 3 so it would be bigger but it doesn't seem to work so I guess that's not the way to do it could someone please tell me how to make it bigger?
Rollback Post to RevisionRollBack
Each day is a gift and not a given right, so live them all like your last
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;
import java.io.*;
import net.minecraft.client.Minecraft;
public class mod_Kitteh extends BaseMod
{
public mod_Kitteh()
{
ModLoader.RegisterEntityID(net.minecraft.src.EntityKitteh.class, "MrKitteh", ModLoader.getUniqueEntityId()); // this registers the mob's ID, making it spawnable in-game
ModLoader.AddSpawn(net.minecraft.src.EntityKitteh.class, 100, 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(net.minecraft.src.EntityKitteh.class, new RenderKitteh(new ModelKitteh(), 0.5F)); // this assigns the Entity class to the appropriate renderer and model class.
}
public String Version()
{
return "| The 'Kitteh Kitteh Kitteh' Test Mod about Cats"; // you can put whatever you want here, it will show up in ModLoader logs.
}
}
I makeing a mod which has mobs. The first i made spawn but the texture is incorrect. Its white with some black on top of its head and the bottom of the head too. Its a human mob and it use the biped model. I am using a slighty moddified char.png file but name MonsterHunter. I have the the EntityMonsterHunter and mod_MonsterHunter file. I am using Rig.(how ever you spell it)modloader, mcp, notepad++, and gimp. Did i not do the texture mapping?Do I need another file? What did i do wrong?
I did get it to spwan
Ok, I have my mob done and everything, it does the functions I want on minecraft, but is there any specific coding for the mob to spawn just in 1 simple room, and not in all the map? or do I have to create a new WorldGen file? But anyways, how can I make the mob appear in that specific room, such as Battle Towers mod, please answer me!
I made part of my mod make a list of all hostile mobs in EntityFriendlyMobs. Minecraft apparently did not like the way I turned a random mob back into Entity form. This is the first error I have ever gotten that eclipse or mcp did not catch and I had no clue how to fix it :sad.gif:.
EntityFriendlyMobs:
// 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
package net.minecraft.src;
import java.util.List;
import java.util.Random;
// Referenced classes of package net.minecraft.src:
// EntityCreature, IMob, World, Entity,
// AxisAlignedBB, MathHelper, EnumSkyBlock, NBTTagCompound
public class EntityFriendlyMob extends EntityCreature
implements IMob
{
public EntityFriendlyMob(World world)
{
super(world);
attackStrength = 2;
health = 20;
}
public void onLivingUpdate()
{
float f = getEntityBrightness(1.0F);
if(f > 0.5F)
{
entityAge += 2;
}
super.onLivingUpdate();
}
public void onUpdate()
{
super.onUpdate();
if(!worldObj.multiplayerWorld && worldObj.difficultySetting == 0)
{
setEntityDead();
}
}
protected Entity findPlayerToAttack()
{
List Creepers = worldObj.getEntitiesWithinAABB(EntityCreeper.class, boundingBox.expand(32D, 32D, 32D));
int creepers = Creepers.size();
List Spiders = worldObj.getEntitiesWithinAABB(EntitySpider.class, boundingBox.expand(32D, 32D, 32D));
int spiders = Spiders.size();
List Skeletons = worldObj.getEntitiesWithinAABB(EntitySkeleton.class, boundingBox.expand(32D, 32D, 32D));
int skeletons = Skeletons.size();
List Zombies = worldObj.getEntitiesWithinAABB(EntityZombie.class, boundingBox.expand(32D, 32D, 32D));
int zombies = Zombies.size();
List Hostiles = Creepers;
Hostiles.add(Spiders);
Hostiles.add(Skeletons);
Hostiles.add(Zombies);
Entity entityplayer = (Entity)Hostiles.get(worldObj.rand.nextInt(Hostiles.size())); //THIS LINE IS WHAT IS CAUSING THE ERROR
//EntityPlayer entityplayer = worldObj.getEntitiesWithinAABB(EntityCreeper.class, boundingBox.expand(32D, 32D, 32D);
if(entityplayer != null && canEntityBeSeen(entityplayer))
{
return entityplayer;
} else
{
return null;
}
}
public boolean attackEntityFrom(Entity entity, int i)
{
if(super.attackEntityFrom(entity, i))
{
if(riddenByEntity == entity || ridingEntity == entity)
{
return true;
}
if(entity != this)
{
playerToAttack = entity;
}
return true;
} else
{
return false;
}
}
protected void attackEntity(Entity entity, float f)
{
if(attackTime <= 0 && f < 2.0F && entity.boundingBox.maxY > boundingBox.minY && entity.boundingBox.minY < boundingBox.maxY)
{
attackTime = 20;
entity.attackEntityFrom(this, attackStrength);
}
}
protected float getBlockPathWeight(int i, int j, int k)
{
return 0.5F - worldObj.getLightBrightness(i, j, k);
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound);
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound);
}
public boolean getCanSpawnHere()
{
int i = MathHelper.floor_double(posX);
int j = MathHelper.floor_double(boundingBox.minY);
int k = MathHelper.floor_double(posZ);
if(worldObj.getSavedLightValue(EnumSkyBlock.Sky, i, j, k) > rand.nextInt(32))
{
return false;
}
int l = worldObj.getBlockLightValue(i, j, k);
if(worldObj.func_27160_B())
{
int i1 = worldObj.skylightSubtracted;
worldObj.skylightSubtracted = 10;
l = worldObj.getBlockLightValue(i, j, k);
worldObj.skylightSubtracted = i1;
}
return l <= rand.nextInt(8) && super.getCanSpawnHere();
}
protected int attackStrength;
}
EntityKnight *extends EntityFriendlyMob*:
// 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
package net.minecraft.src;
import java.util.List;
import java.util.Random;
// Referenced classes of package net.minecraft.src:
// EntityMob, World, MathHelper, Item
public class EntityKnight extends EntityFriendlyMob
{
public EntityKnight(World world)
{
super(world);
texture = "/mob/knight.png";
moveSpeed = 0.5F;
attackStrength = 5;
}
public void onLivingUpdate()
{
super.onLivingUpdate();
}
protected String getHurtSound()
{
return "random.hurt";
}
protected String getDeathSound()
{
return "random.hurt";
}
protected int getDropItemId()
{
return Item.ingotIron.shiftedIndex;
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
private static final ItemStack defaultHeldItem;
static
{
defaultHeldItem = new ItemStack(Item.swordSteel, 1);
}
protected int attackStrength;
}
The error:
Mods loaded: 3
ModLoader Beta 1.7.3
mod_CrystalClearWaters v3.10 for Beta 1.7.3
mod_TooManyItems 1.7.2 2011-07-01
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 8ff908db --------
Generated 7/23/11 6:28 PM
Minecraft: Minecraft Beta 1.7.3
OS: Windows 7 (amd64) version 6.1
Java: 1.6.0_25, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce 6150 LE/PCI/SSE2 version 2.1.2, NVIDIA Corporation
java.lang.ClassCastException: java.util.ArrayList cannot be cast to sn
at EntityFriendlyMob.g_(EntityFriendlyMob.java:58)
at ii.f_(SourceFile:28)
at ls.o(SourceFile:595)
at EntityFriendlyMob.o(EntityFriendlyMob.java:32)
at EntityKnight.o(EntityKnight.java:26)
at ls.w_(SourceFile:210)
at EntityFriendlyMob.w_(EntityFriendlyMob.java:37)
at fd.a(World.java:1485)
at fd.f(World.java:1461)
at fd.g(World.java:1380)
at net.minecraft.client.Minecraft.k(SourceFile:1494)
at net.minecraft.client.Minecraft.run(SourceFile:754)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT e9f6b4b7 ----------
EDIT: I've done it :smile.gif: finally done it. It might have taken me 2 days and a solid 4 hours of development but I finally fixed my knight :smile.gif:. It still crashes when 2 of them spawn at once but other than that it works.
Rollback Post to RevisionRollBack
A keyboard could not be found. Please press F3 to continue
Assuming it is attacking players and you mean finding a player to attack and not actually attacking it add this to the entity class of the mob
protected Entity findPlayerToAttack()
{
double d = 16D;//16 is usual range modify it to what you want
return worldObj.getClosestPlayerToEntity(this, d);
}
Rollback Post to RevisionRollBack
A keyboard could not be found. Please press F3 to continue
Alright, this is my first tutorial, so bear with me. What I'm going to be showing you in this tutorial is how to design (model) a mob and add the necessary code to have it as an actual animal in the world. Note that I will not be teaching you how to script AI for mobs, sufficient code examples can be found in other tutorials. In this tutorial, I will be showing you how to make a tiger.
- PROWNE
Can you help me with my mob, its a person, so basically I'm just using the pigman & zombie files, but I don't understand the render... or if I need one & when I recompile I try it (without the render) I go on it works, when I add the skin it doesn't (it pulls up as a black screen), please help
Heres the errors from the logs:
+1 If I help please
Also, check out my YouTube channel: www.YouTube.com/StrongJoshua
Here is my model:
I was kinda curious about that too, my little cats run around without moving their legs -.-
Come on, bro, I got CREEPER BLOOD! (winning!)
Whenever I do that I still get the same error:
Come on, bro, I got CREEPER BLOOD! (winning!)
ModelKitteh:
You can use FmcModeller, or MCModeller.
I did get it to spwan
pleas help :sad.gif:
+1 If I help please
EntityFriendlyMobs:
Assuming it is attacking players and you mean finding a player to attack and not actually attacking it add this to the entity class of the mob
Can you help me with my mob, its a person, so basically I'm just using the pigman & zombie files, but I don't understand the render... or if I need one & when I recompile I try it (without the render) I go on it works, when I add the skin it doesn't (it pulls up as a black screen), please help