• 0

    posted a message on Dimension Help
    Quote from nicaetinismo

    you seem to have misplaced a bracket of some kind, actually by the looks of it you didnt pt a starting comment /* thing (or closed one and forgot to delete that closing one)


    Thanks! fixed it. I only have this other error now, I had it when i decompiled but didn't think it would matter. I think I might not have installed SAPI correctly



    == MCP v4.4 ==
    > Recompiling client...
    javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.j
    ar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath s
    rc/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/mine
    craft\net\minecraft\isom\*.java src/minecraft\net\minecraft\src\*.java  conf/pat
    ches/*.java failed.
    Return code : 1
    
    == ERRORS FOUND ==
    
    warning: [options] bootstrap class path not set in conjunction with -source 1.6
    src\minecraft\net\minecraft\src\World.java:43: error: cannot access SAPI
    import net.minecraft.src.SAPI;
    ^
    
    bad source file: src\minecraft\net\minecraft\src\SAPI.java
    file does not contain class net.minecraft.src.SAPI
    Please remove or make sure it appears in the correct subdirectory of the sourcep
    ath.
    ==================
    
    > Done in 3.04 seconds
    > Recompiling server...
    !! Can not find server sources !!
    Press any key to continue . . .

    Posted in: Modification Development
  • 0

    posted a message on Dimension Help
    Hi, I have made a new dimension and everything is working fine except this when I recompile:

    == MCP v4.4 ==
    > Recompiling client...
    javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.j
    ar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath s
    rc/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/mine
    craft\net\minecraft\isom\*.java src/minecraft\net\minecraft\src\*.java  conf/pat
    ches/*.java failed.
    Return code : 1
    
    == ERRORS FOUND ==
    
    warning: [options] bootstrap class path not set in conjunction with -source 1.6
    src\minecraft\net\minecraft\src\ChunkProviderSecret.java:518: error: illegal start
     of expression
    }*/
    ^
    
    src\minecraft\net\minecraft\src\ChunkProviderSecret.java:518: error: illegal start
     of expression
    }*/
    ^
    
    2 errors
    1 warning
    ==================
    
    > Done in 5.00 seconds
    > Recompiling server...
    !! Can not find server sources !!
    Press any key to continue . . .



    This is the line:

    }*/


    Any help appreciated, Please ask if you need any more code from around that line
    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] Using Modded Item in recipe of another Modded Item
    Quote from samsamsam1234

    Can you post the full code?


    Thanks but I figured this out weeks ago
    Posted in: Modification Development
  • 0

    posted a message on Whats the code to make a mob hold an item
    Quote from bluecloak1997

    What is the code to make an NPC hold an Item? the item is "Dagger". This code has been tested and nothing is being held

    package net.minecraft.src;
    
    public class EntityAssassin extends EntityMob
    {
    
            public EntityAssassin(World world)
            {
                    super(world);
                    texture = "/pics/Ass.png";
                    setSize(2F,2F);
                    moveSpeed = 20F;
                  	health = 10;
            }
    
            protected int getDropItemId()
            {
                    return Item.swordStone.shiftedIndex;
            }
            
        public void writeEntityToNBT(NBTTagCompound nbttagcompound)
        {
            super.writeEntityToNBT(nbttagcompound);
        } 
    
        public void readEntityFromNBT(NBTTagCompound nbttagcompound)
        {
            super.readEntityFromNBT(nbttagcompound);
        } 
        
     	protected float getSoundVolume()
        {
            return 0.4F;
        }
        
        public ItemStack getHeldItem()
        {
            return defaultHeldItem;
        }
    
        private static final ItemStack defaultHeldItem;
    
        static 
        {
            defaultHeldItem = new ItemStack(Item.Dagger, 1);
        }
    }


    Have you added the dagger to the item class? or is it in another file?
    Posted in: Modification Development
  • 0

    posted a message on Mods failed to load can someone tell me what mod I have to remove?
    I believe that is a data value/block id conflict. two blocks are trying to use the same number, if one of the mods has a prop file then you can change the id in there. Removing the shelf mod should fix it
    Posted in: Mods Discussion
  • 0

    posted a message on Help with food item
    Quote from StormEagleZX

    I am trying to make a food item and I know I did it wrong, the tutorial was for food before 1.8 and I can't figure out how to do it for 1.8

    here is the code


    package net.minecraft.src;
    
    public class MaximTomato extends Item
    {
        private int healAmount;
        
        public MaximTomato (int i)
        {
            super (i);
            maxStackSize = 3;
            // how much it heals by, a value of 2 heals one full chicken leg (one hunger slot)
            healAmount = 20;
        }
        
        public int getHealAmount()
        {
            return healAmount;
        }
        
        public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
        {
            // code to make it take one off the stack
            itemstack.stackSize--;
            // code to make it heal
            entityplayer.heal(healAmount);
            return itemstack;
        }
        
    }


    If anybody knows what to do, or knows of a tutorial that does this, help me out.

    Thank you



    healAmount has to do with how many hearts the item heals, not the hunger bar. Presuming that you intend for your food to heal food points, use this code:

    package net.minecraft.src;
    
    public class mod_Food extends BaseMod
    {
            
            public static final Item Hamburger = new ItemFood(601, 6, false).setItemName("hamburger");
        
            
            public mod_Food()
            {
                    Hamburger.iconIndex = ModLoader.addOverride("/gui/items.png", "/hamburger.png");
                    ModLoader.AddName(Hamburger, "Hamburger");       		
                    ModLoader.AddRecipe(new ItemStack(Hamburger, 1), new Object[]
                    { "#", "*", "#", Character.valueOf('#'), Item.bread, Character.valueOf('*'), Item.field_35418_bk});
    
              }
            
            public String Version()
            {
                    return "Food Mod for 1.8.1";
            }
    }




    in the public static final line, 601 is the data value, 6 is how many half food points you want the food to heal and false is whether a wolf can eat it or not. You only need the 1 mod_Namehere file for a food mod in 1.8+, which is good if you want to add several foods.

    hope this helped :smile.gif:
    Posted in: Modification Development
  • 0

    posted a message on Bonemeal
    Quote from BasKlein

    No I mean
     ModLoader.AddRecipe(new ItemStack(Block.dirt, 3), new Object[]{
     "#", Character.valueOf('#'), Item.dyePowder, 15});



    I think it has to be in closed quotes and with ItemStack.
    For Example:
            ModLoader.AddRecipe(new ItemStack(Block.dirt, 3), new Object[] {
                "#", Character.valueOf('#'), new ItemStack(Item.dyePowder, 15)

    Posted in: Modification Development
  • 0

    posted a message on Generating Blocks in the air
    Im asking if anyone knows what code to use, coz Ive read that even if you hav a high layer for a block to generate, it will only generate in landforms, not the air
    Posted in: Modification Development
  • 0

    posted a message on Would this Work?
    Quote from BliinkfifteyVG

    So should i do it for all of them??


    yes
    Posted in: Modification Development
  • 0

    posted a message on Would this Work?
    Quote from BliinkfifteyVG

    Anyone????


    You'll need to change the name of one of the types of tools, for example:
                    HolyPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/HolyPickaxe.png");
                    HolyAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/HolyAxe.png");
                    HolySpade.iconIndex = ModLoader.addOverride("/gui/items.png", "/HolySpade.png");
                    HolyHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/HolyHoe.png");
                    HolySword.iconIndex = ModLoader.addOverride("/gui/items.png", "/HolySword.png");
                    Pickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/ObsidianPickaxe.png");
                    Axe.iconIndex = ModLoader.addOverride("/gui/items.png", "/ObsidianAxe.png");
                    Spade.iconIndex = ModLoader.addOverride("/gui/items.png", "/ObsidianSpade.png");
                    Hoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/ObsidianHoe.png
                    Sword.iconIndex = ModLoader.addOverride("/gui/items.png", "/ObsidianSword.png");
    Posted in: Modification Development
  • 0

    posted a message on Generating Blocks in the air
    Anyone know how to do this?
    Posted in: Modification Development
  • 0

    posted a message on Bonemeal
    Quote from BasKlein

    Bump


    I tested it before I posted it just to make sure. You still need the second line of the recipe of course:

    ModLoader.AddRecipe(new ItemStack(Item.dyePowder, 3, 15), new Object[]{
     "#", Character.valueOf('#'), Block.dirt});
    Posted in: Modification Development
  • 0

    posted a message on Bonemeal
    Quote from BasKlein

    Hello Minecraft Forum,

    Does anyone know what bonemeal is reffered to in the code?
    Thanks anyway!

    -BasKlein


    Bonemeal is referred to as:
    (Item.dyePowder, 3, 15)


    So it would fit in like this:
    ModLoader.AddRecipe(new ItemStack(Item.dyePowder, 3, 15), new Object[]{

    A recipe like this would yield 3 bonemeal, change the 3 to however many you want

    Hope this helped! :smile.gif:
    Posted in: Modification Development
  • 0

    posted a message on Generating Blocks in the air
    Is it possible to do this?

    This is the code Im using, its for a different block though
    	public void GenerateSurface(World world, Random random, int i, int j)
    	{
        	for(int k = 0; k < 8; k++)
        	{
            	int l = i + random.nextInt(16);
            	int i1 = random.nextInt(25);
            	int j1 = j + random.nextInt(16);
            	(new WorldGenMinable(ablock.blockID, 7)).generate(world, random, l, i1, j1);
        	}
    Posted in: Modification Development
  • 0

    posted a message on How do I compile and package a mod?
    Quote from _Molt_

    bat, not exe :wink.gif:


    oh yeh, im kinda tired
    Posted in: Modification Development
  • To post a comment, please .