• 0

    posted a message on I Got some troubles...
    Fixed the sytax problem requiring a ';' Can't get the rest tho.
    Posted in: Modification Development
  • 0

    posted a message on I Got some troubles...
    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 ----------
    Posted in: Modification Development
  • 0

    posted a message on Error when I start the client
    I have absolutely no eye-deer.
    Posted in: Modification Development
  • 0

    posted a message on making a single block file for a couple blocks
    I think so...
    Posted in: Modification Development
  • 0

    posted a message on Started fresh code. Looking for dimension ideas
    Bump. GAH!
    Posted in: Modification Development
  • 0

    posted a message on Error when I start the client
    Change:
    public static final Item enderarrow    = new Itemenderbow(278).setItemName("enderarrow");

    To:
    public static final Item enderarrow    = new Itemenderarrow(278).setItemName("enderarrow");
    Posted in: Modification Development
  • 0

    posted a message on Need help sorting out why my blocks won't register... And why my item won't verify as a sword...
    Now it's saying my custom item is wrong:
    {
            return mod_CreatureStones.itemCreeperStone;
        }
    }
    After that part I mean.
    Posted in: Modification Development
  • 0

    posted a message on Need help sorting out why my blocks won't register... And why my item won't verify as a sword...
    Newest code:
    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);
        }
        {
        return 1;
        }
        public int idDropped(int i, Random random, int j)
        {
            return mod_CreatureStones.itemCreeperStone;
        }
    }


    It didn't work... Did I insert it wrong?
    Posted in: Modification Development
  • 0

    posted a message on Need help sorting out why my blocks won't register... And why my item won't verify as a sword...
    New Code:

    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 0;
        }
    }



    Now how would I go about making this dop an entity and an item...
    Posted in: Modification Development
  • 0

    posted a message on Need help sorting out why my blocks won't register... And why my item won't verify as a sword...
    Here's my code... Also trying to get it to drop multiple int types :tongue.gif:

    Code:
    [spoiler]
    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");
    [/spoiler]

    The above is my block properties decloration.
    The below is my block registration.

    [spoiler]
    ModLoader.RegisterBlock(CreeperOre);
            ModLoader.RegisterBlock(SpiderOre);
            ModLoader.RegisterBlock(ZombieOre);[/spoiler]



    And further, here is my name decloration snipet:
    [spoiler]
    ModLoader.AddName(blockCreeperOre, "Creeper Ore");
            ModLoader.AddName(blockSpiderOre, "Spider Ore");
            ModLoader.AddName(blockZombieOre, "Zombie Ore");
    [/spoiler]


    If it is required that you have my block<blockname> class, then so be it.


    I'll post my item sword problem if I haven't figured it out by the time this is answered. :wink.gif:
    Posted in: Modification Development
  • 0

    posted a message on Minecraft Modding Error Thread! Post ALL your errors and questions here!
    [spoiler]package net.minecraft.src;
    
    import java.util.Random;
    
    public class BlockCreeperOre extends Block
    {
    
        public BlockCreeperOre(int i, int j)
        {
            super(i, j, Material.ground);           
        }
        protected int getDropEntityId()
        {
            return Entity.spider.entityIndex;
        }
    
        public void dropFewItems(boolean flag, int i)
        {
            super.dropFewItems(flag, i);
            if(flag && (rand.nextInt(3) == 0 || rand.nextInt(1 + i) > 0))
            {
                dropItem(Item.spiderEye.shiftedIndex, 1);
            }
        }
    }
    [/spoiler]


    I added everything required for it to drop more than one item, but it won't. Different items I mean. I edited modloaders Block.JAVA file via eclipse to do so. But what I want to do is render it so that it drops an entity...
    Posted in: Modification Development
  • To post a comment, please .