Mods loaded: 2
ModLoader 1.2.5
mod_Diego for 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 3fb4371 --------
Generated 4/9/12 11:55 PM
Minecraft: Minecraft 1.2.5
OS: Mac OS X (x86_64) version 10.7.3
Java: 1.6.0_31, Apple Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
LWJGL: 2.4.2
OpenGL: NVIDIA GeForce 9400 OpenGL Engine version 2.1 NVIDIA-7.18.11, NVIDIA Corporation
java.lang.NullPointerException
at net.minecraft.src.ItemPigMan.onItemUse(ItemPigMan.java:18)
at net.minecraft.src.ItemStack.useItem(ItemStack.java:112)
at net.minecraft.src.PlayerControllerCreative.onPlayerRightClick(PlayerControllerCreative.java:78)
at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1282)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1631)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:809)
at net.minecraft.client.Minecraft.run(Minecraft.java:747)
at java.lang.Thread.run(Thread.java:680)
--- END ERROR REPORT 9f3a8a ----------
Post your code please.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
it didn't work, i get errors at lines 17, 18 and 19 all having to do with EntityLiving. And if you need, here's EntityPigMan.java:
package net.minecraft.src;
import java.util.Random;
public class EntityPigMan extends EntityCreature
{
public EntityPigMan(World world)
{
super(world);
texture = "/mob/pigman.png";
moveSpeed = 0.5F;
}
public int getMaxHealth()
{
return 20;
}
/**
* Returns the sound this mob makes while it's alive.
*/
protected String getLivingSound()
{
return "mob.pig";
}
/**
* Returns the sound this mob makes when it is hurt.
*/
protected String getHurtSound()
{
return "mob.pig";
}
/**
* Returns the sound this mob makes on death.
*/
protected String getDeathSound()
{
return "mob.pigdeath";
}
protected void dropFewItems(boolean par1, int par2)
{
int i = rand.nextInt(3) + rand.nextInt(1 + par2);
for(int j = 0; j < i; j++)
if(isBurning())
{
dropItem(Item.porkCooked.shiftedIndex, 1);
} else
{
dropItem(Item.porkRaw.shiftedIndex, 1);
}
if(isBurning())
{
dropItem(mod_Diego.bacon.shiftedIndex, 1);
} else
{
dropItem(mod_Diego.baconRaw.shiftedIndex, 1);
}
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(mod_Diego.oreFood, 1);
}
private static final ItemStack defaultHeldItem;
protected void dropRareDrop(int par1)
{
if(par1 > 0)
{
ItemStack itemstack = new ItemStack(mod_Diego.oreFood);
dropItem(mod_Diego.oreFood.shiftedIndex, 1);
}
}
protected boolean canDespawn()
{
return false;
}
}
Post the errors.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
If i run the game and ignore the error warning, it plays as normal until using the egg, at which point it gives me the null pointer exeption i put in my post
Techguy, I need your help with some errors I have. http://s1077.photobu...rrent=Error.png
There's a picture you can use. It's labelled so you can tell what's going on.
Anybody else that has a solution, can you also help me please?
Thanks.
If i run the game and ignore the error warning, it plays as normal until using the egg, at which point it gives me the null pointer exeption i put in my post
I missed the first part when I copied and pasted before. The line should say:
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
package net.minecraft.src;
public class mod_SpikedPlate
{
public static final Block SpikedPlate = new BlockSpikedPlate(170,0) .setBlockName ("SpikedPlate").setHardness(2F).setResistance(1F)
public void load()
{
SpikedPlate.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mods/Spiked Plate.png");
ModLoader.registerBlock(Namehere);
ModLoader.addName(SpikedPlate, "Spiked Plate");
ModLoader.addRecipe(new ItemStack(Namehere, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.2.5";
}
}
}
BlockSpikedPlate
package net.minecraft.src;
import java.util.Random;
public class BlockSpikedPlate extends Block
{
public BlockSpikedPlate(int i, int j)
{
super(i, j, Material.cactus);
}
public int idDropped(int i, Random random, int j)
{
return mod_SpikedPlate.SpikedPlate.blockID;
}
public int quantityDropped(Random random)
{
return 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
Spoiler
and my code
vacgun.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/vacgun.png");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?
it is in the eclipse root but it didn't work also how do i change my mob sizes
Ok so I have made tools and such but I have 3 problems. Number one whats the code I need to use so I can put he .png files in my .jar in jars? Also how do I use a differ items.png to add on to the normal one but have nothing it but my tools and the ingot? And last why does my ingot have a white outline/border on it?
hey, i create a sword, but now i would add if i kill a Mob, thats the mob drops something random. So 5% chance to drop a Gold Sword. If i add a Random Function to hitEntity ingame it dont work.
Ok so I have made tools and such but I have 3 problems. Number one whats the code I need to use so I can put he .png files in my .jar in jars? Also how do I use a differ items.png to add on to the normal one but have nothing it but my tools and the ingot? And last why does my ingot have a white outline/border on it?
Ask in Mod Development. None of my tutorials yet teach how to make weapons or tools, so I'm not helping with them.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I'm not asking about the tools as they work great. I was asking how to put my .png files elsewhere other than /mods. And Why my ingot had a white border around it.
I'm not asking about the tools as they work great. I was asking how to put my .png files elsewhere other than /mods. And Why my ingot had a white border around it.
So ask that in Mod Development. This isn't an "ask your questions here" thread, it is for people who are using my tutorials and need help.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I did use your tuts and they are extremely helpfull. I used them for making the ingot and where to put the textures. But I didn't know if you knew why my texture had a white border around it.
I did use your tuts and they are extremely helpfull. I used them for making the ingot and where to put the textures. But I didn't know if you knew why my texture had a white border around it.
In your code, change the override file destination. You can make it be any folder you want. As for the border, you probably did not make the png transparent. You have to do that.
Please listen to TechGuy. You can find these answers in many other places, so don't bother him. He is in no way required to answer your questions, because you don't pay him. If you want a tutor, get out your wallet and get ready to throw some cash away.
Is there anyway to go into photoshop and make an exsisting image tranparent? And when I used the modloader override code and changed the destination for the items.png it said "no registry for this texture".
java.lang.Exception: No registry for this texture: /mods/items.png
at net.minecraft.src.ModLoader.getUniqueSpriteIndex(ModLoader.java:681)
at net.minecraft.src.ModLoader.addOverride(ModLoader.java:365)
at net.minecraft.src.mod_SteelCraft.load(mod_SteelCraft.java:21)
at net.minecraft.src.ModLoader.init(ModLoader.java:861)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:154)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:86)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:394)
at net.minecraft.client.Minecraft.run(Minecraft.java:732)
at java.lang.Thread.run(Unknown Source)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Post your code please.
together they are powerful beyond imagination."
package net.minecraft.src; import java.util.Random; public class ItemPigMan extends Item { public ItemPigMan (int i) { super(i); maxStackSize = 64; setMaxDamage(200); } private World worldObj; public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l) { if(!world.isRemote) { ModLoader.getMinecraftInstance().thePlayer.addChatMessage("You just spawned a pigman! :)"); EntityLiving entityliving = (EntityLiving)EntityList.createEntityByName("PigManEgg", entityplayer.worldObj); entityliving.setLocationAndAngles(i, j + 1, k, 0F, 0F); entityplayer.worldObj.spawnEntityInWorld(entityliving); entityplayer.swingItem(); } return true; } }mod_Diego.java:
package net.minecraft.src; import java.util.Random; import java.util.Map; public class mod_Diego extends BaseMod { public static final Item bacon= new ItemFood(601, 6, 10F, true) .setPotionEffect(Potion.damageBoost.id, 30, 0, 0.98F).setItemName("bacon"); public static final Item baconRaw= new ItemFood(602, 1, 0F, true) .setPotionEffect(Potion.poison.id, 30, 0, 0.6F).setItemName("baconRaw"); public static final Item oreFood= new ItemFood(603, 24, 9999999999F, false) .setPotionEffect(Potion.resistance.id, 1200, 0, 1F).setItemName("oreFood"); public static final Block blockRedstone = new BlockRedstone (255, 0).setBlockName("blockRedstone") .setHardness(3F).setResistance(7F).setLightValue(14F); public static final Item PigManEgg = (new ItemPigMan(317)).setItemName("PigManEgg"); public void load() { //overrides bacon.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/food/bacon/bacon.png"); baconRaw.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/food/bacon/baconRaw.png"); oreFood.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/food/Mineral food/Mineral Food.png"); blockRedstone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/blocks/blockRedstone/Redstone block.png"); PigManEgg.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/spawn eggs/PigManEgg.png"); //recipes only /** * ModLoader.addRecipe(new ItemStack([Block].*item or block to be created*, *quantity, int*), new Object[] *{ "top row", "medium row", "lower row", Character.valueOf('*sign assigned to item of block*'), *[Block or Item].*the item assigned to the symbol}); */ ModLoader.addRecipe(new ItemStack(Block.sapling, 3), new Object[] { "###", "###", "###", Character.valueOf('#'), Item.seeds}); ModLoader.addRecipe(new ItemStack(Block.endPortalFrame, 3), new Object[] {"[email protected]$", "@#@", "[email protected]$", Character.valueOf('@'), Block.obsidian, Character.valueOf('#'), Block.blockDiamond, Character.valueOf('$'), Block.stoneBrick}); ModLoader.addShapelessRecipe(new ItemStack(Block.grass), new Object[] {Block.dirt, Item.seeds}); ModLoader.addShapelessRecipe(new ItemStack(bacon, 3), new Object[] {Item.porkCooked }); ModLoader.addShapelessRecipe(new ItemStack(baconRaw), new Object[] {Item.porkRaw }); ModLoader.addRecipe(new ItemStack(Item.melonSeeds), new Object[] {"@@@", "@@@", "@@@", Character.valueOf('@'), Item.appleRed}); ModLoader.addRecipe(new ItemStack(oreFood, 3), new Object[] {"@#@", Character.valueOf('@'), Item.ingotIron, Character.valueOf('#'), Item.diamond}); ModLoader.addRecipe(new ItemStack(blockRedstone), new Object[] {"@@@", "@@@", "@@@", Character.valueOf('@'), Item.redstone}); ModLoader.addShapelessRecipe(new ItemStack(Item.redstone, 9), new Object[] {blockRedstone }); //names /** * ModLoader.addName([Item/Block.]*Item or Block to be named*, "*name to be out*"); */ ModLoader.addName(bacon, "Bacon"); ModLoader.addName(baconRaw, "bacon"); ModLoader.addName(oreFood, "Mineral Food"); ModLoader.addName(blockRedstone, "Redstone Block"); ModLoader.addName(PigManEgg, "Spawn Pigman"); //Smelting recipes /** * ModLoader.addSmelting(*Item or Block, string*.[BlockID or shiftedIndex depending on item or block], * new ItemStack([Item. or Block.]*item or block, string*, *quantity, int*)); * Note: if it's a block or item in vanilla, one must put Item. or Block. before the string variable. */ ModLoader.addSmelting(baconRaw.shiftedIndex, new ItemStack(bacon, 1)); ModLoader.addSmelting(Block.blockDiamond.blockID, new ItemStack(oreFood, 9)); ModLoader.addSmelting(Block.blockSteel.blockID, new ItemStack(oreFood, 5)); ModLoader.addSmelting(Block.oreRedstone.blockID, new ItemStack(Item.redstone, 4)); //extra bits //register block ModLoader.registerBlock(blockRedstone); //register entity ModLoader.registerEntityID(EntityPigMan.class, "Pigman", ModLoader.getUniqueEntityId()); //add spawn ModLoader.addSpawn(EntityPigMan.class, 30, 14, 20, EnumCreatureType.creature, new BiomeGenBase[] { BiomeGenBase.plains, BiomeGenBase.extremeHills, BiomeGenBase.forest, BiomeGenBase.icePlains }); } public void addRenderer(Map map) { map.put(EntityPigMan.class, new RenderBiped(new ModelBiped(), 0.5F)); } public String getVersion() { return "for 1.2.5"; } }I'd say the problem is being caused by an entity called PigManEgg not existing. Change it to say this in the item class:
entityliving = (EntityLiving)EntityList.createEntityByName("PigMan", entityplayer.worldObj);together they are powerful beyond imagination."
package net.minecraft.src; import java.util.Random; public class EntityPigMan extends EntityCreature { public EntityPigMan(World world) { super(world); texture = "/mob/pigman.png"; moveSpeed = 0.5F; } public int getMaxHealth() { return 20; } /** * Returns the sound this mob makes while it's alive. */ protected String getLivingSound() { return "mob.pig"; } /** * Returns the sound this mob makes when it is hurt. */ protected String getHurtSound() { return "mob.pig"; } /** * Returns the sound this mob makes on death. */ protected String getDeathSound() { return "mob.pigdeath"; } protected void dropFewItems(boolean par1, int par2) { int i = rand.nextInt(3) + rand.nextInt(1 + par2); for(int j = 0; j < i; j++) if(isBurning()) { dropItem(Item.porkCooked.shiftedIndex, 1); } else { dropItem(Item.porkRaw.shiftedIndex, 1); } if(isBurning()) { dropItem(mod_Diego.bacon.shiftedIndex, 1); } else { dropItem(mod_Diego.baconRaw.shiftedIndex, 1); } } public ItemStack getHeldItem() { return defaultHeldItem; } static { defaultHeldItem = new ItemStack(mod_Diego.oreFood, 1); } private static final ItemStack defaultHeldItem; protected void dropRareDrop(int par1) { if(par1 > 0) { ItemStack itemstack = new ItemStack(mod_Diego.oreFood); dropItem(mod_Diego.oreFood.shiftedIndex, 1); } } protected boolean canDespawn() { return false; } }Post the errors.
together they are powerful beyond imagination."
http://s1077.photobucket.com/albums/w473/AussieMUDKIP/?action=view¤t=Error.png
There's a picture you can use. It's labelled so you can tell what's going on.
Anybody else that has a solution, can you also help me please?
Thanks.
variable
18:entityliving cannot be resolved
19:entityliving cannot be resolved to a variable
code with error with error location underlined (the red dotted line)
17: entityliving = (EntityLiving)EntityList.createEntityByName("PigManEgg", entityplayer.worldObj);
18:entityliving.setLocationAndAngles(i, j + 1, k, 0F, 0F);
19:entityplayer.worldObj.spawnEntityInWorld(entityliving);
If i run the game and ignore the error warning, it plays as normal until using the egg, at which point it gives me the null pointer exeption i put in my post
Post your code.
I missed the first part when I copied and pasted before. The line should say:
EntityLiving entityliving = (EntityLiving)EntityList.createEntityByName("PigMan", entityplayer.worldObj);together they are powerful beyond imagination."
Here's my code.
mod_SpikedPlate.java
public class mod_SpikedPlate
{
public static final Block SpikedPlate = new BlockSpikedPlate(170,0) .setBlockName ("SpikedPlate").setHardness(2F).setResistance(1F)
public void load()
{
SpikedPlate.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mods/Spiked Plate.png");
ModLoader.registerBlock(Namehere);
ModLoader.addName(SpikedPlate, "Spiked Plate");
ModLoader.addRecipe(new ItemStack(Namehere, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.2.5";
}
}
}
BlockSpikedPlate
package net.minecraft.src;
import java.util.Random;
public class BlockSpikedPlate extends Block
{
public BlockSpikedPlate(int i, int j)
{
super(i, j, Material.cactus);
}
public int idDropped(int i, Random random, int j)
{
return mod_SpikedPlate.SpikedPlate.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
it is in the eclipse root but it didn't work also how do i change my mob sizes
Put the "mods" folder with the picture in it in the minecraft.jar.
Ask in Mod Development. None of my tutorials yet teach how to make weapons or tools, so I'm not helping with them.
together they are powerful beyond imagination."
So ask that in Mod Development. This isn't an "ask your questions here" thread, it is for people who are using my tutorials and need help.
together they are powerful beyond imagination."
In your code, change the override file destination. You can make it be any folder you want. As for the border, you probably did not make the png transparent. You have to do that.
Please listen to TechGuy. You can find these answers in many other places, so don't bother him. He is in no way required to answer your questions, because you don't pay him. If you want a tutor, get out your wallet and get ready to throw some cash away.
at net.minecraft.src.ModLoader.getUniqueSpriteIndex(ModLoader.java:681)
at net.minecraft.src.ModLoader.addOverride(ModLoader.java:365)
at net.minecraft.src.mod_SteelCraft.load(mod_SteelCraft.java:21)
at net.minecraft.src.ModLoader.init(ModLoader.java:861)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:154)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:86)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:394)
at net.minecraft.client.Minecraft.run(Minecraft.java:732)
at java.lang.Thread.run(Unknown Source)