no don't do that...
look at my creative gui tutorial
why not?
i dont think that the problem lies in the gui, it's in the texture thing if you ask me, because the textures on the items aren't working either
Rollback Post to RevisionRollBack
schrödingers cat is
return (new Random().nextInt(2) == 0 ? "alive" : "dead");
why not?
i dont think that the problem lies in the gui, it's in the texture thing if you ask me, because the textures on the items aren't working either
My textures are not working for my blocks. If I don't set iconcoord it gives me the first one. If I do it says cannot find symbol symbol:method setIconCoord(int, int) on recompile.
With items it doesn't give recompile errors but gives me the textures from the default minecraft items eg. .setIconCoord(0, 1) gives a leather chestplate. Here is my code:
mod_Magic
package net.minecraft.src;
import java.util.*;
import net.minecraft.src.forge.*;
public class mod_Magic extends BaseMod
{
public String Version()
{
return "1.0.0";
}
public mod_Magic()
{
ModLoader.RegisterBlock(ArcaneOre);
ModLoader.AddName(ArcaneOre, "\u00a7eArcane Ore");
ModLoader.AddSmelting(mod_Magic.ArcaneOre.blockID, new ItemStack(mod_Magic.ArcaneIngot));
ModLoader.AddName(ArcaneOrb, "\u00a7eArcane Orb");
ModLoader.RegisterBlock(ArcaneIngotBlock);
ModLoader.AddName(ArcaneIngotBlock, "\u00a7eArcane Block");
ModLoader.AddRecipe(new ItemStack(ArcaneIngotBlock, 1), new Object[] {
"XXX", "XXX", "XXX", Character.valueOf('X'), mod_Magic.ArcaneIngot
});
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 16; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Magic.ArcaneOre.blockID, 4)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 24; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(16);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Magic.ArcaneOre.blockID, 8)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public static Block ArcaneOre = new BlockArcaneOre(212,0).setHardness(2.5F).setIconCoord(1, 0).setLightValue(0.4F).setResistance(600.0F).setBlockName("ArcaneOre");
public static Block ArcaneIngotBlock = new BlockArcaneIngotBlock(213,0).setHardness(2.5F).setLightValue(1.0F).setResistance(600.0F).setBlockName("ArcaneIngotBlock");
public static final Item ArcaneOrb = new ItemArcaneOrb(2122).setIconCoord(0, 1).setItemName("ArcaneOrb");
@Override
public String getVersion() {
// TODO Auto-generated method stub
return null;
}
@Override
public void load() {
MinecraftForgeClient.preloadTexture("/Magic/terrain.png");
MinecraftForgeClient.preloadTexture("/Magic/gui/items.png");
}
}
The ArcaneOre Code:
package net.minecraft.src;
import java.util.Random;
import net.minecraft.src.forge.*;
public class BlockArcaneOre extends Block implements ITextureProvider
{
public BlockArcaneOre(int i, int j)
{
super(i, j, Material.iron);
}
public int idDropped(int i, Random random)
{
return mod_Magic.ArcaneOre.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
public String getTextureFile()
{
return "/Magic/terrain.png";
}
}
Arcane Block = Almost identical to ArcaneOre but with name changes etc.
ItemArcaneOrb
package net.minecraft.src;
import java.util.Random;
import net.minecraft.src.forge.*;
public class ItemArcaneOrb extends Item
{
public ItemArcaneOrb(int i)
{
super(i);
maxStackSize = 64;
}
public String getTextureFile()
{
return "/Magic/terrain.png";
}
}
Just using terrain for testing. /gui/item.png is broken too.
Any help?
FYI: I edited these files to show only the basics. with mod_Magic I have removed my new furnace made with modloader and addOveride etc.
My textures are not working for my blocks. If I don't set iconcoord it gives me the first one. If I do it says cannot find symbol symbol:method setIconCoord(int, int) on recompile.
With items it doesn't give recompile errors but gives me the textures from the default minecraft items eg. .setIconCoord(0, 1) gives a leather chestplate. Here is my code:
mod_Magic
package net.minecraft.src;
import java.util.*;
import net.minecraft.src.forge.*;
public class mod_Magic extends BaseMod
{
public String Version()
{
return "1.0.0";
}
public mod_Magic()
{
ModLoader.RegisterBlock(ArcaneOre);
ModLoader.AddName(ArcaneOre, "\u00a7eArcane Ore");
ModLoader.AddSmelting(mod_Magic.ArcaneOre.blockID, new ItemStack(mod_Magic.ArcaneIngot));
ModLoader.AddName(ArcaneOrb, "\u00a7eArcane Orb");
ModLoader.RegisterBlock(ArcaneIngotBlock);
ModLoader.AddName(ArcaneIngotBlock, "\u00a7eArcane Block");
ModLoader.AddRecipe(new ItemStack(ArcaneIngotBlock, 1), new Object[] {
"XXX", "XXX", "XXX", Character.valueOf('X'), mod_Magic.ArcaneIngot
});
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 16; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Magic.ArcaneOre.blockID, 4)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 24; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(16);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Magic.ArcaneOre.blockID, 8)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public static Block ArcaneOre = new BlockArcaneOre(212,0).setHardness(2.5F).setIconCoord(1, 0).setLightValue(0.4F).setResistance(600.0F).setBlockName("ArcaneOre");
public static Block ArcaneIngotBlock = new BlockArcaneIngotBlock(213,0).setHardness(2.5F).setLightValue(1.0F).setResistance(600.0F).setBlockName("ArcaneIngotBlock");
public static final Item ArcaneOrb = new ItemArcaneOrb(2122).setIconCoord(0, 1).setItemName("ArcaneOrb");
@Override
public String getVersion() {
// TODO Auto-generated method stub
return null;
}
@Override
public void load() {
MinecraftForgeClient.preloadTexture("/Magic/terrain.png");
MinecraftForgeClient.preloadTexture("/Magic/gui/items.png");
}
}
The ArcaneOre Code:
package net.minecraft.src;
import java.util.Random;
import net.minecraft.src.forge.*;
public class BlockArcaneOre extends Block implements ITextureProvider
{
public BlockArcaneOre(int i, int j)
{
super(i, j, Material.iron);
}
public int idDropped(int i, Random random)
{
return mod_Magic.ArcaneOre.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
public String getTextureFile()
{
return "/Magic/terrain.png";
}
}
Arcane Block = Almost identical to ArcaneOre but with name changes etc.
ItemArcaneOrb
package net.minecraft.src;
import java.util.Random;
import net.minecraft.src.forge.*;
public class ItemArcaneOrb extends Item
{
public ItemArcaneOrb(int i)
{
super(i);
maxStackSize = 64;
}
public String getTextureFile()
{
return "/Magic/terrain.png";
}
}
Just using terrain for testing. /gui/item.png is broken too.
Any help?
FYI: I edited these files to show only the basics. with mod_Magic I have removed my new furnace made with modloader and addOveride etc.
i'll look at it as soon as i can but i g2g now
but at a quick glance i saw you didn't implement ITextureProvider on your second file
oh wait
.setIconCoord is only for items
for blocks it's just the second number in the parentheses (213,0)
so 0 would mean that it's the texture in the top left corner
the one to the right of that would be 1
so it would look like
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
on the next line:
16 17 and so on....
i'll look at it as soon as i can but i g2g now
but at a quick glance i saw you didn't implement ITextureProvider on your second file
oh wait
.setIconCoord is only for items
for blocks it's just the second number in the parentheses (213,0)
so 0 would mean that it's the texture in the top left corner
the one to the right of that would be 1
so it would look like
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
on the next line:
16 17 and so on....
My textures are not working for my blocks. If I don't set iconcoord it gives me the first one. If I do it says cannot find symbol symbol:method setIconCoord(int, int) on recompile.
With items it doesn't give recompile errors but gives me the textures from the default minecraft items eg. .setIconCoord(0, 1) gives a leather chestplate. Here is my code:
mod_Magic
package net.minecraft.src;
import java.util.*;
import net.minecraft.src.forge.*;
public class mod_Magic extends BaseMod
{
public String Version()
{
return "1.0.0";
}
public mod_Magic()
{
ModLoader.RegisterBlock(ArcaneOre);
ModLoader.AddName(ArcaneOre, "\u00a7eArcane Ore");
ModLoader.AddSmelting(mod_Magic.ArcaneOre.blockID, new ItemStack(mod_Magic.ArcaneIngot));
ModLoader.AddName(ArcaneOrb, "\u00a7eArcane Orb");
ModLoader.RegisterBlock(ArcaneIngotBlock);
ModLoader.AddName(ArcaneIngotBlock, "\u00a7eArcane Block");
ModLoader.AddRecipe(new ItemStack(ArcaneIngotBlock, 1), new Object[] {
"XXX", "XXX", "XXX", Character.valueOf('X'), mod_Magic.ArcaneIngot
});
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 16; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Magic.ArcaneOre.blockID, 4)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 24; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(16);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Magic.ArcaneOre.blockID, 8)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public static Block ArcaneOre = new BlockArcaneOre(212,0).setHardness(2.5F).setIconCoord(1, 0).setLightValue(0.4F).setResistance(600.0F).setBlockName("ArcaneOre");
public static Block ArcaneIngotBlock = new BlockArcaneIngotBlock(213,0).setHardness(2.5F).setLightValue(1.0F).setResistance(600.0F).setBlockName("ArcaneIngotBlock");
public static final Item ArcaneOrb = new ItemArcaneOrb(2122).setIconCoord(0, 1).setItemName("ArcaneOrb");
@Override
public String getVersion() {
// TODO Auto-generated method stub
return null;
}
@Override
public void load() {
MinecraftForgeClient.preloadTexture("/Magic/terrain.png");
MinecraftForgeClient.preloadTexture("/Magic/gui/items.png");
}
}
The ArcaneOre Code:
package net.minecraft.src;
import java.util.Random;
import net.minecraft.src.forge.*;
public class BlockArcaneOre extends Block implements ITextureProvider
{
public BlockArcaneOre(int i, int j)
{
super(i, j, Material.iron);
}
public int idDropped(int i, Random random)
{
return mod_Magic.ArcaneOre.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
public String getTextureFile()
{
return "/Magic/terrain.png";
}
}
Arcane Block = Almost identical to ArcaneOre but with name changes etc.
ItemArcaneOrb
package net.minecraft.src;
import java.util.Random;
import net.minecraft.src.forge.*;
public class ItemArcaneOrb extends Item
{
public ItemArcaneOrb(int i)
{
super(i);
maxStackSize = 64;
}
public String getTextureFile()
{
return "/Magic/terrain.png";
}
}
Just using terrain for testing. /gui/item.png is broken too.
Any help?
FYI: I edited these files to show only the basics. with mod_Magic I have removed my new furnace made with modloader and addOveride etc.
I'm having the same problem too. I think it is something with Forge
And the items png is named "/gui/items.png" (You forgot the "s" [I've made that mistake SOOOO many times :smile.gif: ])
Ah cool, thank you :biggrin.gif:
added
Aw, it doesn't work :sad.gif:
Here is my Item_.java:
http://pastebin.com/8CzZwUjZ
And here is my mod__.java:
http://pastebin.com/HUUi8KrS
Hope you can find my error
change the 2 to 21
Nope, doesn't work either. It shows only the item with the damage 0. :/
ok i'll look at it when i have more time
Alright, Is it possible that it doesn't work, because I use MCForge V1.2.0?
why not?
i dont think that the problem lies in the gui, it's in the texture thing if you ask me, because the textures on the items aren't working either
LOL... updated forge and it works now! YAY! Thanks. :biggrin.gif:
probably possible
true
probably with both
I make Minecraft Videos, So subscribe if you like it and ask me if you want me to do an adventure map!
With items it doesn't give recompile errors but gives me the textures from the default minecraft items eg. .setIconCoord(0, 1) gives a leather chestplate. Here is my code:
mod_Magic
The ArcaneOre Code:
Arcane Block = Almost identical to ArcaneOre but with name changes etc.
ItemArcaneOrb
Any help?
FYI: I edited these files to show only the basics. with mod_Magic I have removed my new furnace made with modloader and addOveride etc.
ok ok i will make in at least 24 hours
i'll look at it as soon as i can but i g2g now
but at a quick glance i saw you didn't implement ITextureProvider on your second file
oh wait
.setIconCoord is only for items
for blocks it's just the second number in the parentheses (213,0)
so 0 would mean that it's the texture in the top left corner
the one to the right of that would be 1
so it would look like
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
on the next line:
16 17 and so on....
Thanks. +1 rep for you :biggrin.gif:
I'm having the same problem too. I think it is something with Forge
And the items png is named "/gui/items.png" (You forgot the "s" [I've made that mistake SOOOO many times :smile.gif: ])
well i fixed his problem...
i'll look at your code again as soon as i get home
i probably just overlooked something really simmple
and i will be making a tutorial on adding items into dungeon chests and adding custom mobs to dungeon generation list
and i'm still working on that redstone tutorial
i had like no time last night :sad.gif:
Thanks, I really would love to know the error. I'v posted "Compatibility for MC1.0.0 coming soon!" on my mod's page since before Thanksgiving!!!
Thanks again
Rashed