Ok so what I'm trying to do is have glass drop Glass Shards, then you can dye the shards and smelt them again to make Satined Glass. I've gotten the Glass to drop the Shards and I can smelt that back into glass. I can also Dye them and get different color Shards. The problem I'm having is that after you dye the shards they don't stay separate. Basically if I have a stack of Red Dyed Shards and I put them on a stack of Yellow Dyed Shards they will just combine to a Stack of Dyed Shards. Is there a way to make them stack separately, also is there a way to smelt a certain color and get a certain color stained glass back? Also I'm using ModLoader, don't know if that matters.
Heres the mod_ class
package net.minecraft.src;
public class mod_GlassShards extends BaseMod
{
public static final Block glassshards =new BlockGlassShards(97,0)
.setHardness(1.0F).setResistance(2.0F).setBlockName("glassshards");
public static final Block dyedshards =new BlockDyedShards(98,0)
.setHardness(1.0F).setResistance(2.0F).setBlockName("dyedshards");
public mod_GlassShards()
{
for(int i = 0; i < 15; i++)
{
ModLoader.RegisterBlock(glassshards);
glassshards.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/glassshards.png");
ModLoader.RegisterBlock(dyedshards);
dyedshards.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/glassshards.png");
ModLoader.AddName(glassshards, "Glass Shards");
ModLoader.AddName(dyedshards, "Dyed Glass Shards");
ModLoader.AddSmelting(mod_GlassShards.glassshards.blockID, new ItemStack(Block.glass, 1));
ModLoader.AddShapelessRecipe(new ItemStack(mod_GlassShards.dyedshards, 1, i + 1), new Object[] {
new ItemStack(Item.dyePowder, 1, i), new ItemStack(mod_GlassShards.glassshards, 1, 0)
});
}
}
public String Version()
{
return "1.4_01";
}
public static int texglass1 = ModLoader.addOverride("/terrain.png", "/glass1.png");
public static int texglass2 = ModLoader.addOverride("/terrain.png", "/glass2.png");
public static int texglass3 = ModLoader.addOverride("/terrain.png", "/glass3.png");
public static int texglass4 = ModLoader.addOverride("/terrain.png", "/glass4.png");
public static int texglass5 = ModLoader.addOverride("/terrain.png", "/glass5.png");
public static int texglass6 = ModLoader.addOverride("/terrain.png", "/glass6.png");
public static int texglass7 = ModLoader.addOverride("/terrain.png", "/glass7.png");
public static int texglass8 = ModLoader.addOverride("/terrain.png", "/glass8.png");
public static int texglass9 = ModLoader.addOverride("/terrain.png", "/glass9.png");
public static int texglass10 = ModLoader.addOverride("/terrain.png", "/glass10.png");
public static int texglass11 = ModLoader.addOverride("/terrain.png", "/glass11.png");
public static int texglass12 = ModLoader.addOverride("/terrain.png", "/glass12.png");
public static int texglass13 = ModLoader.addOverride("/terrain.png", "/glass13.png");
public static int texglass14 = ModLoader.addOverride("/terrain.png", "/glass14.png");
public static int texglass15 = ModLoader.addOverride("/terrain.png", "/glass15.png");
static
{
Item.itemsList[mod_GlassShards.glassshards.blockID] = (new ItemGlassShards(mod_GlassShards.dyedshards.blockID - 256)).setItemName("dyedshards");
for(int i = 0; i < 256; i++)
{
if(Block.blocksList[i] != null && Item.itemsList[i] == null)
{
Item.itemsList[i] = new ItemBlock(i - 256);
}
}
}
}
BlockGlassShards -
package net.minecraft.src;
public class BlockGlassShards extends Block
{
public BlockGlassShards(int i, int j)
{
super(i, j, Material.glass);
}
public int AddSmelting(int id)
{
if(id == mod_GlassShards.glassshards.blockID)
{
return Block.glass.blockID;
}
return 0;
}
}
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 ItemGlassShards extends ItemBlock
{
public ItemGlassShards(int i)
{
super(i);
setMaxDamage(0);
setHasSubtypes(true);
}
public int getIconIndex(ItemStack itemstack)
{
return mod_GlassShards.dyedshards.getBlockTextureFromSideAndMetadata(2, BlockDyedShards.func_26501_c(itemstack.getItemDamage()));
}
public int func_21012_a(int i)
{
return i;
}
public int AddSmelting(int id)
{
if(id == mod_GlassShards.glassshards.blockID)
{
return Block.glass.blockID;
}
return 0;
}
}
I think thats all the code I'm using, I'm a beginner so any help is greatly appreciated. Also I don't know where else to post something like this, so I hope its ok here.
Why is your glass shards class file named BlockGlassShards? Are your glass shards placeable, because all BlockName class's are placeable blocks. I think you want this as an item.
im a begginer aswell but maybe splitting all the dyes into seperate classes?
eg class for blue glass,class for green glass?
I was thinking that but I didn't want to have to make so many classes and take up so many blockID spots.
Quote from Shoopdawhoop23 »
Why is your glass shards class file named BlockGlassShards? Are your glass shards placeable, because all BlockName class's are placeable blocks. I think you want this as an item.
Yes I also wanted to make them placeable and do damage when walked on. So people could make new traps with them.
Well I see no designated section for beginners to ask questions. That post doesn't even mention where to go to post your questions. I think there should be a sub forum under the tutorial forum for questions.
Heres the mod_ class
BlockGlassShards -
BlockDyedShards
ItemGlassShards
I think thats all the code I'm using, I'm a beginner so any help is greatly appreciated. Also I don't know where else to post something like this, so I hope its ok here.
Get it?
Because Notch made minecraft
HAR HAR HAR HAR
http://www.minecraft.net/haspaid.jsp?user=meganet
I was thinking that but I didn't want to have to make so many classes and take up so many blockID spots.
Yes I also wanted to make them placeable and do damage when walked on. So people could make new traps with them.
Well I see no designated section for beginners to ask questions. That post doesn't even mention where to go to post your questions. I think there should be a sub forum under the tutorial forum for questions.