package net.minecraft.src;
public class EntitySteveHD extends EntityCreature
{
public EntitySteveHD(World par1World)
{
super(par1World);
this.moveSpeed = 0.46F;
this.texture = "/Graphia/mob/stevehd.png";
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false));
this.tasks.addTask(2, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
this.tasks.addTask(3, new EntityAIWander(this, this.moveSpeed));
this.tasks.addTask(4, new EntityAILookIdle(this));
this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPig.class, 16.0F, 0, true));
}
public int func_82193_c(Entity par1Entity)
{
return 4;
}
public int getMaxHealth()
{
return 20;
}
protected boolean isAIEnabled()
{
return true;
}
protected String getLivingSound()
{
return "mob.pig.say";
}
protected String getHurtSound()
{
return "mob.pig.say";
}
protected String getDeathSound()
{
return "mob.pig.death";
}
protected int getDropItemId()
{
return mod_Graphia.Gemerald.shiftedIndex;
}
protected void dropFewItems(boolean par1, int par2)
{
if (par1)
{
int var3 = this.rand.nextInt(2 + par2);
for (int var4 = 0; var4 < var3; ++var4)
{
this.dropItem(mod_Graphia.Gemerald.shiftedIndex, 1);
}
}
}
public int getAttackStrength(Entity par1Entity)
{
return 1;
}
protected boolean canDespawn()
{
return false;
}
}
I spawn my mob and it doesn't appear. It makes the sound but doesn't appear as if it's invisible. It doesn't work on any difficulty and it pretty much disappears when spawned.
i dont know if i can make a throwable tutorial using only modloader i think it needs forge. To shrink a mob its possible as done with breeding and babies growing look around in that code
Can you do a tutorial on how to add a new brewing recipe and a new potion. Even if you just give it a potion effect that is already there, just not in the game( ex blindness, nausea, and wither)
still getting the error... i am going to post the error and the .java here to see if maybe you see something i don't... i was trying to just follow your basic one with a blue flower
ERROR
Is Modded: Very likely; Jar signature invalidated
Type: Client (map_client.txt)
Texture Pack: Default
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
java.lang.RuntimeException: java.lang.Exception: Image not found: /Blue Flower.png
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1694)
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1200)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:878)
at net.minecraft.client.Minecraft.run(Minecraft.java:768)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.Exception: Image not found: /Blue Flower.png
at net.minecraft.src.ModLoader.loadImage(ModLoader.java:1117)
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1686)
... 5 more
--- END ERROR REPORT c25d6214 ----------
JAVA
package net.minecraft.src;
import java.util.*;
public class mod_test extends BaseMod
{
public static final Block blueFlower = new BlockFlower(165, ModLoader.addOverride("/terrain.png", "/test.png")).setBlockName("blueFlower");
public void load()
{
ModLoader.registerBlock(blueFlower);
ModLoader.addName(blueFlower, "Blue Flower");
}
public String getVersion()
{
return "1.4.2";
}
public void generateSurface(World var1, Random var2, int var3, int var4)
{
int rarity = 1;//increse to make flower more common
for(int i = 0; i<rarity; i++)
{
int var5 = var2.nextInt(128);
new WorldGenFlowers(blueFlower.blockID).generate(var1, var2, var3, var4, var5);
}
}
}
Rollback Post to RevisionRollBack
You are right to fear the darkness, for i am always hunting you
still getting the error... i am going to post the error and the .java here to see if maybe you see something i don't... i was trying to just follow your basic one with a blue flower
public static final Block blueFlower = new BlockFlower(165, ModLoader.addOverride("/terrain.png", "/test.png")).setBlockName("blueFlower");
This says that the file will be in the Client/src folder. Did you put it in there, or in Client/src/net/minecraft/src?
29 rep for this?
I dont agree AT ALL.
This is by far has THE..... BEST tutorials I've ever seen.
This deserves like 500000 rep.
I just love the way you explain everything, other than just telling us.. Oh you need to put this so you make this but im too lazy to explain what it does.
Great job.
But. If I can point out 1 small thing you could do... You might want to like have a small thing showing how to set up everything. But oh whatevs.
Kudos to you
still getting the error... i am going to post the error and the .java here to see if maybe you see something i don't... i was trying to just follow your basic one with a blue flower
ERROR
Is Modded: Very likely; Jar signature invalidated
Type: Client (map_client.txt)
Texture Pack: Default
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
java.lang.RuntimeException: java.lang.Exception: Image not found: /Blue Flower.png
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1694)
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1200)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:878)
at net.minecraft.client.Minecraft.run(Minecraft.java:768)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.Exception: Image not found: /Blue Flower.png
at net.minecraft.src.ModLoader.loadImage(ModLoader.java:1117)
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1686)
... 5 more
--- END ERROR REPORT c25d6214 ----------
JAVA
package net.minecraft.src;
import java.util.*;
public class mod_test extends BaseMod
{
public static final Block blueFlower = new BlockFlower(165, ModLoader.addOverride("/terrain.png", "/test.png")).setBlockName("blueFlower");
public void load()
{
ModLoader.registerBlock(blueFlower);
ModLoader.addName(blueFlower, "Blue Flower");
}
public String getVersion()
{
return "1.4.2";
}
public void generateSurface(World var1, Random var2, int var3, int var4)
{
int rarity = 1;//increse to make flower more common
for(int i = 0; i<rarity; i++)
{
int var5 = var2.nextInt(128);
new WorldGenFlowers(blueFlower.blockID).generate(var1, var2, var3, var4, var5);
}
}
}
am also keen on learning how to make my mobs have weapons and armor, Ive been trying all day and haven't succeeded except when i implemented skeleton but then they catch on fire, i also want my mob to be able to pick up weapons you drop because then we can have duels
Ok so.. umm how do you add your mod item into the smelting recipe....
Ill show you wat I mean XD
mod_Eridian:
package net.minecraft.src;
public class mod_Eridian extends BaseMod
{
public static final Item EridianItem = new ItemEridian(5320).setItemName("Eridian");
public String getVersion()
{
return "Eridian";
}
public void load()
{
ModLoader.addName(EridianItem, "Eridian");
ModLoader.addSmelting(Item.ingotIron.shiftedIndex, new ItemStack(Item.Eridian, 1), 4.0F);
}
}
ItemEridian: (Dont think you need this part but whateves.)
package net.minecraft.src;
public class ItemEridian extends Item
{
protected ItemEridian(int par1)
{
super(par1);
setCreativeTab(CreativeTabs.tabMaterials);
iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Eridian.png");
}
}
Error:
== MCP 7.25 (data: 7.25, client: 1.4.6, server: 1.4.6) ==
# found ff, ff patches, srgs, name csvs, doc csvs, param csvs, renumber csv, ast
yle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_07\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_Eridian.java:15: error: cannot find symbol
ModLoader.addSmelting(Item.ingotIron.shiftedIndex, new ItemStack(Item.Eridian, 1
), 4.0F);
^
symbol: variable Eridian
location: class Item
1 error
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
I know what the error says and all but I just dont know what variable or whatever to use...
Thanks.
package net.minecraft.src; public class EntitySteveHD extends EntityCreature { public EntitySteveHD(World par1World) { super(par1World); this.moveSpeed = 0.46F; this.texture = "/Graphia/mob/stevehd.png"; this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false)); this.tasks.addTask(2, new EntityAIMoveTwardsRestriction(this, this.moveSpeed)); this.tasks.addTask(3, new EntityAIWander(this, this.moveSpeed)); this.tasks.addTask(4, new EntityAILookIdle(this)); this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPig.class, 16.0F, 0, true)); } public int func_82193_c(Entity par1Entity) { return 4; } public int getMaxHealth() { return 20; } protected boolean isAIEnabled() { return true; } protected String getLivingSound() { return "mob.pig.say"; } protected String getHurtSound() { return "mob.pig.say"; } protected String getDeathSound() { return "mob.pig.death"; } protected int getDropItemId() { return mod_Graphia.Gemerald.shiftedIndex; } protected void dropFewItems(boolean par1, int par2) { if (par1) { int var3 = this.rand.nextInt(2 + par2); for (int var4 = 0; var4 < var3; ++var4) { this.dropItem(mod_Graphia.Gemerald.shiftedIndex, 1); } } } public int getAttackStrength(Entity par1Entity) { return 1; } protected boolean canDespawn() { return false; } }I spawn my mob and it doesn't appear. It makes the sound but doesn't appear as if it's invisible. It doesn't work on any difficulty and it pretty much disappears when spawned.
I found this in the EntitySpider class:
public void initCreature() { if (this.worldObj.rand.nextInt(300) == 0) { EntitySkeleton var1 = new EntitySkeleton(this.worldObj); var1.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F); var1.initCreature(); this.worldObj.spawnEntityInWorld(var1); var1.mountEntity(this); } }This means that 1 in 300 spiders will have a skeleton on it's back. You also need this:
public double getMountedYOffset() { return (double)this.height * 0.75D - 0.5D; }Hope this helps. I didn't look in the Skeleton file, so there may be something more you have to do...
Bleach Mod
i tried putting it into the bin -> minecraft folder but it doesn't seem to see it....
its not a difference in spelling and i am a bit confused exactly where to put them..
otherwise this tutorial is fantastic and extremely helpful though looking forward to getting my mod out soon once i figure out this small issue!
You are right to fear the darkness, for i am always hunting you
ERROR
JAVA
package net.minecraft.src; import java.util.*; public class mod_test extends BaseMod { public static final Block blueFlower = new BlockFlower(165, ModLoader.addOverride("/terrain.png", "/test.png")).setBlockName("blueFlower"); public void load() { ModLoader.registerBlock(blueFlower); ModLoader.addName(blueFlower, "Blue Flower"); } public String getVersion() { return "1.4.2"; } public void generateSurface(World var1, Random var2, int var3, int var4) { int rarity = 1;//increse to make flower more common for(int i = 0; i<rarity; i++) { int var5 = var2.nextInt(128); new WorldGenFlowers(blueFlower.blockID).generate(var1, var2, var3, var4, var5); } } }You are right to fear the darkness, for i am always hunting you
This says that the file will be in the Client/src folder. Did you put it in there, or in Client/src/net/minecraft/src?
Bleach Mod
I dont agree AT ALL.
This is by far has THE..... BEST tutorials I've ever seen.
This deserves like 500000 rep.
I just love the way you explain everything, other than just telling us.. Oh you need to put this so you make this but im too lazy to explain what it does.
Great job.
But. If I can point out 1 small thing you could do... You might want to like have a small thing showing how to set up everything. But oh whatevs.
Kudos to you
You are right to fear the darkness, for i am always hunting you
Ill show you wat I mean XD
mod_Eridian:
package net.minecraft.src; public class mod_Eridian extends BaseMod { public static final Item EridianItem = new ItemEridian(5320).setItemName("Eridian"); public String getVersion() { return "Eridian"; } public void load() { ModLoader.addName(EridianItem, "Eridian"); ModLoader.addSmelting(Item.ingotIron.shiftedIndex, new ItemStack(Item.Eridian, 1), 4.0F); } }ItemEridian: (Dont think you need this part but whateves.)
package net.minecraft.src; public class ItemEridian extends Item { protected ItemEridian(int par1) { super(par1); setCreativeTab(CreativeTabs.tabMaterials); iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Eridian.png"); } }Error:
I know what the error says and all but I just dont know what variable or whatever to use...
Thanks.