Hi, i get an java.ArrayIndexOutOfBoundsException: 381 <---- Not used id. Help please?
strawberry = (new BlockStrawberry(357,1)).setHardness(1.5f).setResistance(15f).setStepSound(soundStoneFootstep).setBlockName("Strawberry");
package net.minecraft.src;
import java.util.Random;
public class BlockStrawberry extends Block {
public BlockStrawberry(int i, int j){
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
return 0;
}
}
addRecipe(new ItemStack(Block.strawberry, 1), new Object[]{"##", "##", Character.valueOf('#'),Block.wood});
All of my code please help me
ok for everyone out there minecraft can only go up to 127 for BLOCKID your using 357 unless you use shockah's id mod
hey the better glass mod looks awesome is there any chance i could see tha source for it as i have made a coulored glass mod and it is hard to make it look tinted also here is a good modloader tutorial for using mcp viewtopic.php?f=1036&t=212150&start=90#p3175803 i learned how to mo using this so i hope it helps
Yer im quite familar with that thread i help heaps of people on there also just add
public int getRenderBlockPass()
{
return 1;
}
0 means no translucency
1 means translucency
and 2 means invisible :biggrin.gif:
im not sure wat others do
hey just a random question for your wildgrass textures wat did you do for these
cause wen you destroy them they turn into the original flowers
which is stupid so did you just change there texture to the normal red and yellow flowers?
thx :biggrin.gif:
EDIT: just realised they all drop the original flowers hopefully he fixes that or does something
Anyways another problem
Does this happen to ur items ingame?:
do they go speckly or is it just my bad art
also i hope you dont mind me using your stick but its epic i couldnt resist. I did make a few changes but mostly just color fixing a few stray pixels.
Ive been trying to fix this icon problem but by following the advice given to me if i place it into the code with out if i speech mark it this error shows
*** Minecraft Coder Pack Version 2.9 ***
MCP 2.9 running in D:\HackersModifiers\Minecraft\Minecraft coders pack
Compiling Minecraft
sources\minecraft\net\minecraft\src\mod_Trophy.java:9: cannot find symbol
symbol : constructor BlockBronzeSTrophy(int,java.lang.String)
location: class net.minecraft.src.BlockBronzeSTrophy
public static final Block BronzeSTrophy = new BlockBronzeSTrophy(97,"BronzeSTrop
hy.blockIndexInTexture").setHardness(2.0F).setResistance(5.0F).setBlockName("Bro
nzeSTrophy");
^
1 error
*** minecraft_server.jar was not found, skipping
=== MCP 2.9 recompile script finished ===
Press any key to continue . . .
and if i dont this error shows
*** Minecraft Coder Pack Version 2.9 ***
MCP 2.9 running in D:\HackersModifiers\Minecraft\Minecraft coders pack
Compiling Minecraft
sources\minecraft\net\minecraft\src\mod_Trophy.java:9: illegal forward reference
public static final Block BronzeSTrophy = new BlockBronzeSTrophy(97,BronzeSTroph
y.blockIndexInTexture).setHardness(2.0F).setResistance(5.0F).setBlockName("Bronz
eSTrophy");
^
1 error
*** minecraft_server.jar was not found, skipping
=== MCP 2.9 recompile script finished ===
Press any key to continue . . .
i must be doing somthing wrong but i just cant see what it is but at least i know that the mod_Trophys is the section of code this problem is effected by
is it possible that this i a bug in the modloader or a failed section of code (i doubt its the code its dirrect from the minecraft files its self) but its most likly a lack of knowlege in making blocks i have noticed that if i delete the lines of code making it render like the flowers do i get my texture but it wont render how i want it to but the way it is now is how i want my block to act its just this icon thats messing up my progress i hope some one can inform me of how this icon can be fixed
Thanks to pwned i have a very basic idea as to what line needs changing but since the suggestion he made generated the errors i dont think ive done this right i hope some one can shine some sort of light on this i have posted both the block and the modloader files any help provided i will be greatful for
mod_Trophy
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public class mod_Trophy extends BaseMod
{
public static final Block BronzeSTrophy = new BlockBronzeSTrophy(97,BronzeSTrophy.blockIndexInTexture).setHardness(2.0F).setResistance(5.0F).setBlockName("BronzeSTrophy");
{
ModLoader.RegisterBlock(BronzeSTrophy);
BronzeSTrophy.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Bibbyboy/BronzeSTrophy.png");
ModLoader.AddName(BronzeSTrophy, "SnowBall Fighter Bronze");
}
public String Version()
{
return "1.3_01";
}
public void AddRecipes(CraftingManager craftingmanager)
{
craftingmanager.addRecipe(new ItemStack(BronzeSTrophy, 1), new Object[]{
" Y ", " Y ", "YYY", Character.valueOf('Y'), Item.stick
});
}
}
BlockBronzeSTrophy
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public class BlockBronzeSTrophy extends Block
{
protected BlockBronzeSTrophy(int i, int j)
{
super(i, Material.plants);
blockIndexInTexture = j;
setTickOnLoad(true);
float f = 0.2F;
setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 3F, 0.5F + f);
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
return null;
}
public boolean isOpaqueCube()
{
return false;
}
public boolean renderAsNormalBlock()
{
return false;
}
public int getRenderType()
{
return 1;
}
}
ok how youve done the code for the block is weird as in ive never done it that way and have never had that problem.
ok so do this create an int that equals ModLoader.addOverride("/terrain.png", "/Bibbyboy/BronzeSTrophy.png");
then here BlockBronzeSTrophy(97,BronzeSTrophy.blockIndexInTexture) use BlockBronzeSTrophy(97,wateva ur int is called) that should work. hopefully that makes sense.
i will post the codes im using so that some one can solve this for me ive tryed all i can to fix it but to no success
the closest i can get to what i want to happen with my block is whats in the screen shot the block placed the way it does but i want the icon to show correctly do i need some other override code for this?
please help me am am greatful for any help i recive
Mod loader code
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public class mod_Trophy extends BaseMod
{
public static final Block BronzeSTrophy = new BlockBronzeSTrophy(97, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("BronzeSTrophy");
public String Version()
{
return "1.3_01";
}
public mod_Trophy()
{
ModLoader.RegisterBlock(BronzeSTrophy);
BronzeSTrophy.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Bibbyboy/BronzeSTrophy.png");
ModLoader.AddName(BronzeSTrophy, "SnowBall Fighter Bronze");
}
public void AddRecipes(CraftingManager craftingmanager)
{
craftingmanager.addRecipe(new ItemStack(BronzeSTrophy, 1), new Object[]{
" Y ", " Y ", "YYY", Character.valueOf('Y'), Item.stick
});
}
}
Block code
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public class BlockBronzeSTrophy extends Block
{
protected BlockBronzeSTrophy(int i, int j)
{
super(i, j, Material.wood);
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
return null;
}
public boolean isOpaqueCube()
{
return false;
}
public boolean renderAsNormalBlock()
{
return false;
}
public int getRenderType()
{
return 1;
}
}
you will see your problem is this new BlockBronzeSTrophy(97, 0) the 0 means grass which means thats why its showing the grass in the inventory if you change it to something like BronzeSTrophy.blockIndexInTexture instead of zero then that will work
oops triple posted o well its my thread :tongue.gif:
WHAT IM DOING:
was just dong sandstone
and been refining the flowers for about 30mins
and now eating dinner while still doing finishing touches on yellow flower :tongue.gif:
ill post sandstone soon.
EDIT:
PICTURES OF SANDSTONE
wat do u think?
Ok time for some honest critique. I'll say a little something about everything =)
I didn't read the whole post cuz I'm a bit short on time, so forgive me if I said anything already said:
-1st I'm glad you're doing this, there really aren't enough options for 256 packs. And maybe, just maybe, if we get enough of them someday we'll see 512 packs =O haha, jk
-Sand looks a little flat. You're definitely going in the right direction with the "wind-blown" lines but it needs more of a grainy look.
-I really really like dirt
-Grass texture reminds me of Scuttles' pack. I like it =) Maybe make sidegrass a bit longer
-the are flowers are good, but I would work on cleaning up the edges. Against the brown they're pretty noticeable
-cobble stone, though it looks nice, is a bit too organized for me. Personally I'm a fan of cobble stone that looks jagged and rough, just for realism sake.
-is it me or is the jackolantern face is tilted to the left a bit?
-I like the rough cut of cake. What kind of cake is it supposed to be?
All in all, good work so far, you obviously know what your doing.
ok i see wat cha mean with the sand.
thx
grass was somewhere from the internet but has been edited heps so it tiles properly
yer i'll fix the flowers 2day hopefully
ill do an alternate texture.
ive always thought that too.
the cake is ummm idk. I made it completely from scratch using good old gimp and paint.net :tongue.gif:. Ill have to think of a name.
THX for your suggestions.
hey scuttles and everone else :tongue.gif:, i was wondering if you could critique my texture pack heres the link thanks :biggrin.gif: http://www.minecraftforum.net/viewtopic.php?f=1021&t=243806
Still very WIP but getting closer everyday :tongue.gif:. Anyways i would be very grateful if you's could suggest anything
Thanks man, never thought it would be the block id.
Now im stuck on the world generation.
*** Minecraft Coder Pack Version 2.9 ***
MCP 2.9 running in C:\Users\Mrs Hamill\Desktop\Minecraft\Naquadah Mod
Compiling Minecraft
sources\minecraft\net\minecraft\src\ChunkProviderGenerate.java:562: cannot find
symbol
symbol : constructor WorldGenNh(int)
location: class net.minecraft.src.WorldGenNh
(new WorldGenNh(Block.NhOre.blockID)).generate(worldObj, rand, k20, i22, i23);
^
1 error
*** minecraft_server.jar was not found, skipping
=== MCP 2.9 recompile script finished ===
Press any key to continue . . .
Again, i have tried looking for a resolution, but i can't find one.
This is the code for the world gen:
package net.minecraft.src;
import java.util.Random;
public class WorldGenNh extends WorldGenerator
{
public WorldGenNh()
{
}
public boolean generate(World world, Random random, int i, int j, int k)
{
// Gives this a 1 in 10 chance of generating
if (random.nextInt(10) == 0)
{
// Loops 64 times, this could create up to 64 TNT
for (int z = 0; z < 128; z++)
{
int i1 = i + random.nextInt(8) - random.nextInt(8);
int j1 = j + random.nextInt(8) - random.nextInt(8);
int k1 = k + random.nextInt(8) - random.nextInt(8);
// Checks that there is nothing in the current location and there is grass beneath.
if(world.getBlockId(i1, j1, k1) == 0 && world.getBlockId(i1, j1 - 1, k1) == Block.grass.blockID && Block.NhOre.canPlaceBlockAt(world, i1, j1, k1))
{
world.setBlockAndMetadata(i1, j1, k1, Block.NhOre.blockID, random.nextInt(4));
}
}
}
}
}
And for chunc provider generate:
for(int l17 = 0; l17 < 20; l17++)
{
int k20 = k + rand.nextInt(16) + 8;
int i22 = rand.nextInt(rand.nextInt(rand.nextInt(112) + 8) + 8);
int i23 = l + rand.nextInt(16) + 8;
(new WorldGenNh(Block.NhOre.blockID)).generate(worldObj, rand, k20, i22, i23);
}
I tried compiling without the for loop, but it came up with more errors than if i compiled it in this state.
Thanks for your help in advance.
ok try changing this (new WorldGenNh(Block.NhOre.blockID)) to (new WorldGenNh()) and if that doesnt work in your
WorldGenNh file change
public WorldGenNh()
{
}
to
public WorldGenNh(int i)
{
}
hope that helps either should work the first one most likely
ill keep working on it as long as people like it.
also any suggestions?
hopefully monday i can post the 256x256 download.
One problem that many of these hd packs have is the dark dirt imo. It just doesen't look to good at a long distance.
Other than that it looks pretty nice.
ok ill see wat i can do with the grass. Thx for that. Im gonna try to make the textures not so grainy ingame. The problem is due to Minecraft lack of texture filtering but ill see if i can get it to look smoother.
Thx for the feedback.
0
ok for everyone out there minecraft can only go up to 127 for BLOCKID your using 357 unless you use shockah's id mod
0
0
i found myself download this mod :tongue.gif:
thx for the link :biggrin.gif:
EDIT: realised this didnt make much sense :tongue.gif:
0
Yer im quite familar with that thread i help heaps of people on there also just add
public int getRenderBlockPass()
{
return 1;
}
0 means no translucency
1 means translucency
and 2 means invisible :biggrin.gif:
im not sure wat others do
0
cause wen you destroy them they turn into the original flowers
which is stupid so did you just change there texture to the normal red and yellow flowers?
thx :biggrin.gif:
EDIT: just realised they all drop the original flowers hopefully he fixes that or does something
Anyways another problem
Does this happen to ur items ingame?:
do they go speckly or is it just my bad art
also i hope you dont mind me using your stick but its epic i couldnt resist. I did make a few changes but mostly just color fixing a few stray pixels.
0
ok how youve done the code for the block is weird as in ive never done it that way and have never had that problem.
ok so do this create an int that equals ModLoader.addOverride("/terrain.png", "/Bibbyboy/BronzeSTrophy.png");
then here BlockBronzeSTrophy(97,BronzeSTrophy.blockIndexInTexture) use BlockBronzeSTrophy(97,wateva ur int is called) that should work. hopefully that makes sense.
0
you will see your problem is this new BlockBronzeSTrophy(97, 0) the 0 means grass which means thats why its showing the grass in the inventory if you change it to something like BronzeSTrophy.blockIndexInTexture instead of zero then that will work
0
WHAT IM DOING:
was just dong sandstone
and been refining the flowers for about 30mins
and now eating dinner while still doing finishing touches on yellow flower :tongue.gif:
ill post sandstone soon.
EDIT:
PICTURES OF SANDSTONE
wat do u think?
EDIT EDIT:
Just redid obsidian
0
thx will do :tongue.gif:
0
ok i see wat cha mean with the sand.
thx
grass was somewhere from the internet but has been edited heps so it tiles properly
yer i'll fix the flowers 2day hopefully
ill do an alternate texture.
ive always thought that too.
the cake is ummm idk. I made it completely from scratch using good old gimp and paint.net :tongue.gif:. Ill have to think of a name.
THX for your suggestions.
0
http://www.minecraftforum.net/viewtopic.php?f=1021&t=243806
Still very WIP but getting closer everyday :tongue.gif:. Anyways i would be very grateful if you's could suggest anything
0
lol thx heres my progress on the cake:
hows it look?
0
[*:2cevbo1a]New HD cake texture
[*:2cevbo1a]Netherrack tiles better
[*:2cevbo1a]Re-Did Obsidian
0
ok try changing this (new WorldGenNh(Block.NhOre.blockID)) to (new WorldGenNh()) and if that doesnt work in your
WorldGenNh file change
public WorldGenNh()
{
}
to
public WorldGenNh(int i)
{
}
hope that helps either should work the first one most likely
0
ok ill see wat i can do with the grass. Thx for that. Im gonna try to make the textures not so grainy ingame. The problem is due to Minecraft lack of texture filtering but ill see if i can get it to look smoother.
Thx for the feedback.