hi i followed your tutorial and it was very helpful it recompiles fine but when i start the client it says it cant find the texture i am using eclipse and followed that tutorial
this is the error message
--- BEGIN ERROR REPORT 275abf4a --------
Generated 4/8/12 10:42 AM
Minecraft: Minecraft 1.2.5
OS: Mac OS X (x86_64) version 10.6.8
Java: 1.6.0_29, Apple Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
LWJGL: 2.4.2
OpenGL: Intel HD Graphics 3000 OpenGL Engine version 2.1 APPLE-1.6.42, Intel Inc.
java.lang.RuntimeException: java.lang.Exception: Image not found: /mods/vacgun.png
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1451)
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1104)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.Exception: Image not found: /mods/vacgun.png
at net.minecraft.src.ModLoader.loadImage(ModLoader.java:1024)
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1443)
... 5 more
--- END ERROR REPORT 55313142 ----------
hi i followed your tutorial and it was very helpful it recompiles fine but when i start the client it says it cant find the texture i am using eclipse and followed that tutorial
this is the error message
--- BEGIN ERROR REPORT 275abf4a --------
Generated 4/8/12 10:42 AM
Minecraft: Minecraft 1.2.5
OS: Mac OS X (x86_64) version 10.6.8
Java: 1.6.0_29, Apple Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
LWJGL: 2.4.2
OpenGL: Intel HD Graphics 3000 OpenGL Engine version 2.1 APPLE-1.6.42, Intel Inc.
java.lang.RuntimeException: java.lang.Exception: Image not found: /mods/vacgun.png
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1451)
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1104)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.Exception: Image not found: /mods/vacgun.png
at net.minecraft.src.ModLoader.loadImage(ModLoader.java:1024)
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1443)
... 5 more
--- END ERROR REPORT 55313142 ----------
Is the image in the correct directory? The image, or folder that contains the image, should be in /eclipse/Client/bin, or your minecraft.jar.
The second line is the one that has the error, Here is the code:
package net.minecraft.src;
import java.util.List;
import java.util.Random;
public class EntityArab extends EntityZombie
{
/** Above zero if this PigZombie is Angry. */
private int angerLevel;
/** A random delay until this PigZombie next makes a sound. */
private int randomSoundDelay;
/** The ItemStack that any PigZombie holds (a gold sword, in fact). */
private static final ItemStack defaultHeldItem;
public EntityArab(World par1World)
{
super(par1World);
angerLevel = 0;
randomSoundDelay = 0;
texture = "/Arabs/Arab.png";
moveSpeed = 0.5F;
attackStrength = 5;
isImmuneToFire = false;
}
/**
* Returns true if the newer Entity AI code should be run
*/
protected boolean isAIEnabled()
{
return false;
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
moveSpeed = entityToAttack == null ? 0.5F : 0.95F;
if (randomSoundDelay > 0 && --randomSoundDelay == 0)
{
worldObj.playSoundAtEntity(this, "mob.villager.defaulthurt", getSoundVolume() * 2.0F, ((rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F) * 1.8F);
}
super.onUpdate();
}
/**
* Checks if the entity's current position is a valid location to spawn this entity.
*/
public boolean getCanSpawnHere()
{
return worldObj.difficultySetting > 0 && worldObj.checkIfAABBIsClear(boundingBox) && worldObj.getCollidingBoundingBoxes(this, boundingBox).size() == 0 && !worldObj.isAnyLiquid(boundingBox);
}
/**
* (abstract) Protected helper method to write subclass entity data to NBT.
*/
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setShort("Anger", (short)angerLevel);
}
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
{
super.readEntityFromNBT(par1NBTTagCompound);
angerLevel = par1NBTTagCompound.getShort("Anger");
}
/**
* Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking
* (Animals, Spiders at day, peaceful PigZombies).
*/
protected Entity findPlayerToAttack()
{
if (angerLevel == 0)
{
return null;
}
else
{
return super.findPlayerToAttack();
}
}
/**
* Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
* use this to react to sunlight and start to burn.
*/
public void onLivingUpdate()
{
super.onLivingUpdate();
}
/**
* Called when the entity is attacked.
*/
public boolean attackEntityFrom(DamageSource par1DamageSource, int par2)
{
Entity entity = par1DamageSource.getEntity();
if (entity instanceof EntityPlayer)
{
List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(32D, 32D, 32D));
for (int i = 0; i < list.size(); i++)
{
Entity entity1 = (Entity)list.get(i);
if (entity1 instanceof EntityPigZombie)
{
EntityPigZombie Entitypigzombie = (EntityPigZombie)entity1;
entitypigzombie.becomeAngryAt(entity);
}
}
becomeAngryAt(entity);
}
return super.attackEntityFrom(par1DamageSource, par2);
}
/**
* Causes this PigZombie to become angry at the supplied Entity (which will be a player).
*/
private void becomeAngryAt(Entity par1Entity)
{
entityToAttack = par1Entity;
angerLevel = 400 + rand.nextInt(400);
randomSoundDelay = rand.nextInt(40);
}
/**
* Returns the sound this mob makes while it's alive.
*/
protected String getLivingSound()
{
return "mob.villager.default";
}
/**
* Returns the sound this mob makes when it is hurt.
*/
protected String getHurtSound()
{
return "mob.mob.villager.defaulthurt";
}
/**
* Returns the sound this mob makes on death.
*/
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
/**
* Returns the item ID for the item the mob drops on death.
*/
protected int getDropItemId()
{
return Item.swordSteel.shiftedIndex;
}
/**
* Returns the item that this EntityLiving is holding, if any.
*/
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.SwordSteel, 1);
}
}
Please help! :S
I believe I know a work around. copy-renaming all of the necessary base entity classes should work, and help with potential Incompatibility's. i.e. rename EntityZombie (and the class it extends from) and renaming it to modzombie.class, and the like.
for some reason it won't let me do the short way to do the block, it says "The constructor Block(int, int) is undefined" as an eclipse error.
Here's my block code
public static final Block blockRedstone = new Block(255, 0).setBlockName("BlockRedstone")
.setHardness(3F).setResistance(7F).setLightValue(10F);
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT bfeee903 --------
Generated 4/7/12 9:17 AM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_03, Oracle Corporation
VM: Java HotSpotâ„¢ 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: AMD Radeon HD 6310 Graphics version 4.1.10834 Compatibility Profile Context, ATI Technologies Inc.
java.lang.RuntimeException: java.lang.Exception: Image not found: /obsidianapple.png
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1451)
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1104)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.Exception: Image not found: /obsidianapple.png
at net.minecraft.src.ModLoader.loadImage(ModLoader.java:1024)
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1443)
... 5 more
--- END ERROR REPORT d8860383 ----------
Is your texture in mcp/eclipse/Client/bin? Or mcp/bin/minecraft if you aren't using Eclipse?
The second line is the one that has the error, Here is the code:
package net.minecraft.src;
import java.util.List;
import java.util.Random;
public class EntityArab extends EntityZombie
{
/** Above zero if this PigZombie is Angry. */
private int angerLevel;
/** A random delay until this PigZombie next makes a sound. */
private int randomSoundDelay;
/** The ItemStack that any PigZombie holds (a gold sword, in fact). */
private static final ItemStack defaultHeldItem;
public EntityArab(World par1World)
{
super(par1World);
angerLevel = 0;
randomSoundDelay = 0;
texture = "/Arabs/Arab.png";
moveSpeed = 0.5F;
attackStrength = 5;
isImmuneToFire = false;
}
/**
* Returns true if the newer Entity AI code should be run
*/
protected boolean isAIEnabled()
{
return false;
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
moveSpeed = entityToAttack == null ? 0.5F : 0.95F;
if (randomSoundDelay > 0 && --randomSoundDelay == 0)
{
worldObj.playSoundAtEntity(this, "mob.villager.defaulthurt", getSoundVolume() * 2.0F, ((rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F) * 1.8F);
}
super.onUpdate();
}
/**
* Checks if the entity's current position is a valid location to spawn this entity.
*/
public boolean getCanSpawnHere()
{
return worldObj.difficultySetting > 0 && worldObj.checkIfAABBIsClear(boundingBox) && worldObj.getCollidingBoundingBoxes(this, boundingBox).size() == 0 && !worldObj.isAnyLiquid(boundingBox);
}
/**
* (abstract) Protected helper method to write subclass entity data to NBT.
*/
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setShort("Anger", (short)angerLevel);
}
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
{
super.readEntityFromNBT(par1NBTTagCompound);
angerLevel = par1NBTTagCompound.getShort("Anger");
}
/**
* Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking
* (Animals, Spiders at day, peaceful PigZombies).
*/
protected Entity findPlayerToAttack()
{
if (angerLevel == 0)
{
return null;
}
else
{
return super.findPlayerToAttack();
}
}
/**
* Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
* use this to react to sunlight and start to burn.
*/
public void onLivingUpdate()
{
super.onLivingUpdate();
}
/**
* Called when the entity is attacked.
*/
public boolean attackEntityFrom(DamageSource par1DamageSource, int par2)
{
Entity entity = par1DamageSource.getEntity();
if (entity instanceof EntityPlayer)
{
List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(32D, 32D, 32D));
for (int i = 0; i < list.size(); i++)
{
Entity entity1 = (Entity)list.get(i);
if (entity1 instanceof EntityPigZombie)
{
EntityPigZombie Entitypigzombie = (EntityPigZombie)entity1;
entitypigzombie.becomeAngryAt(entity);
}
}
becomeAngryAt(entity);
}
return super.attackEntityFrom(par1DamageSource, par2);
}
/**
* Causes this PigZombie to become angry at the supplied Entity (which will be a player).
*/
private void becomeAngryAt(Entity par1Entity)
{
entityToAttack = par1Entity;
angerLevel = 400 + rand.nextInt(400);
randomSoundDelay = rand.nextInt(40);
}
/**
* Returns the sound this mob makes while it's alive.
*/
protected String getLivingSound()
{
return "mob.villager.default";
}
/**
* Returns the sound this mob makes when it is hurt.
*/
protected String getHurtSound()
{
return "mob.mob.villager.defaulthurt";
}
/**
* Returns the sound this mob makes on death.
*/
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
/**
* Returns the item ID for the item the mob drops on death.
*/
protected int getDropItemId()
{
return Item.swordSteel.shiftedIndex;
}
/**
* Returns the item that this EntityLiving is holding, if any.
*/
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.SwordSteel, 1);
}
}
hi i followed your tutorial and it was very helpful it recompiles fine but when i start the client it says it cant find the texture i am using eclipse and followed that tutorial
this is the error message
--- BEGIN ERROR REPORT 275abf4a --------
Generated 4/8/12 10:42 AM
Minecraft: Minecraft 1.2.5
OS: Mac OS X (x86_64) version 10.6.8
Java: 1.6.0_29, Apple Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
LWJGL: 2.4.2
OpenGL: Intel HD Graphics 3000 OpenGL Engine version 2.1 APPLE-1.6.42, Intel Inc.
java.lang.RuntimeException: java.lang.Exception: Image not found: /mods/vacgun.png
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1451)
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1104)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.Exception: Image not found: /mods/vacgun.png
at net.minecraft.src.ModLoader.loadImage(ModLoader.java:1024)
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1443)
... 5 more
--- END ERROR REPORT 55313142 ----------
for some reason it won't let me do the short way to do the block, it says "The constructor Block(int, int) is undefined" as an eclipse error.
Here's my block code
public static final Block blockRedstone = new Block(255, 0).setBlockName("BlockRedstone")
.setHardness(3F).setResistance(7F).setLightValue(10F);
Sorry, you need to put the material in there as well.
public static final Block blockRedstone = new Block(255, 0, Material.wood).setBlockName("BlockRedstone")
.setHardness(3F).setResistance(7F).setLightValue(10F);
I'm Having trouble with my biome, I want it to stay at sea level, but it wants to disagree. http://imgur.com/a/Yca3C#0
I'm fairly sure that only the ocean and river biomes are set up to generate at that level. I don't know how you could make yours generate the same way with the world.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Hey techguy, I got that figured out, (The Pigzombie Code)
But Now I have 2 more errors.
One of them being:
Camel Is too small, I made it huge in Techne.
Second:
One of the mobs won't spawn. Not the camel, but the other one.. The human.
They are both supposed to spawn in deserts, and desert hills. But only the camel is, not the other one.
Here is the code:
mod_Arab:
package net.minecraft.src;
import java.util.Map;
public class mod_Arab extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityArab.class, "Arab", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityArab.class, 15, 6, 12, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.desert,
BiomeGenBase.desertHills
});
}
public void addRenderer(Map map)
{
map.put(EntityArab.class, new RenderBiped(new ModelBiped(), 1.0F));
}
public String getVersion()
{
return "1.2.5";
}
}
EntityArab:
package net.minecraft.src;
import java.util.List;
import java.util.Random;
public class EntityArab extends EntityMob
{
/** Above zero if this PigZombie is Angry. */
private int angerLevel;
/** A random delay until this PigZombie next makes a sound. */
private int randomSoundDelay;
private static final ItemStack defaultHeldItem;
public EntityArab(World par1World)
{
super(par1World);
angerLevel = 0;
randomSoundDelay = 0;
texture = "/Arabs/Arab.png";
moveSpeed = 0.5F;
attackStrength = 5;
isImmuneToFire = false;
}
/**
* Returns true if the newer Entity AI code should be run
*/
protected boolean isAIEnabled()
{
return false;
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
moveSpeed = entityToAttack == null ? 0.5F : 0.95F;
if (randomSoundDelay > 0 && --randomSoundDelay == 0)
{
worldObj.playSoundAtEntity(this, "mob.villager.defaulthurt", getSoundVolume() * 2.0F, ((rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F) * 1.8F);
}
super.onUpdate();
}
/**
* Checks if the entity's current position is a valid location to spawn this entity.
*/
public boolean getCanSpawnHere()
{
return worldObj.difficultySetting > 0 && worldObj.checkIfAABBIsClear(boundingBox) && worldObj.getCollidingBoundingBoxes(this, boundingBox).size() == 0 && !worldObj.isAnyLiquid(boundingBox);
}
/**
* (abstract) Protected helper method to write subclass entity data to NBT.
*/
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setShort("Anger", (short)angerLevel);
}
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
{
super.readEntityFromNBT(par1NBTTagCompound);
angerLevel = par1NBTTagCompound.getShort("Anger");
}
/**
* Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking
* (Animals, Spiders at day, peaceful PigZombies).
*/
protected Entity findPlayerToAttack()
{
if (angerLevel == 0)
{
return null;
}
else
{
return super.findPlayerToAttack();
}
}
/**
* Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
* use this to react to sunlight and start to burn.
*/
public void onLivingUpdate()
{
super.onLivingUpdate();
}
/**
* Called when the entity is attacked.
*/
public boolean attackEntityFrom(DamageSource par1DamageSource, int par2)
{
Entity entity = par1DamageSource.getEntity();
if (entity instanceof EntityPlayer)
{
List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(32D, 32D, 32D));
for (int i = 0; i < list.size(); i++)
{
Entity entity1 = (Entity)list.get(i);
if (entity1 instanceof EntityArab)
{
EntityArab entityarab = (EntityArab)entity1;
entityarab.becomeAngryAt(entity);
}
}
becomeAngryAt(entity);
}
return super.attackEntityFrom(par1DamageSource, par2);
}
/**
* Causes this PigZombie to become angry at the supplied Entity (which will be a player).
*/
private void becomeAngryAt(Entity par1Entity)
{
entityToAttack = par1Entity;
angerLevel = 400 + rand.nextInt(400);
randomSoundDelay = rand.nextInt(40);
}
/**
* Returns the sound this mob makes while it's alive.
*/
protected String getLivingSound()
{
return "mob.villager.default";
}
/**
* Returns the sound this mob makes when it is hurt.
*/
protected String getHurtSound()
{
return "mob.mob.villager.defaulthurt";
}
/**
* Returns the sound this mob makes on death.
*/
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
/**
* Returns the item ID for the item the mob drops on death.
*/
protected int getDropItemId()
{
return Item.swordSteel.shiftedIndex;
}
/**
* Returns the item that this EntityLiving is holding, if any.
*/
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.swordSteel, 1);
}
@Override
public int getMaxHealth() {
// TODO Auto-generated method stub
return 0;
}
}
Hey techguy, I got that figured out, (The Pigzombie Code)
But Now I have 2 more errors.
One of them being:
Camel Is too small, I made it huge in Techne.
Second:
One of the mobs won't spawn. Not the camel, but the other one.. The human.
They are both supposed to spawn in deserts, and desert hills. But only the camel is, not the other one.
Here is the code:
mod_Arab:
package net.minecraft.src;
import java.util.Map;
public class mod_Arab extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityArab.class, "Arab", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityArab.class, 15, 6, 12, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.desert,
BiomeGenBase.desertHills
});
}
public void addRenderer(Map map)
{
map.put(EntityArab.class, new RenderBiped(new ModelBiped(), 1.0F));
}
public String getVersion()
{
return "1.2.5";
}
}
EntityArab:
package net.minecraft.src;
import java.util.List;
import java.util.Random;
public class EntityArab extends EntityMob
{
/** Above zero if this PigZombie is Angry. */
private int angerLevel;
/** A random delay until this PigZombie next makes a sound. */
private int randomSoundDelay;
private static final ItemStack defaultHeldItem;
public EntityArab(World par1World)
{
super(par1World);
angerLevel = 0;
randomSoundDelay = 0;
texture = "/Arabs/Arab.png";
moveSpeed = 0.5F;
attackStrength = 5;
isImmuneToFire = false;
}
/**
* Returns true if the newer Entity AI code should be run
*/
protected boolean isAIEnabled()
{
return false;
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
moveSpeed = entityToAttack == null ? 0.5F : 0.95F;
if (randomSoundDelay > 0 && --randomSoundDelay == 0)
{
worldObj.playSoundAtEntity(this, "mob.villager.defaulthurt", getSoundVolume() * 2.0F, ((rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F) * 1.8F);
}
super.onUpdate();
}
/**
* Checks if the entity's current position is a valid location to spawn this entity.
*/
public boolean getCanSpawnHere()
{
return worldObj.difficultySetting > 0 && worldObj.checkIfAABBIsClear(boundingBox) && worldObj.getCollidingBoundingBoxes(this, boundingBox).size() == 0 && !worldObj.isAnyLiquid(boundingBox);
}
/**
* (abstract) Protected helper method to write subclass entity data to NBT.
*/
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setShort("Anger", (short)angerLevel);
}
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
{
super.readEntityFromNBT(par1NBTTagCompound);
angerLevel = par1NBTTagCompound.getShort("Anger");
}
/**
* Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking
* (Animals, Spiders at day, peaceful PigZombies).
*/
protected Entity findPlayerToAttack()
{
if (angerLevel == 0)
{
return null;
}
else
{
return super.findPlayerToAttack();
}
}
/**
* Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
* use this to react to sunlight and start to burn.
*/
public void onLivingUpdate()
{
super.onLivingUpdate();
}
/**
* Called when the entity is attacked.
*/
public boolean attackEntityFrom(DamageSource par1DamageSource, int par2)
{
Entity entity = par1DamageSource.getEntity();
if (entity instanceof EntityPlayer)
{
List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(32D, 32D, 32D));
for (int i = 0; i < list.size(); i++)
{
Entity entity1 = (Entity)list.get(i);
if (entity1 instanceof EntityArab)
{
EntityArab entityarab = (EntityArab)entity1;
entityarab.becomeAngryAt(entity);
}
}
becomeAngryAt(entity);
}
return super.attackEntityFrom(par1DamageSource, par2);
}
/**
* Causes this PigZombie to become angry at the supplied Entity (which will be a player).
*/
private void becomeAngryAt(Entity par1Entity)
{
entityToAttack = par1Entity;
angerLevel = 400 + rand.nextInt(400);
randomSoundDelay = rand.nextInt(40);
}
/**
* Returns the sound this mob makes while it's alive.
*/
protected String getLivingSound()
{
return "mob.villager.default";
}
/**
* Returns the sound this mob makes when it is hurt.
*/
protected String getHurtSound()
{
return "mob.mob.villager.defaulthurt";
}
/**
* Returns the sound this mob makes on death.
*/
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
/**
* Returns the item ID for the item the mob drops on death.
*/
protected int getDropItemId()
{
return Item.swordSteel.shiftedIndex;
}
/**
* Returns the item that this EntityLiving is holding, if any.
*/
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.swordSteel, 1);
}
@Override
public int getMaxHealth() {
// TODO Auto-generated method stub
return 0;
}
}
Please help me! :S
-lolydodo123
Please use spoilers. Why do you have them in separate mod_ classes? Everything should be in one. It makes it more organised, and easier to debug. Add the code from mod_Arab to the mod_ class you have the camel in and see if the problem persists.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Please use spoilers. Why do you have them in separate mod_ classes? Everything should be in one. It makes it more organised, and easier to debug. Add the code from mod_Arab to the mod_ class you have the camel in and see if the problem persists.
Okay, Sorry. I edited it.
Now I deleted mod_Arab and the mod_Camel looks like this:
package net.minecraft.src;
import java.util.Map;
public class mod_Camel extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityCamel.class, "Camel", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityCamel.class, 8, 3, 5, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.desert,
BiomeGenBase.desertHills
});
}
{
ModLoader.registerEntityID(EntityArab.class, "Arab", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityArab.class, 15, 6, 12, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.desert,
BiomeGenBase.desertHills
});
}
public void addRenderer(Map map)
{
map.put(EntityCamel.class, new RenderCamel(new ModelCamel(), 0.5f));
map.put(EntityArab.class, new RenderBiped(new ModelBiped(), 1.0F));
}
public String getVersion()
{
return "1.2.5";
}
}
Yet, the Arab mob won't spawn. Only the camel.
Is it because I used to pigzombie code for the Arab mob?
Or is it because it extends EntityMob?
Please help, thanks!
EDIT: Woops! Wrong code pasted.. I fixed it. There you go
Okay, Sorry. I edited it.
Now I deleted mod_Arab and the mod_Camel looks like this:
package net.minecraft.src;
import java.util.Map;
public class mod_Camel extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityCamel.class, "Camel", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityCamel.class, 8, 3, 5, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.desert,
BiomeGenBase.desertHills
});
}
{
ModLoader.registerEntityID(EntityArab.class, "Arab", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityArab.class, 15, 6, 12, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.desert,
BiomeGenBase.desertHills
});
}
public void addRenderer(Map map)
{
map.put(EntityCamel.class, new RenderCamel(new ModelCamel(), 0.5f));
map.put(EntityArab.class, new RenderBiped(new ModelBiped(), 1.0F));
}
public String getVersion()
{
return "1.2.5";
}
}
Yet, the Arab mob won't spawn. Only the camel.
Is it because I used to pigzombie code for the Arab mob?
Or is it because it extends EntityMob?
Please help, thanks!
EDIT: Woops! Wrong code pasted.. I fixed it. There you go
The only thing I can see wrong with your Arab code is that its health is set to 0. Therefore, it might be dead as soon as it spawns. Change its health in the getMaxHealth method in the EntityArab class to something like 20(20 = 10 hearts)
Loving this so far.
Just a suggestion, teach us how to port this to SMP? I'd really like to share this mod with others.
Check out jamioflan's ModLoaderMP tutorial here. Jamioflan knows all about SMP modding, as he actually maintains his own (unofficial)version of ModLoaderMP. He also has all of his mods available on SMP. You've probably heard of him because he is the creator of the planes mod. I'm still porting my mod over and fixing some issues so I can't really make a tutorial on it yet.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
The only thing I can see wrong with your Arab code is that its health is set to 0. Therefore, it might be dead as soon as it spawns. Change its health in the getMaxHealth method in the EntityArab class to something like 20(20 = 10 hearts)
Check out jamioflan's ModLoaderMP tutorial here. Jamioflan knows all about SMP modding, as he actually maintains his own (unofficial)version of ModLoaderMP. He also has all of his mods available on SMP. You've probably heard of him because he is the creator of the planes mod. I'm still porting my mod over and fixing some issues so I can't really make a tutorial on it yet.
Alright thanks. But isn't it weird how there isn't a Health amount thing in Pigzombie class? I mean, it is overrided..
I'll see if I can find any, thanks
EDIT: THANKS! IT WORKED!!! YOU ARE AWESOME! *END NERDGASM*
I've run into a stand still while making one of my blocks. Are you supposed to put both the mod_block and BlockNameHere codes into the same thing? Here is my code as it stands.
package net.minecraft.src;
public class mod_Block extends BaseMod
{
public static final Block SpikedPlate = new SpikedPlate(160, 0).setBlockName("Spiked Plate").setHardness(3F).setResistance(4F);
public void load()
{
Namehere.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pathtoyourfile/image.png");
ModLoader.registerBlock(SpikedPlate);
ModLoader.addName(SpikedPlate, "Spiked Plate");
ModLoader.addRecipe(new ItemStack(Namehere, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.2.5";
}
}
package net.minecraft.src;
import java.util.Random;
public class SpikedPlate extends Block
{
public SpikedPlate(int i, int j)
{
super(i, j, Material.cactus);
}
public int SpikedPlate(int i, Random random, int j)
{
return mod_Block.SpikedPlate.160;
}
public int quantityDropped(Random random)
{
return 1;
}}
It is supposed to function like cactus for an upcoming 'Dirty Tricks' mod. Really appreciate some help.
Hey Tech Guy, I need help with yet another thing :S.. Sorry :(..
How can I make my Mob say Custom .ogg Sounds? As for my camel, I downloaded a .mp3 then converted it to .ogg, but now I need to find a way to use it.. Any ideas how?
I've run into a stand still while making one of my blocks. Are you supposed to put both the mod_block and BlockNameHere codes into the same thing? Here is my code as it stands.
package net.minecraft.src;
public class mod_Block extends BaseMod
{
public static final Block SpikedPlate = new SpikedPlate(160, 0).setBlockName("Spiked Plate").setHardness(3F).setResistance(4F);
public void load()
{
Namehere.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pathtoyourfile/image.png");
ModLoader.registerBlock(SpikedPlate);
ModLoader.addName(SpikedPlate, "Spiked Plate");
ModLoader.addRecipe(new ItemStack(Namehere, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.2.5";
}
}
package net.minecraft.src;
import java.util.Random;
public class SpikedPlate extends Block
{
public SpikedPlate(int i, int j)
{
super(i, j, Material.cactus);
}
public int SpikedPlate(int i, Random random, int j)
{
return mod_Block.SpikedPlate.160;
}
public int quantityDropped(Random random)
{
return 1;
}}
It is supposed to function like cactus for an upcoming 'Dirty Tricks' mod. Really appreciate some help.
Hey Tech Guy, I need help with yet another thing :S.. Sorry ..
How can I make my Mob say Custom .ogg Sounds? As for my camel, I downloaded a .mp3 then converted it to .ogg, but now I need to find a way to use it.. Any ideas how?
Follow lockNload's tutorial here. It doesn't require AudioMod which is good.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Alright, my code is nearly complete. I just need some help finding out how to take my modded classes from eclipse and put it in the real game. How would I do this?
Alright, my code is nearly complete. I just need some help finding out how to take my modded classes from eclipse and put it in the real game. How would I do this?
Go to MCP, run recompile.bat, run startclient.bat (to make sure everything works), the run reobfuscate.bat, and then look in the reobf folder in MCP and you will have the .class files, then you take the texture (or folder with the texture) and just put it into the same place as the .class files (then you can put them all into a zip file), and then you install them like a regular mod.
Hi, I'm trying to make a coloured stone block (Called ScarletStone), but when I try to recompile, I get an error. Command Prompt is being dumb so I don't know if it copied all the text for the error:
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_ScarletStone.java:9: error: illegal escape c
haracter
ScarletStone.blockIndexInTexture = ModLoader.add
Override("/terrain.png", "\Red.png");
^
1 error
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
Here's my code.
mod_ScarletStone:
package net.minecraft.src;
public class mod_ScarletStone extends BaseMod
{
public static final Block ScarletStone = new BlockScarletStone(170, 0).setBlockName("ScarletStone").setHardness(3F).setResistance(4F);
public void load()
{
ScarletStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "\Red.png");
ModLoader.registerBlock(ScarletStone);
ModLoader.addName(ScarletStone, "Scarlet Stone");
ModLoader.addRecipe(new ItemStack(ScarletStone, 1), new Object [] {"#", "@", Character.valueOf('@'), Block.stone, Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 1)});
}
public String getVersion()
{
return "1.2.5";
}
}
and BlockScarletStone:
package net.minecraft.src;
import java.util.Random;
public class BlockScarletStone extends Block
{
public BlockScarletStone(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_ScarletStone.ScarletStone.blockID;
}
public int qualityDropped(Random random)
{
return 1;
}}
The crafting recipe is supposed to be a Red Dye and a stone block (Did I do that right?). Also, I put the texture .png file into MCP\bin.
this is the error message
and my code
vacgun.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/vacgun.png");I believe I know a work around. copy-renaming all of the necessary base entity classes should work, and help with potential Incompatibility's. i.e. rename EntityZombie (and the class it extends from) and renaming it to modzombie.class, and the like.
Here's my block code
public static final Block blockRedstone = new Block(255, 0).setBlockName("BlockRedstone") .setHardness(3F).setResistance(7F).setLightValue(10F);http://imgur.com/a/Yca3C#0
Is your texture in mcp/eclipse/Client/bin? Or mcp/bin/minecraft if you aren't using Eclipse?
Try BiomeGenBase around lines 124-134.
Post the error.
Is your texture in a folder called mods which is in mcp/eclipse/Client/bin? Or mcp/bin/minecraft if you aren't using Eclipse?
You'll find that the diamond grim reaper is quite rare. Try changing its number up higher just to test if it is actually spawning.
Sorry, you need to put the material in there as well.
public static final Block blockRedstone = new Block(255, 0, Material.wood).setBlockName("BlockRedstone") .setHardness(3F).setResistance(7F).setLightValue(10F);I've updated the tutorial.
I'm fairly sure that only the ocean and river biomes are set up to generate at that level. I don't know how you could make yours generate the same way with the world.
together they are powerful beyond imagination."
But Now I have 2 more errors.
One of them being:
Camel Is too small, I made it huge in Techne.
Second:
One of the mobs won't spawn. Not the camel, but the other one.. The human.
They are both supposed to spawn in deserts, and desert hills. But only the camel is, not the other one.
Here is the code:
mod_Arab:
package net.minecraft.src; import java.util.Map; public class mod_Arab extends BaseMod { public void load() { ModLoader.registerEntityID(EntityArab.class, "Arab", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(EntityArab.class, 15, 6, 12, EnumCreatureType.creature, new BiomeGenBase[] { BiomeGenBase.desert, BiomeGenBase.desertHills }); } public void addRenderer(Map map) { map.put(EntityArab.class, new RenderBiped(new ModelBiped(), 1.0F)); } public String getVersion() { return "1.2.5"; } }EntityArab:
package net.minecraft.src; import java.util.List; import java.util.Random; public class EntityArab extends EntityMob { /** Above zero if this PigZombie is Angry. */ private int angerLevel; /** A random delay until this PigZombie next makes a sound. */ private int randomSoundDelay; private static final ItemStack defaultHeldItem; public EntityArab(World par1World) { super(par1World); angerLevel = 0; randomSoundDelay = 0; texture = "/Arabs/Arab.png"; moveSpeed = 0.5F; attackStrength = 5; isImmuneToFire = false; } /** * Returns true if the newer Entity AI code should be run */ protected boolean isAIEnabled() { return false; } /** * Called to update the entity's position/logic. */ public void onUpdate() { moveSpeed = entityToAttack == null ? 0.5F : 0.95F; if (randomSoundDelay > 0 && --randomSoundDelay == 0) { worldObj.playSoundAtEntity(this, "mob.villager.defaulthurt", getSoundVolume() * 2.0F, ((rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F) * 1.8F); } super.onUpdate(); } /** * Checks if the entity's current position is a valid location to spawn this entity. */ public boolean getCanSpawnHere() { return worldObj.difficultySetting > 0 && worldObj.checkIfAABBIsClear(boundingBox) && worldObj.getCollidingBoundingBoxes(this, boundingBox).size() == 0 && !worldObj.isAnyLiquid(boundingBox); } /** * (abstract) Protected helper method to write subclass entity data to NBT. */ public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) { super.writeEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.setShort("Anger", (short)angerLevel); } /** * (abstract) Protected helper method to read subclass entity data from NBT. */ public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) { super.readEntityFromNBT(par1NBTTagCompound); angerLevel = par1NBTTagCompound.getShort("Anger"); } /** * Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking * (Animals, Spiders at day, peaceful PigZombies). */ protected Entity findPlayerToAttack() { if (angerLevel == 0) { return null; } else { return super.findPlayerToAttack(); } } /** * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons * use this to react to sunlight and start to burn. */ public void onLivingUpdate() { super.onLivingUpdate(); } /** * Called when the entity is attacked. */ public boolean attackEntityFrom(DamageSource par1DamageSource, int par2) { Entity entity = par1DamageSource.getEntity(); if (entity instanceof EntityPlayer) { List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(32D, 32D, 32D)); for (int i = 0; i < list.size(); i++) { Entity entity1 = (Entity)list.get(i); if (entity1 instanceof EntityArab) { EntityArab entityarab = (EntityArab)entity1; entityarab.becomeAngryAt(entity); } } becomeAngryAt(entity); } return super.attackEntityFrom(par1DamageSource, par2); } /** * Causes this PigZombie to become angry at the supplied Entity (which will be a player). */ private void becomeAngryAt(Entity par1Entity) { entityToAttack = par1Entity; angerLevel = 400 + rand.nextInt(400); randomSoundDelay = rand.nextInt(40); } /** * Returns the sound this mob makes while it's alive. */ protected String getLivingSound() { return "mob.villager.default"; } /** * Returns the sound this mob makes when it is hurt. */ protected String getHurtSound() { return "mob.mob.villager.defaulthurt"; } /** * Returns the sound this mob makes on death. */ protected String getDeathSound() { return "mob.villager.defaultdeath"; } /** * Returns the item ID for the item the mob drops on death. */ protected int getDropItemId() { return Item.swordSteel.shiftedIndex; } /** * Returns the item that this EntityLiving is holding, if any. */ public ItemStack getHeldItem() { return defaultHeldItem; } static { defaultHeldItem = new ItemStack(Item.swordSteel, 1); } @Override public int getMaxHealth() { // TODO Auto-generated method stub return 0; } }Please help me! :S
-lolydodo123
Please use spoilers. Why do you have them in separate mod_ classes? Everything should be in one. It makes it more organised, and easier to debug. Add the code from mod_Arab to the mod_ class you have the camel in and see if the problem persists.
together they are powerful beyond imagination."
Okay, Sorry. I edited it.
Now I deleted mod_Arab and the mod_Camel looks like this:
package net.minecraft.src; import java.util.Map; public class mod_Camel extends BaseMod { public void load() { ModLoader.registerEntityID(EntityCamel.class, "Camel", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(EntityCamel.class, 8, 3, 5, EnumCreatureType.creature, new BiomeGenBase[] { BiomeGenBase.desert, BiomeGenBase.desertHills }); } { ModLoader.registerEntityID(EntityArab.class, "Arab", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(EntityArab.class, 15, 6, 12, EnumCreatureType.creature, new BiomeGenBase[] { BiomeGenBase.desert, BiomeGenBase.desertHills }); } public void addRenderer(Map map) { map.put(EntityCamel.class, new RenderCamel(new ModelCamel(), 0.5f)); map.put(EntityArab.class, new RenderBiped(new ModelBiped(), 1.0F)); } public String getVersion() { return "1.2.5"; } }Yet, the Arab mob won't spawn. Only the camel.
Is it because I used to pigzombie code for the Arab mob?
Or is it because it extends EntityMob?
Please help, thanks!
EDIT: Woops! Wrong code pasted.. I fixed it. There you go
Just a suggestion, teach us how to port this to SMP? I'd really like to share this mod with others.
The only thing I can see wrong with your Arab code is that its health is set to 0. Therefore, it might be dead as soon as it spawns. Change its health in the getMaxHealth method in the EntityArab class to something like 20(20 = 10 hearts)
Check out jamioflan's ModLoaderMP tutorial here. Jamioflan knows all about SMP modding, as he actually maintains his own (unofficial)version of ModLoaderMP. He also has all of his mods available on SMP. You've probably heard of him because he is the creator of the planes mod. I'm still porting my mod over and fixing some issues so I can't really make a tutorial on it yet.
together they are powerful beyond imagination."
Alright thanks. But isn't it weird how there isn't a Health amount thing in Pigzombie class? I mean, it is overrided..
I'll see if I can find any, thanks
EDIT: THANKS! IT WORKED!!!
YOU ARE AWESOME! *END NERDGASM*
public class mod_Block extends BaseMod
{
public static final Block SpikedPlate = new SpikedPlate(160, 0).setBlockName("Spiked Plate").setHardness(3F).setResistance(4F);
public void load()
{
Namehere.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pathtoyourfile/image.png");
ModLoader.registerBlock(SpikedPlate);
ModLoader.addName(SpikedPlate, "Spiked Plate");
ModLoader.addRecipe(new ItemStack(Namehere, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.2.5";
}
}
package net.minecraft.src;
import java.util.Random;
public class SpikedPlate extends Block
{
public SpikedPlate(int i, int j)
{
super(i, j, Material.cactus);
}
public int SpikedPlate(int i, Random random, int j)
{
return mod_Block.SpikedPlate.160;
}
public int quantityDropped(Random random)
{
return 1;
}}
It is supposed to function like cactus for an upcoming 'Dirty Tricks' mod. Really appreciate some help.
How can I make my Mob say Custom .ogg Sounds? As for my camel, I downloaded a .mp3 then converted it to .ogg, but now I need to find a way to use it.. Any ideas how?
They need to be in separate classes(files).
Follow lockNload's tutorial here. It doesn't require AudioMod which is good.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumGo to MCP, run recompile.bat, run startclient.bat (to make sure everything works), the run reobfuscate.bat, and then look in the reobf folder in MCP and you will have the .class files, then you take the texture (or folder with the texture) and just put it into the same place as the .class files (then you can put them all into a zip file), and then you install them like a regular mod.
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_ScarletStone.java:9: error: illegal escape c
haracter
ScarletStone.blockIndexInTexture = ModLoader.add
Override("/terrain.png", "\Red.png");
^
1 error
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
Here's my code.
mod_ScarletStone:
package net.minecraft.src; public class mod_ScarletStone extends BaseMod { public static final Block ScarletStone = new BlockScarletStone(170, 0).setBlockName("ScarletStone").setHardness(3F).setResistance(4F); public void load() { ScarletStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "\Red.png"); ModLoader.registerBlock(ScarletStone); ModLoader.addName(ScarletStone, "Scarlet Stone"); ModLoader.addRecipe(new ItemStack(ScarletStone, 1), new Object [] {"#", "@", Character.valueOf('@'), Block.stone, Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 1)}); } public String getVersion() { return "1.2.5"; } }and BlockScarletStone:
package net.minecraft.src; import java.util.Random; public class BlockScarletStone extends Block { public BlockScarletStone(int i, int j) { super(i, j, Material.rock); } public int idDropped(int i, Random random, int j) { return mod_ScarletStone.ScarletStone.blockID; } public int qualityDropped(Random random) { return 1; }}The crafting recipe is supposed to be a Red Dye and a stone block (Did I do that right?). Also, I put the texture .png file into MCP\bin.