I know i have bee trying to fix and i looked at my code and realised i named somthing wrng and chaged it and im still gettng rrors i fixed a few but the others i dont see a wa to fix heres te code
Error's
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
> Searching for javac.exe in C:\Program Files
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:3: error: class mod_Zimmit
eblock is public, should be declared in a file named mod_Zimmiteblock.java
public class mod_Zimmiteblock extends BaseMod
^
src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:5: error: cannot find symb
ol
public static final Block ZimmiteBlock = new BlockZimmiteblock(772, 0, Material.
stone).setBlockname(Zimmiteblock).setHardness(3F).setResistance(4F).setLightValu
e(1F);
^
symbol: variable Zimmiteblock
location: class mod_Zimmiteblock
src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:5: error: cannot find symb
ol
public static final Block ZimmiteBlock = new BlockZimmiteblock(772, 0, Material.
stone).setBlockname(Zimmiteblock).setHardness(3F).setResistance(4F).setLightValu
e(1F);
^
symbol: class BlockZimmiteblock
location: class mod_Zimmiteblock
src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:5: error: cannot find symb
ol
public static final Block ZimmiteBlock = new BlockZimmiteblock(772, 0, Material.
stone).setBlockname(Zimmiteblock).setHardness(3F).setResistance(4F).setLightValu
e(1F);
^
symbol: variable stone
location: class Material
src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:9: error: cannot find symb
ol
Zimmiteblock.blockIndexInTexture = ModLoader.addOverride("/terra
in.png", "/zimmiteblock.png");
^
symbol: variable Zimmiteblock
location: class mod_Zimmiteblock
src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:10: error: cannot find sym
bol
ModLoader.registerBlock(Zimmiteblock);
^
symbol: variable Zimmiteblock
location: class mod_Zimmiteblock
src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:11: error: cannot find sym
bol
ModLoader.addName(Zimmiteblock, "Zimmite Block");
^
symbol: variable Zimmiteblock
location: class mod_Zimmiteblock
src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:12: error: cannot find sym
bol
ModLoader.addRecipe(new ItemStack(mod_Zimmiteblock.Zimmiteblock.
blockID, 1), new Object []
^
symbol: variable Zimmiteblock
location: class mod_Zimmiteblock
8 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
and the mod_Zimmiteblock
package net.minecraft.src;
public class mod_Zimmiteblock extends BaseMod
{
public static final Block ZimmiteBlock = new BlockZimmiteblock(772, 0, Material.stone).setBlockname(Zimmiteblock).setHardness(3F).setResistance(4F).setLightValue(1F);
public void load()
{
Zimmiteblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/zimmiteblock.png");
ModLoader.registerBlock(Zimmiteblock);
ModLoader.addName(Zimmiteblock, "Zimmite Block");
ModLoader.addRecipe(new ItemStack(mod_Zimmiteblock.Zimmiteblock.blockID, 1), new Object []
{"###", "###", "###", Character.valueOf('#'), mod_ItemZimmiteingot.Zimmiteingot.shiftedIndex});
}
public String getVersion()
{
return "1.2.5";
}
}
Hey Zim, I will explain your errors one by one.
First error, the error report says your class is named mod_Zimmiteblock, even though it is in the file mod_ZimmiteBlock. You need to make sure both of these names are EXACTLY the same, case included.
Second and Third, your .setBlockname method should be .setBlockName. AND you need to put qutoes around the name, like this "Zimmiteblock".
Fourth, Minecraft can't find your BlockZimmiteblock class. Make sure it is named correctly. It probably should be named BlockZimmiteBlock to create less confusion.
Fifth, there is no material called stone. It is called rock.
The rest can all be solved by fixing these first few.
Most of your errors seem to be naming issues. The easiest way to avoid these is to properly name your files and variables.
Variables/Blocks/Items = zimmiteBlock
Class = BlockZimmiteBlock
Methods = setNameHere("")
Variables and Methods use "camelCase". Where the first word is lowercase and the rest are uppercase. Classes should use uppercase on the first letter of EVERY word. This is not something you HAVE to do, it just makes the process easier.
Made a model (model a chair), made the block with this model and wanted to do so could sit down. He took the code from the boat but a lot of mistakes, and if the chi without errors then the game crashes at startup. Help!
Rollback Post to RevisionRollBack
Make high-quality models in the Techne. And do the model in Blender.
As has been said, your block id is too high. Why are you creating the block twice anyway? If you want to use something you've created in another class you just reference to it.
(new WorldGenMinable(mod_GoldEssence.GoldEssence.blockID, 25)).generate(world, random, randPosX, randPosY, randPosZ);
But seeing as you should keep everything in one mod_ class you can just leave it as
(new WorldGenMinable(GoldEssence.blockID, 25)).generate(world, random, randPosX, randPosY, randPosZ);
after putting the generateSurface method in your first mod_ class(mod_GoldEssence). After you do that just delete mod_GoldEssenceGeneration.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Why does my Minecraft crash when I make a stair block?
Here is my code:
The mod_MoreBlocks
package net.minecraft.src;
public class mod_Blocks extends BaseMod
{
public static final Block DiamondStairs = new BlockDiamondStairs(125, 0).setBlockName("DiamondStairs").setHardness(5F).setResistance(10F).setStepSound(Block.soundMetalFootstep);
public void load()
{
DiamondStairs.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/moreblocks/diamondblock.png");
ModLoader.registerBlock(DiamondStairs);
ModLoader.addName(DiamondStairs, "Diamond Stairs");
ModLoader.addRecipe(new ItemStack(DiamondStairs, 1), new Object [] {"# ", "## ", "###", Character.valueOf('#'), Item.diamond});
}
public String getVersion()
{
return "More Blocks, by MinecraftTheGuys [1.2.5]";
}
}
The Block:
package net.minecraft.src;
import java.util.ArrayList;
public class BlockDiamondStairs extends Block
{
public BlockDiamondStairs(int i, int j)
{
super(i, j, Material.rock);
}
public void getCollidingBoundingBoxes(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, ArrayList arraylist)
{
int l = world.getBlockMetadata(i, j, k);
if (l == 0)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
} else if (l == 1)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
} else if (l == 2)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
} else if (l == 3)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
{
int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
if (l == 0)
{
world.setBlockMetadataWithNotify(i, j, k, 2);
} if (l == 1)
{
world.setBlockMetadataWithNotify(i, j, k, 1);
} if (l == 2)
{
world.setBlockMetadataWithNotify(i, j, k, 3);
} if (l == 3)
{
world.setBlockMetadataWithNotify(i, j, k, 0);
}
}
public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, int i, int j, int k)
{ setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
} public boolean isOpaqueCube()
{ return false;
} public boolean renderAsNormalBlock()
{ return false;
} public int getRenderType()
{
return 10;
}
}
Please help!
Post the crash report.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
You don't have 3 spots in the first row of the recipe. There is only one Character then a space but there needs to be two spaces.
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'm trying to make a block only breakable by the player that placed it or an admin. Can anyone please help me with the code that will make that true for the block? Thanks in advance.
Thanks so much! When I realese my mod I am going to add you to the thanks list! And I hope that you will help everyone with this when 1.3 comes out! Are you still going to work on it when 1.3 is out?
I'll update the tutorials, if that is what you mean?
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Made a model (model a chair), made the block with this model and wanted to do so could sit down. He took the code from the boat but a lot of mistakes, and if the chi without errors then the game crashes at startup. Help!
Help Me!
Rollback Post to RevisionRollBack
Make high-quality models in the Techne. And do the model in Blender.
Read the big red text on the OP. I don't have a tutorial on mountable blocks therefore I will not help with them here.
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 keep hving this weird error having to do with my crafting recipe can you help me?
Error
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
> Searching for javac.exe in C:\Program Files
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:9: error: cannot find symb
ol
Zimmiteblock.blockIndexInTexture = ModLoader.addOverride("/terra
in.png", "/zimmiteblock.png");
^
symbol: variable Zimmiteblock
location: class mod_ZimmiteBlock
src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:12: error: no suitable con
structor found for ItemStack(int,int)
ModLoader.addRecipe(new ItemStack(mod_ZimmiteBlock.ZimmiteBlock.
blockID, 1), new Object []
^
constructor ItemStack.ItemStack() is not applicable
(actual and formal argument lists differ in length)
constructor ItemStack.ItemStack(int,int,int) is not applicable
(actual and formal argument lists differ in length)
constructor ItemStack.ItemStack(Item,int,int) is not applicable
(actual and formal argument lists differ in length)
constructor ItemStack.ItemStack(Item,int) is not applicable
(actual argument int cannot be converted to Item by method invocation conv
ersion)
constructor ItemStack.ItemStack(Item) is not applicable
(actual and formal argument lists differ in length)
constructor ItemStack.ItemStack(Block,int,int) is not applicable
(actual and formal argument lists differ in length)
constructor ItemStack.ItemStack(Block,int) is not applicable
(actual argument int cannot be converted to Block by method invocation con
version)
constructor ItemStack.ItemStack(Block) is not applicable
(actual and formal argument lists differ in length)
2 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
mod_ZmmiteBlock
package net.minecraft.src;
public class mod_ZimmiteBlock extends BaseMod
{
public static final Block ZimmiteBlock = new BlockZimmiteBlock(772, 0).setBlockName("ZimmiteBlock").setHardness(3F).setResistance(4F).setLightValue(1F);
public void load()
{
Zimmiteblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/zimmiteblock.png");
ModLoader.registerBlock(ZimmiteBlock);
ModLoader.addName(ZimmiteBlock, "Zimmite Block");
ModLoader.addRecipe(new ItemStack(mod_ZimmiteBlock.ZimmiteBlock.blockID, 1), new Object []
{"###", "###", "###", Character.valueOf('#'), mod_ItemZimmiteingot.Zimmiteingot.shiftedIndex});
}
public String getVersion()
{
return "1.2.5";
}
}
BlockZimmiteBlock
package net.minecraft.src;
import java.util.Random;
public class BlockZimmiteBlock extends Block
{
public BlockZimmiteBlock(int i, int j)
{
super(i, j, Material.rock);
}
public int quantityDropped(Random random)
{
return 1;
}
public int idDropped(int i, Random random, int j)
{
return mod_ZimmiteBlock.ZimmiteBlock.blockID;
}
}
I keep hving this weird error having to do with my crafting recipe can you help me?
Error
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
> Searching for javac.exe in C:\Program Files
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:9: error: cannot find symb
ol
Zimmiteblock.blockIndexInTexture = ModLoader.addOverride("/terra
in.png", "/zimmiteblock.png");
^
symbol: variable Zimmiteblock
location: class mod_ZimmiteBlock
src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:12: error: no suitable con
structor found for ItemStack(int,int)
ModLoader.addRecipe(new ItemStack(mod_ZimmiteBlock.ZimmiteBlock.
blockID, 1), new Object []
^
constructor ItemStack.ItemStack() is not applicable
(actual and formal argument lists differ in length)
constructor ItemStack.ItemStack(int,int,int) is not applicable
(actual and formal argument lists differ in length)
constructor ItemStack.ItemStack(Item,int,int) is not applicable
(actual and formal argument lists differ in length)
constructor ItemStack.ItemStack(Item,int) is not applicable
(actual argument int cannot be converted to Item by method invocation conv
ersion)
constructor ItemStack.ItemStack(Item) is not applicable
(actual and formal argument lists differ in length)
constructor ItemStack.ItemStack(Block,int,int) is not applicable
(actual and formal argument lists differ in length)
constructor ItemStack.ItemStack(Block,int) is not applicable
(actual argument int cannot be converted to Block by method invocation con
version)
constructor ItemStack.ItemStack(Block) is not applicable
(actual and formal argument lists differ in length)
2 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
mod_ZmmiteBlock
package net.minecraft.src;
public class mod_ZimmiteBlock extends BaseMod
{
public static final Block ZimmiteBlock = new BlockZimmiteBlock(772, 0).setBlockName("ZimmiteBlock").setHardness(3F).setResistance(4F).setLightValue(1F);
public void load()
{
Zimmiteblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/zimmiteblock.png");
ModLoader.registerBlock(ZimmiteBlock);
ModLoader.addName(ZimmiteBlock, "Zimmite Block");
ModLoader.addRecipe(new ItemStack(mod_ZimmiteBlock.ZimmiteBlock.blockID, 1), new Object []
{"###", "###", "###", Character.valueOf('#'), mod_ItemZimmiteingot.Zimmiteingot.shiftedIndex});
}
public String getVersion()
{
return "1.2.5";
}
}
BlockZimmiteBlock
package net.minecraft.src;
import java.util.Random;
public class BlockZimmiteBlock extends Block
{
public BlockZimmiteBlock(int i, int j)
{
super(i, j, Material.rock);
}
public int quantityDropped(Random random)
{
return 1;
}
public int idDropped(int i, Random random, int j)
{
return mod_ZimmiteBlock.ZimmiteBlock.blockID;
}
}
To answer your errors Zim:
1) You called your block Zimmiteblock when you were overriding the texture but it's name is ZimmiteBlock.
Fixed code:
2) When creating a new ItemStack you only need to provide the Item/Block, not its ID. ALSO, you do not have to write mod_ZimmiteBlock.ZimmiteBlock inside its own class; you can just write ZimmiteBlock.
Fixed code:
"Only use one mod_ class for your whole mod."
Why?
You do not absolutely HAVE to, but it makes your mod a million times simpler and easier to use. If you make your mod with only one mod_class file you do not have to pre-fix your items and blocks with their own mod_class files. It is also always better to use the least amount of files possible if you want to publish your mod. And if your mod is published, we don't want ModLoader to be thinking it is 15 different mods being loaded when it is just yours.
package net.minecraft.src;
public class CustomItemSword extends Item
{
private int weaponDamage;
private final EnumCustomToolMaterial toolMaterial;
public CustomItemSword(int par1, EnumCustomToolMaterial par2EnumCustomToolMaterial)
{
super(par1);
toolMaterial = par2EnumCustomToolMaterial;
maxStackSize = 1;
setMaxDamage(par2EnumCustomToolMaterial.getMaxUses());
weaponDamage = 4 + par2EnumCustomToolMaterial.getDamageVsEntity();
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
return par2Block.blockID != Block.web.blockID ? 1.5F : 15F;
}
/**
* Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
* the damage on the stack.
*/
public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
{
par1ItemStack.damageItem(1, par3EntityLiving);
return true;
}
public boolean onBlockDestroyed(ItemStack par1ItemStack, int par2, int par3, int par4, int par5, EntityLiving par6EntityLiving)
{
par1ItemStack.damageItem(2, par6EntityLiving);
return true;
}
/**
* Returns the damage against a given entity.
*/
public int getDamageVsEntity(Entity par1Entity)
{
return weaponDamage;
}
/**
* Returns True is the item is renderer in full 3D when hold.
*/
public boolean isFull3D()
{
return true;
}
/**
* returns the action that specifies what animation to play when the items is being used
*/
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
return EnumAction.block;
}
/**
* How long it takes to use or consume an item
*/
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 0x11940;
}
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
return par1ItemStack;
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
return par1Block.blockID == Block.web.blockID;
}
/**
* Return the enchantability factor of the item, most of the time is based on material.
*/
public int getItemEnchantability()
{
return toolMaterial.getEnchantability();
}
}
This is part of my code, which is working perfectly for more than 70 swords .
I hope it will work for you too.
Alright thanks, but what do I have to fill in in the CustomItemSword.java? for the dirt and glass Custom ETM?
This looks quite interesting, but could you post the actual error you get when compiling. And please, use a spoiler.
As for a solution, the most likely reason for an error like that is you referring to a non-static variable. Your onUpdate method contains lots of references to the EntityPlayer. Some of those variables may not be static, so you should check them all out.
This looks quite interesting, but could you post the actual error you get when compiling. And please, use a spoiler.
As for a solution, the most likely reason for an error like that is you referring to a non-static variable. Your onUpdate method contains lots of references to the EntityPlayer. Some of those variables may not be static, so you should check them all out.
the error is the same for all the places i underlined: Cannot make a static reference to the non-static field
Rollback Post to RevisionRollBack
And, no I did not copy Dan200's name because I made my mc account long before I ever knew about modding, not to mention CC.
the error is the same for all the places i underlined: Cannot make a static reference to the non-static field
It may be just me, but I do not see any underlined parts of your code. I posted your code into Netbeans and I see what you mean. I am not an expert, but you probably should not have an onUpdate method inside an Item class. onUpdate should be mainly for blocks and entities, the same with the explode method. You should try putting those elsewhere in your code. I would try to make an extension of EntityPlayer called PlayerChecker or something and write boolean methods such as getCanExplode() or isHoldingNitro(), then reference to those in your ItemNitro class or mod_**** class.
Edit: A closer look reveals that the "inventory" "worldObj" "posX" "posY" and "posZ" are the variables not able to be accessed. Probably should try what I said above, but not using these in your ItemNitro class.
Soon to be made!
Hey Zim, I will explain your errors one by one.
First error, the error report says your class is named mod_Zimmiteblock, even though it is in the file mod_ZimmiteBlock. You need to make sure both of these names are EXACTLY the same, case included.
Second and Third, your .setBlockname method should be .setBlockName. AND you need to put qutoes around the name, like this "Zimmiteblock".
Fourth, Minecraft can't find your BlockZimmiteblock class. Make sure it is named correctly. It probably should be named BlockZimmiteBlock to create less confusion.
Fifth, there is no material called stone. It is called rock.
The rest can all be solved by fixing these first few.
Most of your errors seem to be naming issues. The easiest way to avoid these is to properly name your files and variables.
Variables/Blocks/Items = zimmiteBlock
Class = BlockZimmiteBlock
Methods = setNameHere("")
Variables and Methods use "camelCase". Where the first word is lowercase and the rest are uppercase. Classes should use uppercase on the first letter of EVERY word. This is not something you HAVE to do, it just makes the process easier.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumMake high-quality models in the Techne. And do the model in Blender.
As has been said, your block id is too high. Why are you creating the block twice anyway? If you want to use something you've created in another class you just reference to it.
But seeing as you should keep everything in one mod_ class you can just leave it as
after putting the generateSurface method in your first mod_ class(mod_GoldEssence). After you do that just delete mod_GoldEssenceGeneration.
together they are powerful beyond imagination."
together they are powerful beyond imagination."
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Retired StaffI'll update the tutorials, if that is what you mean?
together they are powerful beyond imagination."
Help Me!
Make high-quality models in the Techne. And do the model in Blender.
together they are powerful beyond imagination."
Error
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) == > Searching for javac.exe in C:\Program Files # found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa ram csvs, astyle, astyle config == Recompiling client == > Cleaning bin > Recompiling '"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -Xlint:-options -deprecation -g - source 1.6 -target 1....' failed : 1 == ERRORS FOUND == src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:9: error: cannot find symb ol Zimmiteblock.blockIndexInTexture = ModLoader.addOverride("/terra in.png", "/zimmiteblock.png"); ^ symbol: variable Zimmiteblock location: class mod_ZimmiteBlock src\minecraft\net\minecraft\src\mod_ZimmiteBlock.java:12: error: no suitable con structor found for ItemStack(int,int) ModLoader.addRecipe(new ItemStack(mod_ZimmiteBlock.ZimmiteBlock. blockID, 1), new Object [] ^ constructor ItemStack.ItemStack() is not applicable (actual and formal argument lists differ in length) constructor ItemStack.ItemStack(int,int,int) is not applicable (actual and formal argument lists differ in length) constructor ItemStack.ItemStack(Item,int,int) is not applicable (actual and formal argument lists differ in length) constructor ItemStack.ItemStack(Item,int) is not applicable (actual argument int cannot be converted to Item by method invocation conv ersion) constructor ItemStack.ItemStack(Item) is not applicable (actual and formal argument lists differ in length) constructor ItemStack.ItemStack(Block,int,int) is not applicable (actual and formal argument lists differ in length) constructor ItemStack.ItemStack(Block,int) is not applicable (actual argument int cannot be converted to Block by method invocation con version) constructor ItemStack.ItemStack(Block) is not applicable (actual and formal argument lists differ in length) 2 errors ================== !! Can not find server sources, try decompiling !! Press any key to continue . . .mod_ZmmiteBlock
package net.minecraft.src; public class mod_ZimmiteBlock extends BaseMod { public static final Block ZimmiteBlock = new BlockZimmiteBlock(772, 0).setBlockName("ZimmiteBlock").setHardness(3F).setResistance(4F).setLightValue(1F); public void load() { Zimmiteblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/zimmiteblock.png"); ModLoader.registerBlock(ZimmiteBlock); ModLoader.addName(ZimmiteBlock, "Zimmite Block"); ModLoader.addRecipe(new ItemStack(mod_ZimmiteBlock.ZimmiteBlock.blockID, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), mod_ItemZimmiteingot.Zimmiteingot.shiftedIndex}); } public String getVersion() { return "1.2.5"; } }BlockZimmiteBlock
package net.minecraft.src; import java.util.Random; public class BlockZimmiteBlock extends Block { public BlockZimmiteBlock(int i, int j) { super(i, j, Material.rock); } public int quantityDropped(Random random) { return 1; } public int idDropped(int i, Random random, int j) { return mod_ZimmiteBlock.ZimmiteBlock.blockID; } }-
View User Profile
-
View Posts
-
Send Message
Retired StaffTo answer your errors Zim:
1) You called your block Zimmiteblock when you were overriding the texture but it's name is ZimmiteBlock.
Fixed code:
ZimmiteBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/zimmiteblock.png");2) When creating a new ItemStack you only need to provide the Item/Block, not its ID. ALSO, you do not have to write mod_ZimmiteBlock.ZimmiteBlock inside its own class; you can just write ZimmiteBlock.
Fixed code:
ModLoader.addRecipe(new ItemStack(ZimmiteBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), mod_ItemZimmiteingot.Zimmiteingot.shiftedIndex}); }You do not absolutely HAVE to, but it makes your mod a million times simpler and easier to use. If you make your mod with only one mod_class file you do not have to pre-fix your items and blocks with their own mod_class files. It is also always better to use the least amount of files possible if you want to publish your mod. And if your mod is published, we don't want ModLoader to be thinking it is 15 different mods being loaded when it is just yours.
Alright thanks, but what do I have to fill in in the CustomItemSword.java? for the dirt and glass Custom ETM?
-
View User Profile
-
View Posts
-
Send Message
Retired Staffpackage net.minecraft.src;
import net.minecraft.client.Minecraft;
import net.minecraft.src.EntityPlayer;
public class NitroItem extends Item
{
boolean exploded;
public NitroItem(int i)
{
super(i);
exploded = false;
}
public void onUpdate(EntityPlayer player)
{
if(!player.isSneaking() && player.motionX > 1 && player.motionY > 1 && player.motionZ > 1 && EntityPlayer.inventory.hasItem(mod_nitro.jarNitro))
{
explode();
}
}
private void explode()
{
if(!exploded)
{
exploded = true;
EntityPlayer.worldObj.createExplosion(null,EntityPlayer.posX, EntityPlayer.posY, EntityPlayer.posZ,
16F);
}
}
}
This looks quite interesting, but could you post the actual error you get when compiling. And please, use a spoiler.
As for a solution, the most likely reason for an error like that is you referring to a non-static variable. Your onUpdate method contains lots of references to the EntityPlayer. Some of those variables may not be static, so you should check them all out.
the error is the same for all the places i underlined: Cannot make a static reference to the non-static field
It may be just me, but I do not see any underlined parts of your code. I posted your code into Netbeans and I see what you mean. I am not an expert, but you probably should not have an onUpdate method inside an Item class. onUpdate should be mainly for blocks and entities, the same with the explode method. You should try putting those elsewhere in your code. I would try to make an extension of EntityPlayer called PlayerChecker or something and write boolean methods such as getCanExplode() or isHoldingNitro(), then reference to those in your ItemNitro class or mod_**** class.
Edit: A closer look reveals that the "inventory" "worldObj" "posX" "posY" and "posZ" are the variables not able to be accessed. Probably should try what I said above, but not using these in your ItemNitro class.