package net.minecraft.src;
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
import java.awt.List;
import java.lang.reflect.Constructor;
import java.util.*;
import net.minecraft.client.Minecraft;
import net.minecraft.src.Gui;
import org.lwjgl.opengl.GL11;
import java.awt.Color;
public class mod_CreatureStones extends BaseMod
{
public mod_CreatureStones()
{
}
@Override
public void load()
{
//Registering Blocks:
ModLoader.RegisterBlock(CreeperOre);
ModLoader.RegisterBlock(SpiderOre);
ModLoader.RegisterBlock(ZombieOre);
//Adding Names:
ModLoader.AddName(blockCreeperOre, "Creeper Ore");
ModLoader.AddName(blockSpiderOre, "Spider Ore");
ModLoader.AddName(blockZombieOre, "Zombie Ore");
ModLoader.AddName(itemMobbedStone, "Tri Shard")
ModLoader.AddName(itemCreeperStone, "Creeper Shard");
ModLoader.AddName(itemSpiderStone, "Spider Shard");
ModLoader.AddName(itemZombieStone, "Zombie Shard");
ModLoader.AddName(itemSpiderSword, "Spider Sword");
ModLoader.AddName(itemZombieSword, "Zombie Sword");
ModLoader.AddName(itemCreeperSword, "Creeper Sword");
ModLoader.AddName(itemHead, "Big Head Small");
//Adding Spawns:
ModLoader.RegisterEntityID(EntityBigHead.class, "BigHead", ModLoader.getUniqueEntityId());
ModLoader.AddSpawn(EntityBigHead.class, 10, 1, 3, EnumCreatureType.monster);
//Texturing:
blockCreeperOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/endercross/CreeperOre.png");
blockSpiderOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/endercross/ZombieOre.png");
blockZombieOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/endercross/SpiderOre.png");
itemCreeperStone.iconIndex = ModLoader.addOverride("/gui/items.png", "/endercross/CreeperStone.png");
itemSpiderStone.iconIndex = ModLoader.addOverride("/gui/items.png", "/endercross/SpiderStone.png");
itemZombieStone.iconIndex = ModLoader.addOverride("/gui/items.png", "/endercross/ZombieStone.png");
itemMobbedStone.iconIndex = ModLoader.addOverride("/gui/items.png", "/endercross/MobbedStone.png");
itemCreeperSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/endercross/CreeperSword.png");
itemZombieSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/endercross/ZombieSword.png");
itemSpiderSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/endercross/SpiderSword.png");
itemHead.iconIndex = ModLoader.addOverride("/gui/items.png", "/endercross/Head.png");
//Crafting Recipes
ModLoader.AddShapelessRecipe(new ItemStack(mod_CreatureStones.itemMobbedStone, 4), new Object[]{
"XYZ", Character.valueOf('X'), mod_CreatureStones.itemCreeperStone, Character.valueOf('Y'), mod_CreatureStones.itemZombieStone, Character.valueOf('Z'), mod_CreatureStones.itemSpiderStone,
ModLoader.AddRecipe(new ItemStack(mod_CreatureStones.itemSpiderSword, 4), new Object[]{
" Y ", " Y ", "I", Character.valueOf('Y'), mod_CreatureStones.itemSpiderStone, Character.valueOf('I'), mod_CreatureStones.itemHead;
});
}
public void addRenderer(Map map)
{
map.put(EntityBigHead.class, new RenderBigHead(new ModelBigHead(), 0.5F));
}
@Override
public String getVersion()
{
return ("1.0.0");
}
//Item Properties:
public static final Item itemCreeperStone = (new Item(500)).setItemName("itemCreeperStone");
public static final Item itemSpiderStone = (new Item(501)).setItemName("itemZombieStone");
public static final Item itemZombieStone = (new Item(502)).setItemName("itemSpiderStone");
public static final Item itemMobbedStone = (new Item(503)).setItemName("itemMobbedStone");
public static final Item itemCreeperSword = (new Item(503)).setItemName("itemCreeperSword");
public static final Item itemSpiderSword = (new Item(503)).setItemName("itemSpiderSword");
public static final Item itemZombieSword = (new Item(503)).setItemName("itemZombieSword");
public static final Item itemHead = (new Item(503)).setItemName("itemHead");
//Block Properties:
public static final Block blockSpiderOre = (new Block(255, 0)).setBlockName("blockSpiderOre");
public static final Block blockCreeperOre = (new Block(254, 0)).setBlockName("blockCreeperOre");
public static final Block blockZombieOre = (new Block(253, 0)).setBlockName("blockZombieOre");
}
There's my code. And here's my error report:
Mods loaded: 1
ModLoader 1.0.0
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 141ccf11 --------
Generated 5/01/12 10:51 AM
Minecraft: Minecraft 1.0.0
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel(R) HD Graphics Family version 3.0.0 - Build 8.15.10.2342, Intel
java.lang.Error: Unresolved compilation problems:
CreeperOre cannot be resolved to a variable
SpiderOre cannot be resolved to a variable
ZombieOre cannot be resolved to a variable
Syntax error, insert ";" to complete Statement
Syntax error, insert "}" to complete ArrayInitializer
Syntax error, insert ")" to complete VariableInitializer
The constructor Block(int, int) is undefined
The constructor Block(int, int) is undefined
The constructor Block(int, int) is undefined
at net.minecraft.src.mod_CreatureStones.<init>(mod_CreatureStones.java:26)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:265)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1214)
at net.minecraft.src.ModLoader.init(ModLoader.java:733)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:162)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:42)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:314)
at net.minecraft.client.Minecraft.run(Minecraft.java:613)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT e1b7b2c ----------
package net.minecraft.src;
import java.util.Random;
public class BlockCreeperOre extends Block
{
public BlockCreeperOre(int i, int j)
{
super(i, j, Material.rock);
}
public void onBlockDestroyedByPlayer(World world, int i, int j, int k, int l)
{
if(!world.multiplayerWorld)
{
EntityCreeper entitycreeper = new EntityCreeper(world);
entitycreeper.setLocationAndAngles((double)i + 0.5D, j, (double)k + 0.5D, 0.0F, 0.0F);
world.entityJoinedWorld(entitycreeper);
entitycreeper.spawnExplosionParticle();
}
super.onBlockDestroyedByPlayer(world, i, j, k, l);
}
public int quantityDropped(Random random)
{
return 1;
}
public int idDropped(int i, Random random, int j)
{
return mod_CreatureStones.itemCreeperStone.shiftedIndex ;
}
}
That's my code so-far. And yes it's to spawn entities upon break, there's no errors in there though.Oh and it doesn't have any generation properties yet though. And duh, I''ve just figured out another problem, I haven't even got the pics there, LOL.
Rollback Post to RevisionRollBack
Did I help you? There's a little white plus down the bottom. I hope your confused!
public static final Block blockSpiderOre = (new Block(255, 0)).setBlockName("blockSpiderOre");
public static final Block blockCreeperOre = (new Block(254, 0)).setBlockName("blockCreeperOre");
public static final Block blockZombieOre = (new Block(253, 0)).setBlockName("blockZombieOre");
And what that is saying is this:
Block (int, int) is undefined.
I got this far and I now I feel like a fail :sad.gif:
Rollback Post to RevisionRollBack
Did I help you? There's a little white plus down the bottom. I hope your confused!
Ah, it had very little to do with what I was looking at then...You just fixed one of other mods' problems aswell by reffering me to realise what I had actually done wrong!
Rollback Post to RevisionRollBack
Did I help you? There's a little white plus down the bottom. I hope your confused!
There's my code. And here's my error report:
Did I help you? There's a little white plus down the bottom. I hope your confused!
Did I help you? There's a little white plus down the bottom. I hope your confused!
Follow @jamolnng
The best way to contact me is via twitter.
That's my code so-far. And yes it's to spawn entities upon break, there's no errors in there though.Oh and it doesn't have any generation properties yet though. And duh, I''ve just figured out another problem, I haven't even got the pics there, LOL.
Did I help you? There's a little white plus down the bottom. I hope your confused!
Follow @jamolnng
The best way to contact me is via twitter.
Did I help you? There's a little white plus down the bottom. I hope your confused!
And what that is saying is this:
Block (int, int) is undefined.
I got this far and I now I feel like a fail :sad.gif:
Did I help you? There's a little white plus down the bottom. I hope your confused!
Did I help you? There's a little white plus down the bottom. I hope your confused!
Did I help you? There's a little white plus down the bottom. I hope your confused!
1. How do I publish my MCP mod?
2. Where do I put the pics for my items, etc?
Did I help you? There's a little white plus down the bottom. I hope your confused!
Did I help you? There's a little white plus down the bottom. I hope your confused!
Did I help you? There's a little white plus down the bottom. I hope your confused!
super(i);
It keeps saying the (i); isn't a variable! Or that it needs to be declared.
Did I help you? There's a little white plus down the bottom. I hope your confused!
I did that + I fixed 90% of my WHOLE code with what Denikson said.
Did I help you? There's a little white plus down the bottom. I hope your confused!