PhasedTG i hv suggestion for ur thread
seens u r helping ppl with error
after u helped the ppl,u can link the error report and the solution to ur thread
this will help to reduce ppl asking the same error again
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_block.java:4: error: class mod_Block is publ
ic, should be declared in a file named mod_Block.java
public class mod_Block extends BaseMod
^
src\minecraft\net\minecraft\src\mod_block.java:13: error: cannot find symbol
ModLoader.AddRecipe(new ItemStack(mod_Block.BlockRuby, 1), new Object[] {
^
symbol: variable BlockRuby
location: class mod_Block
2 errors
1 warning
==================
> Done in 8.88 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
Hmm...i think that u r confuse with ore and block
i saw ur code,ur BlockRuby should be rename as BlockRubyOre
and make a new BlockRubyBlock
do changes in ur mod_Block too
public static final Block RubyOre = new BlockRuby(97,0).setHardness(5F).setResistance(5F).setLightValue(1F).setBlockName("RubyOre");
the = new BlockRuby must chg to =new BlockRubyOre after you rename ur java file
Where might I put this? I'm trying to make a gun that has no actual 'bullet', it just hurts the entity when I right click, and removes one "Bullet" object.
EDIT: Here's my Rifle code.
package net.minecraft.src;
public class ItemRifle extends Item
{
public ItemRifle(int i)
{
super(i);
maxStackSize = 1;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
return itemstack;
}
}
Where might I put this? I'm trying to make a gun that has no actual 'bullet', it just hurts the entity when I right click, and removes one "Bullet" object.
EDIT: Here's my Rifle code.
package net.minecraft.src;
public class ItemRifle extends Item
{
public ItemRifle(int i)
{
super(i);
maxStackSize = 1;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
return itemstack;
}
}
I got a recipe error in my code!! darn this is annoying
code:
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class mod_testblock extends BaseMod
{
public static final Block blck;
public String Version() {
return " - made with har_j1's Mod Maker";
}
static {
blck = (new Blockblck(117)).setBlockName("test");
}
public mod_testblock() {
ModLoader.RegisterBlock(mod_testblock.blck);
ModLoader.AddName(mod_testblock.blck, "Rainbow Block");
mod_testblock.blck.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mymod/blocktest.png");
mod_testblock.blck.setStepSound(Block.soundWoodFootstep);
ModLoader.AddRecipe(new ItemStack(mod_testblock.blck, 1), new Object[] {
"DDD", "D D", "DDD", Character.valueOf('D'), Item.Ironstck
});
}
public void GenerateSurface(World world, Random random, int i, int j) {
}
public void GenerateNether(World world, Random random, int i, int j) {
}
}
Error:
== MCP v4.4 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.7.0\bin\javac.exe" -g -source 1.6 -target 1.6 -class
path "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;j
ars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft
\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecra
ft\net\minecraft\src\*.java conf/patches/*.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\mod_testblock.java:24: error: cannot find symbol
"DDD", "D D", "DDD", Character.valueOf('D'), Item.Itemstck
^
symbol: variable Itemstck
location: class Item
1 error
1 warning
==================
> Done in 4.62 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
Thanks anyone who can figure this out!
Items: blockblck, mod_testblock, mod_IronStick, Itemstck
If u need any more info please tell me!
Any one know how to fix this ore error? (my ore)
I made a block that works and i wanted it to use that block for it
code:
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class mod_GreenOre extends BaseMod
{
public String Version() {
return " - made with har_j1's Mod Maker";
}
static {
}
public mod_GreenOre() {
}
public void GenerateSurface(World world, Random random, int i, int j) {
for (int a = 0; a < 98; a++) {
int posX = i + random.nextInt(16), posY = 128 - random.nextInt(128), posZ = j + random.nextInt(16);
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ, posZ); }for (int a = 0; a < 98; a++) {
int posX = i + random.nextInt(16), posY = 128 - random.nextInt(128), posZ = j + random.nextInt(16);
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ, posZ); }for (int a = 0; a < 98; a++) {
int posX = i + random.nextInt(16), posY = 128 - random.nextInt(128), posZ = j + random.nextInt(16);
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ, posZ); }}
public void GenerateNether(World world, Random random, int i, int j) {
}
}
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_GreenOre.java:19: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ
, posZ); }for (int a = 0; a < 98; a++) {
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:21: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ
, posZ); }for (int a = 0; a < 98; a++) {
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:23: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ
, posZ); }}
^
3 errors
1 warning
==================
> Done in 4.59 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class mod_testblock extends BaseMod
{
public static final Block blck;
public String Version() {
return " - made with har_j1's Mod Maker";
}
static {
blck = (new Blockblck(117)).setBlockName("test");
}
public mod_testblock() {
ModLoader.RegisterBlock(mod_testblock.blck);
ModLoader.AddName(mod_testblock.blck, "Rainbow Block");
mod_testblock.blck.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mymod/blocktest.png");
mod_testblock.blck.setStepSound(Block.soundWoodFootstep);
ModLoader.AddRecipe(new ItemStack(mod_testblock.blck, 1), new Object[] {
"DDD", "D D", "DDD", Character.valueOf('D'), Item.Ironstick
});
}
public void GenerateSurface(World world, Random random, int i, int j) {
}
public void GenerateNether(World world, Random random, int i, int j) {
}
}
its soo weird it says like that the ironstick doesnt exist?? oh well, maybe u can help with my ore problem:
code:
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class mod_GreenOre extends BaseMod
{
public String Version() {
return " - made with har_j1's Mod Maker";
}
static {
}
public mod_GreenOre() {
}
public void GenerateSurface(World world, Random random, int i, int j) {
for (int a = 0; a < 98; a++) {
int posX = i + random.nextInt(16), posY = 128 - random.nextInt(128), posZ = j + random.nextInt(16);
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ, posZ); }for (int a = 0; a < 98; a++) {
int posX = i + random.nextInt(16), posY = 128 - random.nextInt(128), posZ = j + random.nextInt(16);
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ, posZ); }for (int a = 0; a < 98; a++) {
int posX = i + random.nextInt(16), posY = 128 - random.nextInt(128), posZ = j + random.nextInt(16);
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ, posZ); }}
public void GenerateNether(World world, Random random, int i, int j) {
}
}
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_GreenOre.java:19: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ
, posZ); }for (int a = 0; a < 98; a++) {
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:21: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ
, posZ); }for (int a = 0; a < 98; a++) {
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:23: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ
, posZ); }}
^
3 errors
1 warning
==================
> Done in 4.62 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
Any one know how to fix this ore error? (my ore)
I made a block that works and i wanted it to use that block for it
code:
Dunno why you're making it static, or half the crap in there.
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class mod_GreenOre extends BaseMod
{
public mod_GreenOre()
{
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i = 0; i < 98; i++)
{
int randPosX = i + rand.nextInt(16);
int randPosY = rand.nextInt(128);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public void GenerateNether(World world, Random random, int i, int j)
{
}
public String Version()
{
return "1";
}
}
You'll have to edit that a bit to use your block though.
I got crashes after Mojang sign
Mind seeing this
http://www.minecraftforum.net/topic/694909-urgentmy-mod-crashes-minecraft/
already replyed.
seens u r helping ppl with error
after u helped the ppl,u can link the error report and the solution to ur thread
this will help to reduce ppl asking the same error again
Hmm...i think that u r confuse with ore and block
i saw ur code,ur BlockRuby should be rename as BlockRubyOre
and make a new BlockRubyBlock
do changes in ur mod_Block too
the = new BlockRuby must chg to =new BlockRubyOre after you rename ur java file
going to bed right now (3:29 in the morning U.S Pacific time) Please reply!!
You forgot the:
rock being any material
so it would be:
mod_Explosive:
[code]package net.minecraft.src; import java.util.Random; public class mod_Explosive extends BaseMod { public static final Block atombombe = new BlockAtombombe(2342, 0).setHardness(1F).setLightValue(1.0F).setResistance(0F).setBlockName("atombombe"); public mod_Explosive() { ModLoader.RegisterEntityID(EntityAtombombe.class, "Atombombe", ModLoader.getUniqueEntityId()); ModLoader.RegisterBlock(atombombe); atombombe.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/ModExplosive/atombombe.png"); ModLoader.AddRecipe(new ItemStack(atombombe, 1), new Object[] { "XXX", "XYX", "XXX", Character.valueOf('X'), Item.ingotIron, Character.valueOf('Y'), Block.dirt, }); } public String Version() { return "0.1 for Minecraft 1.8.1"; } }[/code]
BlockAtombombe:
[code] package net.minecraft.src; import java.util.Random; public class BlockAtombombe extends Block { protected BlockAtombombe(int i, int j) { super(i, j, Material.tnt); setStepSound(soundClothFootstep); } public void randomDisplayTick(World world, int i, int j, int k, Random random) { for(int l = 0; l < 4; l++) { double d = (float)i + random.nextFloat(); double d1 = (float)j + random.nextFloat(); double d2 = (float)k + random.nextFloat(); double d3 = 0.0D; double d4 = 0.0D; double d5 = 0.0D; int i1 = random.nextInt(2) * 2 - 1; d3 = ((double)random.nextFloat() - 0.9D) * 0.9D; d4 = ((double)random.nextFloat() - 0.9D) * 0.9D; d5 = ((double)random.nextFloat() - 0.9D) * 0.9D; if(world.getBlockId(i - 1, j, k) == blockID || world.getBlockId(i + 1, j, k) == blockID) { d2 = (double)k + 0.7D + 0.25D * (double)i1; d5 = random.nextFloat() * 5.0F * (float)i1; } else { d = (double)i + 0.5D + 0.25D * (double)i1; d3 = random.nextFloat() * 2.0F * (float)i1; } world.spawnParticle("smoke", d, d1, d2, d3, d4, d5); world.spawnParticle("lava", d, d1, d2, d3, d4, d5); world.spawnParticle("splash", d, d1, d2, d3, d4, d5); } } public void onNeighborBlockChange(World world, int i, int j, int k, int l) { if(world.isBlockIndirectlyGettingPowered(i, j, k)) { EntityAtombombe entityatombombe = new mod_Explosive.EntityAtombombe(world, (float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F); world.entityJoinedWorld(entityatombombe); world.playSoundAtEntity(entityatombombe, "random.fuse", 1.0F, 1.0F); } else { } } public int idDropped(int i, Random random) { return mod_Explosive.atombombe.blockID; } public int quantityDropped(Random random) { return 1; } }[/code]
EntityAtombombe:
[/code]
package net.minecraft.src;
public class EntityAtombombe extends Entity
{
protected EntityAtombombe(World world)
{
super(world);
setSize(0.5F, 0.5F);
yOffset = height / 2.8F;
exploded = false;
fuse = 0;
}
public EntityAtombombe(World world, double x, double y, double z, float yaw, float pitch, double force, int fuseLength)
{
this(world);
fuse = fuseLength;
}
public EntityAtombombe(World world, Entity entity)
{
this(world, entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch, 0.5, 50);
prevPosX = posX;
prevPosY = posY;
prevPosZ = posZ;
fuse = 90;
}
protected boolean canTriggerWalking()
{
return false;
}
public void onUpdate()
{
{
explode();
}
}
public void explode()
{
if(!exploded)
{
exploded = true;
worldObj.createExplosion(null, posX, posY, posZ, 50F);
worldObj.createExplosion(null, posX + 8, posY, posZ, 30F);
worldObj.createExplosion(null, posX, posY + 8, posZ, 30F);
worldObj.createExplosion(null, posX, posY, posZ + 8, 30F);
worldObj.createExplosion(null, posX + 20, posY, posZ, 30F);
worldObj.createExplosion(null, posX, posY + 20, posZ, 30F);
worldObj.createExplosion(null, posX, posY, posZ + 20, 30F);
worldObj.createExplosion(null, posX + 30, posY, posZ, 30F);
worldObj.createExplosion(null, posX, posY + 30, posZ, 30F);
worldObj.createExplosion(null, posX, posY, posZ + 30, 30F);
worldObj.createExplosion(null, posX + 40, posY, posZ, 30F);
worldObj.createExplosion(null, posX, posY + 40, posZ, 30F);
worldObj.createExplosion(null, posX, posY, posZ + 40, 30F);
worldObj.createExplosion(null, posX + 50, posY, posZ, 40F);
worldObj.createExplosion(null, posX, posY + 50, posZ, 40F);
worldObj.createExplosion(null, posX, posY, posZ + 50, 40F);
}
}
public void onCollideWithPlayer(EntityPlayer entityplayer)
{
}
double bounceFactorY;
double bounceFactorZX;
int fuse;
boolean exploded;
}
[/code]
Atombombe is german and means nuke
Error Code:
[code]2011-10-08 20:49 - commands.recompile - ERROR - "C:\Program Files\Java\jdk1.6.0_26\bin\javac.exe" -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java failed. 2011-10-08 20:49 - commands.recompile - ERROR - Return code : 1 2011-10-08 20:49 - commands.recompile - ERROR - 2011-10-08 20:49 - commands.recompile - ERROR - == ERRORS FOUND == 2011-10-08 20:49 - commands.recompile - ERROR - 2011-10-08 20:49 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\BlockAtombombe.java:46: cannot find symbol 2011-10-08 20:49 - commands.recompile - ERROR - symbol : constructor EntityAtombombe() 2011-10-08 20:49 - commands.recompile - ERROR - location: class net.minecraft.src.EntityAtombombe 2011-10-08 20:49 - commands.recompile - ERROR - world.entityJoinedWorld(new EntityAtombombe()); 2011-10-08 20:49 - commands.recompile - ERROR - ^ 2011-10-08 20:49 - commands.recompile - ERROR - 2011-10-08 20:49 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\EntityAtombombe.java:69: cannot find symbol 2011-10-08 20:49 - commands.recompile - ERROR - symbol : method attackEntityFrom(net.minecraft.src.Entity,int) 2011-10-08 20:49 - commands.recompile - ERROR - location: class net.minecraft.src.EntityItem 2011-10-08 20:49 - commands.recompile - ERROR - super.attackEntityFrom(entity, i); 2011-10-08 20:49 - commands.recompile - ERROR - ^ 2011-10-08 20:49 - commands.recompile - ERROR - 2011-10-08 20:49 - commands.recompile - ERROR - 2 errors 2011-10-08 20:49 - commands.recompile - ERROR - ================== 2011-10-08 20:49 - commands.recompile - ERROR - 2011-10-08 20:49 - commands.checksources - WARNING - !! Can not find server sources !![/code]
>Instant happys were created
This looks to be the code for if the Endermen should attack:
Maybe this?
Where might I put this? I'm trying to make a gun that has no actual 'bullet', it just hurts the entity when I right click, and removes one "Bullet" object.
EDIT: Here's my Rifle code.
>Instant happys were created
Uhh, hmmm....
code:
Error:
Items: blockblck, mod_testblock, mod_IronStick, Itemstck
If u need any more info please tell me!
Would it be possible for you to explain this for me some? I don't understand what parts do what.
>Instant happys were created
I made a block that works and i wanted it to use that block for it
code:
Error!!!!!!:
== MCP v4.4 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.7.0\bin\javac.exe" -g -source 1.6 -target 1.6 -class
path "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;j
ars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft
\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecra
ft\net\minecraft\src\*.java conf/patches/*.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\mod_GreenOre.java:19: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ
, posZ); }for (int a = 0; a < 98; a++) {
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:21: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ
, posZ); }for (int a = 0; a < 98; a++) {
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:23: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ
, posZ); }}
^
3 errors
1 warning
==================
> Done in 4.59 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
This code should work :smile.gif:
And my Problem?
code:
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class mod_GreenOre extends BaseMod
{
public String Version() {
return " - made with har_j1's Mod Maker";
}
static {
}
public mod_GreenOre() {
}
public void GenerateSurface(World world, Random random, int i, int j) {
for (int a = 0; a < 98; a++) {
int posX = i + random.nextInt(16), posY = 128 - random.nextInt(128), posZ = j + random.nextInt(16);
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ, posZ); }for (int a = 0; a < 98; a++) {
int posX = i + random.nextInt(16), posY = 128 - random.nextInt(128), posZ = j + random.nextInt(16);
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ, posZ); }for (int a = 0; a < 98; a++) {
int posX = i + random.nextInt(16), posY = 128 - random.nextInt(128), posZ = j + random.nextInt(16);
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ, posZ); }}
public void GenerateNether(World world, Random random, int i, int j) {
}
}
Error:
== MCP v4.4 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.7.0\bin\javac.exe" -g -source 1.6 -target 1.6 -class
path "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;j
ars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft
\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecra
ft\net\minecraft\src\*.java conf/patches/*.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\mod_GreenOre.java:19: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ
, posZ); }for (int a = 0; a < 98; a++) {
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:21: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ
, posZ); }for (int a = 0; a < 98; a++) {
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:23: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, random, posX, posZ
, posZ); }}
^
3 errors
1 warning
==================
> Done in 4.62 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
Dunno why you're making it static, or half the crap in there.
You'll have to edit that a bit to use your block though.