Im having this problem when I load up my miencraft and paly it does this weird thing with the images and does something wrong..:
package net.minecraft.src;
public class mod_archetect extends BaseMod
{
public static final Block Stone1 = new Stone1(160, 0).setBlockName("Stone1").setHardness(3F).setResistance(4F).setLightValue(1F);
public static final Item Chisel = new Chisel(5000).setItemName("Chisel");
public void load()
{
Stone1.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/dec/1.png");
ModLoader.registerBlock(Stone1);
ModLoader.addName(Stone1, "Stone Decoration");
ModLoader.addRecipe(new ItemStack(Stone1, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
Chisel.iconIndex = ModLoader.addOverride("/gui/items.png", "/dec/chisel.png");
ModLoader.addName(Chisel, "Chisel");
ModLoader.addRecipe(new ItemStack(Stone1, 8), new Object [] {"%%%", "%@%", "%%%",Character.valueOf('@'), Chisel, Character.valueOf('%'), Block.stone});
}
public String getVersion()
{
return "1.2.5";
}
}
Did you do what I said in my reply on the previous page?
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Im sorry I didnt see it but thank you SO much for this I am on my way to making my first big mod
Some stuff I would like to know how to do btw.
- Make a block that changes to another block when redstone gets input to it.
- make my custom item lose durability over time when used in crafting recipies.
- and how to use damage values on the item id like 160:1,160:2 etc.
I know your packed full of questions each day but I really want to know these you can pm if you want on how to do it thank you.
public class mod_Minerals extends BaseMod
{
//Declarare blocuri
public static final Block BlockQuartz = new BlockQuartz(160, 0).setBlockName("Quartz").setHardness(3F).setResistance(4F).setLightValue(1F);
//Generare blocuri
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
for(int i = 0; i < 7; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(BlockQuartz.blockID, 25)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
//...
public String getVersion()
{
return "1.2.5";
}
}
public class BlockQuartz extends Block
{
public BlockQuartz(int i, int j)
{
super(i, j, Material.iron);
}
public int idDropped(int i, Random random, int j)
{
return mod_Minerals.BlockQuartz.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
Error:
Mods loaded: 1
ModLoader 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 9f578458 --------
Generated 30.06.2012 14:50
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_03, Oracle Corporation
VM: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: null version null, null
java.lang.IllegalStateException: glGetString(GL_VERSION) returned null - possibly caused by missing current context.
at org.lwjgl.opengl.GLContext.getSupportedExtensions(GLContext.java:187)
at org.lwjgl.opengl.ContextCapabilities.initAllStubs(ContextCapabilities.java:4355)
at org.lwjgl.opengl.ContextCapabilities.<init>(ContextCapabilities.java:4661)
at org.lwjgl.opengl.GLContext.useContext(GLContext.java:352)
at org.lwjgl.opengl.Context.makeCurrent(Context.java:183)
at org.lwjgl.opengl.Display.makeCurrent(Display.java:730)
at org.lwjgl.opengl.Display.makeCurrentAndSetSwapInterval(Display.java:896)
at org.lwjgl.opengl.Display.create(Display.java:860)
at org.lwjgl.opengl.Display.create(Display.java:784)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:388)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT ec6856a4 ----------
So you make a topic, send me a pm about it, then write on the topic that the problem is resolved, then post here and you still want help with it?
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
hoping someone responds soon. where exactly do i put the picture of the block and/or item.
Into your MCP directory > bin > minecraft. When you go into there, it might be best to make a new folder to hold all your textures. So then you'd place it in your MCP directory > bin > minecraft > YourFolder. At this point, the texture for a new block (I'll call it blockExample) would look like this in the code:
My problem resolved :-D , I reinstalled the MCP .
I have a question: "for(int i = 0; i < 10; i++)": what is the number for diamonds?
Can't be certain for the number of diamonds, myself. But you have to take more than just that variable into account. Rarity is a combination of the rarity variable, on what levels it can spawn, and how big each vein is. Diamonds spawn at level 0-16, with a maximum vein size of I think 8. All I know is that the lower the rarity number is, the more rare it becomes. Experiment with it a little. It's tedious, but it's all you can do at the moment.
As at least some reference, I hear coal is a 15-20 on the rarity scale. (just keep in mind it can be found pretty much any level)
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I have an error while creating my own biome. It seems like whenever I try setting my top or my filler block into a custom block I made, it errors out. Also, multi textured blocks aren't working for the block I want to make a biome in for. Here's the code:
mod File
package net.minecraft.src;
import java.util.Random;
import java.util.Map;
import net.minecraft.src.forge.*;
public class mod_TGAEM extends NetworkMod
{
public static final BiomeGenBase BiomeHallow = (new BiomeGenHallow(30)).setColor(0xb0e2ff).setBiomeName("Hallowed Plains");
//Neutral
public static final Block mithrilOre = new BlockmithrilOre (200, 0).setHardness(1.0F).setResistance(1.0F).setBlockName("MithrilOre");
//Evil
public static final Block vileLog = new BlockvileLog (201).setHardness(2.0F).setStepSound(Block.soundWoodFootstep).setBlockName("VileLog");
public static final Block vilePlank = new BlockvilePlank (202, 0).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setBlockName("Vile Planks").setRequiresSelfNotify();
public static final Block vileSapling = new BlockvileSapling (203, 0).setHardness(1.0F).setResistance(1.0F).setStepSound(Block.soundGrassFootstep).setBlockName("VileSapling");
public static final Block vileLeaves = new BlockvileLeaves (204, 0).setHardness(0.2F).setLightOpacity(1).setStepSound(Block.soundGrassFootstep).setBlockName("VileLeaves").setRequiresSelfNotify();
//Good
public static final Block exaltedLog = new BlockexaltedLog (205).setHardness(2.0F).setStepSound(Block.soundWoodFootstep).setBlockName("ExaltedLog");
public static final Block exaltedPlank = new BlockexaltedPlank (206, 0).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setBlockName("Exalted Planks").setRequiresSelfNotify();
public static final Block exaltedSapling = new BlockexaltedSapling (207, 0).setHardness(1.0F).setResistance(1.0F).setStepSound(Block.soundGrassFootstep).setBlockName("ExaltedSapling");
public static final Block exaltedLeaves = new BlockexaltedLeaves (208, 0).setHardness(0.2F).setLightOpacity(1).setStepSound(Block.soundGrassFootstep).setBlockName("ExaltedLeaves").setRequiresSelfNotify();
public static final Block exaltedGround = new BlockexaltedGround (128, 0).setHardness(0.6F).setStepSound(Block.soundGrassFootstep).setBlockName("Consecrated Ground");
public static final Item vileStick = new Item (205).setItemName("Vile Stick");
public static final Item exaltedStick = new Item (206).setItemName("Exalted Stick");
//Texture Integers
public static int vlogside;
public static int vlogbottom;
public static int elogside;
public static int elogbottom;
public static int eGroundbottom;
public static int eGroundtop;
public static int eGroundside;
public mod_TGAEM()
{
//Textures
//EVIL
vlogside = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vlogside.png");
vlogbottom = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vlogbottom.png");
vilePlank.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vileplank.png");
vileSapling.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vilesapling.png");
vileLeaves.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vileleaves.png");
vileStick.iconIndex = ModLoader.addOverride("/gui/items.png", "/tgaem/evil/vilestick.png");
//GOOD
elogside = ModLoader.addOverride("/terrain.png", "/tgaem/good/elogside.png");
elogbottom = ModLoader.addOverride("/terrain.png", "/tgaem/good/elogbottom.png");
exaltedPlank.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/good/exaltedplank.png");
exaltedSapling.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/good/exaltedsapling.png");
exaltedLeaves.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/good/exaltedleaves.png");
eGroundbottom = ModLoader.addOverride("/terrain.png", "/tgaem/good/egroundside.png");
eGroundtop = ModLoader.addOverride("/terrain.png", "/tgaem/good/egroundside.png");
eGroundside = ModLoader.addOverride("/terrain.png", "/tgaem/good/egroundside.png");
exaltedStick.iconIndex = ModLoader.addOverride("/gui/items.png", "/tgaem/good/exaltedstick.png");
//NEUTRAL
//Block Registers/Names
//NEUTRAL
ModLoader.registerBlock(mithrilOre);
ModLoader.addName(mithrilOre, "Mithril Ore");
mithrilOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/item/mithrilore.png");
//Good Side
ModLoader.registerBlock(exaltedLog);
ModLoader.registerBlock(exaltedPlank);
ModLoader.registerBlock(exaltedSapling);
ModLoader.registerBlock(exaltedLeaves);
ModLoader.registerBlock(exaltedGround);
ModLoader.addName(exaltedLog, "Exalted Log");
ModLoader.addName(exaltedPlank, "Exalted Plank");
ModLoader.addName(exaltedSapling, "Exalted Sapling");
ModLoader.addName(exaltedLeaves, "Exalted Leaves");
ModLoader.addName(exaltedStick, "Exalted Stick");
ModLoader.addName(exaltedGround, "Exalted Ground");
//Evil Side
ModLoader.registerBlock(vileLog);
ModLoader.registerBlock(vilePlank);
ModLoader.registerBlock(vileSapling);
ModLoader.registerBlock(vileLeaves);
ModLoader.addName(vileLog, "Vile Log");
ModLoader.addName(vilePlank, "Vile Plank");
ModLoader.addName(vileSapling, "Vile Sapling");
ModLoader.addName(vileLeaves, "Vile Leaves");
ModLoader.addName(vileStick, "Vile Stick");
//Recipes
//EVIL
ModLoader.addRecipe(new ItemStack(mod_TGAEM.vilePlank, 4), new Object []{
"#", Character.valueOf('#'), mod_TGAEM.vileLog
});
ModLoader.addRecipe(new ItemStack(mod_TGAEM.vileStick, 4), new Object []{
"#", "#", Character.valueOf('#'), mod_TGAEM.vilePlank
});
//GOOD
ModLoader.addRecipe(new ItemStack(mod_TGAEM.exaltedPlank, 4), new Object []{
"#", Character.valueOf('#'), mod_TGAEM.exaltedLog
});
ModLoader.addRecipe(new ItemStack(mod_TGAEM.exaltedStick, 4), new Object []{
"#", "#", Character.valueOf('#'), mod_TGAEM.exaltedPlank
});
ModLoader.addRecipe(new ItemStack(mod_TGAEM.exaltedGround, 4), new Object []{
"#", Character.valueOf('#'), Block.dirt
});
}
//NEUTRAL
public void generateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < (13); i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(23);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_TGAEM.mithrilOre.blockID, 7)).generate(world, rand, randPosX, randPosY, randPosZ);
System.out.println("Mithril Ores Generated.");
}
BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(chunkX, chunkZ);
WorldGenVileTrees tree = new WorldGenVileTrees();
if((biome instanceof BiomeGenPlains) || (biome instanceof BiomeGenForest) || (biome instanceof BiomeGenHills) ||
(biome instanceof BiomeGenDesert) || (biome instanceof BiomeGenSwamp) || (biome instanceof BiomeGenTaiga))
{
for(int x = 0; x < 2; x++)
{
int Xcoord = chunkX + rand.nextInt(16);
int Zcoord = chunkZ + rand.nextInt(16);
int i = world.getHeightValue(Xcoord, Zcoord);
tree.generate(world, rand, Xcoord, i, Zcoord);
System.out.println("Vile Trees Generated.");
}
BiomeGenBase biome1 = world.getWorldChunkManager().getBiomeGenAt(chunkX, chunkZ);
WorldGenExaltedTrees tree1 = new WorldGenExaltedTrees();
if((biome1 instanceof BiomeGenPlains) || (biome1 instanceof BiomeGenForest) || (biome1 instanceof BiomeGenHills) ||
(biome1 instanceof BiomeGenDesert) || (biome1 instanceof BiomeGenSwamp) || (biome1 instanceof BiomeGenTaiga))
{
for(int x = 0; x < 2; x++)
{
int Xcoord = chunkX + rand.nextInt(16);
int Zcoord = chunkZ + rand.nextInt(16);
int i = world.getHeightValue(Xcoord, Zcoord);
tree1.generate(world, rand, Xcoord, i, Zcoord);
System.out.println("Exalted Trees Generated.");
}
}
}
}
public void load()
{
ModLoader.addBiome(BiomeHallow);
}
public String getVersion()
{
return "1.2.5";
}
}
BlockexaltedGround
package net.minecraft.src;
public class BlockexaltedGround extends Block
{
public BlockexaltedGround(int i, int j)
{
super(i, j, Material.grass);
}
public int getBlockTextureFromSideAndMetadata(int i, int j)
{
return getBlockTextureFromSide(i);
}
public int getBlockTextureFromSide(int i)
{
if (i == 0)
{
return mod_TGAEM.eGroundbottom;
}
if (i == 1)
{
return mod_TGAEM.eGroundtop;
}
else
{
return mod_TGAEM.eGroundside;
}
}
}
I have an error while creating my own biome. It seems like whenever I try setting my top or my filler block into a custom block I made, it errors out. Also, multi textured blocks aren't working for the block I want to make a biome in for. Here's the code:
mod File
package net.minecraft.src;
import java.util.Random;
import java.util.Map;
import net.minecraft.src.forge.*;
public class mod_TGAEM extends NetworkMod
{
public static final BiomeGenBase BiomeHallow = (new BiomeGenHallow(30)).setColor(0xb0e2ff).setBiomeName("Hallowed Plains");
//Neutral
public static final Block mithrilOre = new BlockmithrilOre (200, 0).setHardness(1.0F).setResistance(1.0F).setBlockName("MithrilOre");
//Evil
public static final Block vileLog = new BlockvileLog (201).setHardness(2.0F).setStepSound(Block.soundWoodFootstep).setBlockName("VileLog");
public static final Block vilePlank = new BlockvilePlank (202, 0).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setBlockName("Vile Planks").setRequiresSelfNotify();
public static final Block vileSapling = new BlockvileSapling (203, 0).setHardness(1.0F).setResistance(1.0F).setStepSound(Block.soundGrassFootstep).setBlockName("VileSapling");
public static final Block vileLeaves = new BlockvileLeaves (204, 0).setHardness(0.2F).setLightOpacity(1).setStepSound(Block.soundGrassFootstep).setBlockName("VileLeaves").setRequiresSelfNotify();
//Good
public static final Block exaltedLog = new BlockexaltedLog (205).setHardness(2.0F).setStepSound(Block.soundWoodFootstep).setBlockName("ExaltedLog");
public static final Block exaltedPlank = new BlockexaltedPlank (206, 0).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setBlockName("Exalted Planks").setRequiresSelfNotify();
public static final Block exaltedSapling = new BlockexaltedSapling (207, 0).setHardness(1.0F).setResistance(1.0F).setStepSound(Block.soundGrassFootstep).setBlockName("ExaltedSapling");
public static final Block exaltedLeaves = new BlockexaltedLeaves (208, 0).setHardness(0.2F).setLightOpacity(1).setStepSound(Block.soundGrassFootstep).setBlockName("ExaltedLeaves").setRequiresSelfNotify();
public static final Block exaltedGround = new BlockexaltedGround (128, 0).setHardness(0.6F).setStepSound(Block.soundGrassFootstep).setBlockName("Consecrated Ground");
public static final Item vileStick = new Item (205).setItemName("Vile Stick");
public static final Item exaltedStick = new Item (206).setItemName("Exalted Stick");
//Texture Integers
public static int vlogside;
public static int vlogbottom;
public static int elogside;
public static int elogbottom;
public static int eGroundbottom;
public static int eGroundtop;
public static int eGroundside;
public mod_TGAEM()
{
//Textures
//EVIL
vlogside = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vlogside.png");
vlogbottom = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vlogbottom.png");
vilePlank.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vileplank.png");
vileSapling.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vilesapling.png");
vileLeaves.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vileleaves.png");
vileStick.iconIndex = ModLoader.addOverride("/gui/items.png", "/tgaem/evil/vilestick.png");
//GOOD
elogside = ModLoader.addOverride("/terrain.png", "/tgaem/good/elogside.png");
elogbottom = ModLoader.addOverride("/terrain.png", "/tgaem/good/elogbottom.png");
exaltedPlank.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/good/exaltedplank.png");
exaltedSapling.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/good/exaltedsapling.png");
exaltedLeaves.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/good/exaltedleaves.png");
eGroundbottom = ModLoader.addOverride("/terrain.png", "/tgaem/good/egroundside.png");
eGroundtop = ModLoader.addOverride("/terrain.png", "/tgaem/good/egroundside.png");
eGroundside = ModLoader.addOverride("/terrain.png", "/tgaem/good/egroundside.png");
exaltedStick.iconIndex = ModLoader.addOverride("/gui/items.png", "/tgaem/good/exaltedstick.png");
//NEUTRAL
//Block Registers/Names
//NEUTRAL
ModLoader.registerBlock(mithrilOre);
ModLoader.addName(mithrilOre, "Mithril Ore");
mithrilOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/item/mithrilore.png");
//Good Side
ModLoader.registerBlock(exaltedLog);
ModLoader.registerBlock(exaltedPlank);
ModLoader.registerBlock(exaltedSapling);
ModLoader.registerBlock(exaltedLeaves);
ModLoader.registerBlock(exaltedGround);
ModLoader.addName(exaltedLog, "Exalted Log");
ModLoader.addName(exaltedPlank, "Exalted Plank");
ModLoader.addName(exaltedSapling, "Exalted Sapling");
ModLoader.addName(exaltedLeaves, "Exalted Leaves");
ModLoader.addName(exaltedStick, "Exalted Stick");
ModLoader.addName(exaltedGround, "Exalted Ground");
//Evil Side
ModLoader.registerBlock(vileLog);
ModLoader.registerBlock(vilePlank);
ModLoader.registerBlock(vileSapling);
ModLoader.registerBlock(vileLeaves);
ModLoader.addName(vileLog, "Vile Log");
ModLoader.addName(vilePlank, "Vile Plank");
ModLoader.addName(vileSapling, "Vile Sapling");
ModLoader.addName(vileLeaves, "Vile Leaves");
ModLoader.addName(vileStick, "Vile Stick");
//Recipes
//EVIL
ModLoader.addRecipe(new ItemStack(mod_TGAEM.vilePlank, 4), new Object []{
"#", Character.valueOf('#'), mod_TGAEM.vileLog
});
ModLoader.addRecipe(new ItemStack(mod_TGAEM.vileStick, 4), new Object []{
"#", "#", Character.valueOf('#'), mod_TGAEM.vilePlank
});
//GOOD
ModLoader.addRecipe(new ItemStack(mod_TGAEM.exaltedPlank, 4), new Object []{
"#", Character.valueOf('#'), mod_TGAEM.exaltedLog
});
ModLoader.addRecipe(new ItemStack(mod_TGAEM.exaltedStick, 4), new Object []{
"#", "#", Character.valueOf('#'), mod_TGAEM.exaltedPlank
});
ModLoader.addRecipe(new ItemStack(mod_TGAEM.exaltedGround, 4), new Object []{
"#", Character.valueOf('#'), Block.dirt
});
}
//NEUTRAL
public void generateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < (13); i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(23);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_TGAEM.mithrilOre.blockID, 7)).generate(world, rand, randPosX, randPosY, randPosZ);
System.out.println("Mithril Ores Generated.");
}
BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(chunkX, chunkZ);
WorldGenVileTrees tree = new WorldGenVileTrees();
if((biome instanceof BiomeGenPlains) || (biome instanceof BiomeGenForest) || (biome instanceof BiomeGenHills) ||
(biome instanceof BiomeGenDesert) || (biome instanceof BiomeGenSwamp) || (biome instanceof BiomeGenTaiga))
{
for(int x = 0; x < 2; x++)
{
int Xcoord = chunkX + rand.nextInt(16);
int Zcoord = chunkZ + rand.nextInt(16);
int i = world.getHeightValue(Xcoord, Zcoord);
tree.generate(world, rand, Xcoord, i, Zcoord);
System.out.println("Vile Trees Generated.");
}
BiomeGenBase biome1 = world.getWorldChunkManager().getBiomeGenAt(chunkX, chunkZ);
WorldGenExaltedTrees tree1 = new WorldGenExaltedTrees();
if((biome1 instanceof BiomeGenPlains) || (biome1 instanceof BiomeGenForest) || (biome1 instanceof BiomeGenHills) ||
(biome1 instanceof BiomeGenDesert) || (biome1 instanceof BiomeGenSwamp) || (biome1 instanceof BiomeGenTaiga))
{
for(int x = 0; x < 2; x++)
{
int Xcoord = chunkX + rand.nextInt(16);
int Zcoord = chunkZ + rand.nextInt(16);
int i = world.getHeightValue(Xcoord, Zcoord);
tree1.generate(world, rand, Xcoord, i, Zcoord);
System.out.println("Exalted Trees Generated.");
}
}
}
}
public void load()
{
ModLoader.addBiome(BiomeHallow);
}
public String getVersion()
{
return "1.2.5";
}
}
BlockexaltedGround
package net.minecraft.src;
public class BlockexaltedGround extends Block
{
public BlockexaltedGround(int i, int j)
{
super(i, j, Material.grass);
}
public int getBlockTextureFromSideAndMetadata(int i, int j)
{
return getBlockTextureFromSide(i);
}
public int getBlockTextureFromSide(int i)
{
if (i == 0)
{
return mod_TGAEM.eGroundbottom;
}
if (i == 1)
{
return mod_TGAEM.eGroundtop;
}
else
{
return mod_TGAEM.eGroundside;
}
}
}
I believe that the tutorial stated to change the block id of the biome block if minecraft ever crashes but that doesn't work either.
Post the error.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
2012-07-01 11:43:39 [INFO] Forge Mod Loader has loaded 2 mods
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at cpw.mods.fml.common.modloader.ModLoaderModContainer.preInit(ModLoaderModContainer.java:107)
at cpw.mods.fml.common.Loader.preModInit(Loader.java:235)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:593)
at cpw.mods.fml.client.FMLClientHandler.onPreLoad(FMLClientHandler.java:193)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:383)
at net.minecraft.client.Minecraft.run(Minecraft.java:735)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.BiomeGenHallow.<init>(BiomeGenHallow.java:12)
at net.minecraft.src.mod_TGAEM.<clinit>(mod_TGAEM.java:8)
... 13 more
Ok so, I made an Amethyst, and I'm having trouble with the texture. I made sure the texture is 16x16, the path is right, but the texture always looks like a leather hat! Any idea what's wrong? Here's my mod_Amethyst.
package net.minecraft.src;
public class mod_Amethyst extends BaseMod
{
public static final Item amethyst = new Amethyst(5001) .setItemName("amethyst");
public void load()
{
amethyst.iconIndex = ModLoader.addOverride("/gui/items.png", "/mod/Amethyst.png");
ModLoader.addName(amethyst, "Amethyst");
}
public String getVersion()
{
return "Version 1.2.5";
}
}
I've got a problem with your crop tutorial.
When I try to plant it, I see this:
Mods loaded: 6
ModLoader 1.2.5
mod_CodeChickenCore 0.5.2
mod_MinecraftForge 3.1.3.105
mod_NotEnoughItems 1.2.2.2
mod_ReiMinimap v3.1 [1.2.5]
mod_ZgAnimals 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT c20f9af6 --------
Generated 01.07.12 19:17
Minecraft: Minecraft 1.2.5
OS: Windows 7 (x86) version 6.1
Java: 1.6.0_26, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.8.3
OpenGL: GeForce 9800 GT/PCIe/SSE2 version 3.3.0, NVIDIA Corporation
java.lang.ClassCastException: BlockCropDiaxium cannot be cast to aei
at vl.k(RenderBlocks.java:2527)
at vl.b(RenderBlocks.java:375)
at ct.a(WorldRenderer.java:211)
at l.a(RenderGlobal.java:1461)
at lr.a(EntityRenderer.java:1070)
at lr.b(EntityRenderer.java:903)
at EntityRendererProxy.b(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.x(Minecraft.java:869)
at net.minecraft.client.Minecraft.run(Minecraft.java:747)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 4a67bdf1 ----------
This is for modders. Not people who install mods. You can't just get code and put it in your jar then expect it to work.
2012-07-01 11:43:39 [INFO] Forge Mod Loader has loaded 2 mods
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at cpw.mods.fml.common.modloader.ModLoaderModContainer.preInit(ModLoaderModContainer.java:107)
at cpw.mods.fml.common.Loader.preModInit(Loader.java:235)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:593)
at cpw.mods.fml.client.FMLClientHandler.onPreLoad(FMLClientHandler.java:193)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:383)
at net.minecraft.client.Minecraft.run(Minecraft.java:735)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.BiomeGenHallow.<init>(BiomeGenHallow.java:12)
at net.minecraft.src.mod_TGAEM.<clinit>(mod_TGAEM.java:8)
... 13 more
Ok so, I made an Amethyst, and I'm having trouble with the texture. I made sure the texture is 16x16, the path is right, but the texture always looks like a leather hat! Any idea what's wrong? Here's my mod_Amethyst.
package net.minecraft.src;
public class mod_Amethyst extends BaseMod
{
public static final Item amethyst = new Amethyst(5001) .setItemName("amethyst");
public void load()
{
amethyst.iconIndex = ModLoader.addOverride("/gui/items.png", "/mod/Amethyst.png");
ModLoader.addName(amethyst, "Amethyst");
}
public String getVersion()
{
return "Version 1.2.5";
}
}
Are you sure the texture is png? What program did you make it in? A leather hat normally means that the game cannot read the texture.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Are you sure the texture is png? What program did you make it in? A leather hat normally means that the game cannot read the texture.
It IS a .png image, and I used Paint.net to edit the texture. I have an emerald texture that works, all I did for the amethyst was edit the emerald and save it under a new name.
It IS a .png image, and I used Paint.net to edit the texture. I have an emerald texture that works, all I did for the amethyst was edit the emerald and save it under a new name.
Merge your mod_ classes into one. Put the amethyst stuff inside the other and see if the problem still persists.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Hi. I'm trying to make a obsidian pick that can break bedrock. I have all the coding done and have added this to my ItemObsidianPickaxe.java:
if (par1Block == Block.bedrock)
{
return toolMaterial.getHarvestLevel() >= 4;
}
I wonder if my harvest level isnt four, but i dont know which parameter sets your harvest level.also, how do I make an item that instead of getting destroyed when you craft with it, gets damaged?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffWell, you're welcome. XD
Glad I could help.
package net.minecraft.src; public class mod_archetect extends BaseMod { public static final Block Stone1 = new Stone1(160, 0).setBlockName("Stone1").setHardness(3F).setResistance(4F).setLightValue(1F); public static final Item Chisel = new Chisel(5000).setItemName("Chisel"); public void load() { Stone1.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/dec/1.png"); ModLoader.registerBlock(Stone1); ModLoader.addName(Stone1, "Stone Decoration"); ModLoader.addRecipe(new ItemStack(Stone1, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt}); Chisel.iconIndex = ModLoader.addOverride("/gui/items.png", "/dec/chisel.png"); ModLoader.addName(Chisel, "Chisel"); ModLoader.addRecipe(new ItemStack(Stone1, 8), new Object [] {"%%%", "%@%", "%%%",Character.valueOf('@'), Chisel, Character.valueOf('%'), Block.stone}); } public String getVersion() { return "1.2.5"; } }Did you do what I said in my reply on the previous page?
together they are powerful beyond imagination."
Some stuff I would like to know how to do btw.
- Make a block that changes to another block when redstone gets input to it.
- make my custom item lose durability over time when used in crafting recipies.
- and how to use damage values on the item id like 160:1,160:2 etc.
I know your packed full of questions each day but I really want to know these you can pm if you want on how to do it
So you make a topic, send me a pm about it, then write on the topic that the problem is resolved, then post here and you still want help with it?
Why couldn't it? You would have to edit base classes though. Something which I don't support or help with here.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumMy programming tutorials.
Java game devvie, web devvie. Just a devvie in general. Check out my site.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffInto your MCP directory > bin > minecraft. When you go into there, it might be best to make a new folder to hold all your textures. So then you'd place it in your MCP directory > bin > minecraft > YourFolder. At this point, the texture for a new block (I'll call it blockExample) would look like this in the code:
blockExample.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/YourFolder/blockExample.png");Can't know until you post error report and/or code.
Can't be certain for the number of diamonds, myself. But you have to take more than just that variable into account. Rarity is a combination of the rarity variable, on what levels it can spawn, and how big each vein is. Diamonds spawn at level 0-16, with a maximum vein size of I think 8. All I know is that the lower the rarity number is, the more rare it becomes. Experiment with it a little. It's tedious, but it's all you can do at the moment.
As at least some reference, I hear coal is a 15-20 on the rarity scale. (just keep in mind it can be found pretty much any level)
When I figure it out, I try and let you know
together they are powerful beyond imagination."
Custom bows
Using Metadata
Toggle-able blocks (like doors and fence gates, including redstone-only)
If you could add any of these tutorials, that would be amazing!
mod File
package net.minecraft.src; import java.util.Random; import java.util.Map; import net.minecraft.src.forge.*; public class mod_TGAEM extends NetworkMod { public static final BiomeGenBase BiomeHallow = (new BiomeGenHallow(30)).setColor(0xb0e2ff).setBiomeName("Hallowed Plains"); //Neutral public static final Block mithrilOre = new BlockmithrilOre (200, 0).setHardness(1.0F).setResistance(1.0F).setBlockName("MithrilOre"); //Evil public static final Block vileLog = new BlockvileLog (201).setHardness(2.0F).setStepSound(Block.soundWoodFootstep).setBlockName("VileLog"); public static final Block vilePlank = new BlockvilePlank (202, 0).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setBlockName("Vile Planks").setRequiresSelfNotify(); public static final Block vileSapling = new BlockvileSapling (203, 0).setHardness(1.0F).setResistance(1.0F).setStepSound(Block.soundGrassFootstep).setBlockName("VileSapling"); public static final Block vileLeaves = new BlockvileLeaves (204, 0).setHardness(0.2F).setLightOpacity(1).setStepSound(Block.soundGrassFootstep).setBlockName("VileLeaves").setRequiresSelfNotify(); //Good public static final Block exaltedLog = new BlockexaltedLog (205).setHardness(2.0F).setStepSound(Block.soundWoodFootstep).setBlockName("ExaltedLog"); public static final Block exaltedPlank = new BlockexaltedPlank (206, 0).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setBlockName("Exalted Planks").setRequiresSelfNotify(); public static final Block exaltedSapling = new BlockexaltedSapling (207, 0).setHardness(1.0F).setResistance(1.0F).setStepSound(Block.soundGrassFootstep).setBlockName("ExaltedSapling"); public static final Block exaltedLeaves = new BlockexaltedLeaves (208, 0).setHardness(0.2F).setLightOpacity(1).setStepSound(Block.soundGrassFootstep).setBlockName("ExaltedLeaves").setRequiresSelfNotify(); public static final Block exaltedGround = new BlockexaltedGround (128, 0).setHardness(0.6F).setStepSound(Block.soundGrassFootstep).setBlockName("Consecrated Ground"); public static final Item vileStick = new Item (205).setItemName("Vile Stick"); public static final Item exaltedStick = new Item (206).setItemName("Exalted Stick"); //Texture Integers public static int vlogside; public static int vlogbottom; public static int elogside; public static int elogbottom; public static int eGroundbottom; public static int eGroundtop; public static int eGroundside; public mod_TGAEM() { //Textures //EVIL vlogside = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vlogside.png"); vlogbottom = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vlogbottom.png"); vilePlank.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vileplank.png"); vileSapling.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vilesapling.png"); vileLeaves.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/evil/vileleaves.png"); vileStick.iconIndex = ModLoader.addOverride("/gui/items.png", "/tgaem/evil/vilestick.png"); //GOOD elogside = ModLoader.addOverride("/terrain.png", "/tgaem/good/elogside.png"); elogbottom = ModLoader.addOverride("/terrain.png", "/tgaem/good/elogbottom.png"); exaltedPlank.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/good/exaltedplank.png"); exaltedSapling.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/good/exaltedsapling.png"); exaltedLeaves.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/good/exaltedleaves.png"); eGroundbottom = ModLoader.addOverride("/terrain.png", "/tgaem/good/egroundside.png"); eGroundtop = ModLoader.addOverride("/terrain.png", "/tgaem/good/egroundside.png"); eGroundside = ModLoader.addOverride("/terrain.png", "/tgaem/good/egroundside.png"); exaltedStick.iconIndex = ModLoader.addOverride("/gui/items.png", "/tgaem/good/exaltedstick.png"); //NEUTRAL //Block Registers/Names //NEUTRAL ModLoader.registerBlock(mithrilOre); ModLoader.addName(mithrilOre, "Mithril Ore"); mithrilOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tgaem/item/mithrilore.png"); //Good Side ModLoader.registerBlock(exaltedLog); ModLoader.registerBlock(exaltedPlank); ModLoader.registerBlock(exaltedSapling); ModLoader.registerBlock(exaltedLeaves); ModLoader.registerBlock(exaltedGround); ModLoader.addName(exaltedLog, "Exalted Log"); ModLoader.addName(exaltedPlank, "Exalted Plank"); ModLoader.addName(exaltedSapling, "Exalted Sapling"); ModLoader.addName(exaltedLeaves, "Exalted Leaves"); ModLoader.addName(exaltedStick, "Exalted Stick"); ModLoader.addName(exaltedGround, "Exalted Ground"); //Evil Side ModLoader.registerBlock(vileLog); ModLoader.registerBlock(vilePlank); ModLoader.registerBlock(vileSapling); ModLoader.registerBlock(vileLeaves); ModLoader.addName(vileLog, "Vile Log"); ModLoader.addName(vilePlank, "Vile Plank"); ModLoader.addName(vileSapling, "Vile Sapling"); ModLoader.addName(vileLeaves, "Vile Leaves"); ModLoader.addName(vileStick, "Vile Stick"); //Recipes //EVIL ModLoader.addRecipe(new ItemStack(mod_TGAEM.vilePlank, 4), new Object []{ "#", Character.valueOf('#'), mod_TGAEM.vileLog }); ModLoader.addRecipe(new ItemStack(mod_TGAEM.vileStick, 4), new Object []{ "#", "#", Character.valueOf('#'), mod_TGAEM.vilePlank }); //GOOD ModLoader.addRecipe(new ItemStack(mod_TGAEM.exaltedPlank, 4), new Object []{ "#", Character.valueOf('#'), mod_TGAEM.exaltedLog }); ModLoader.addRecipe(new ItemStack(mod_TGAEM.exaltedStick, 4), new Object []{ "#", "#", Character.valueOf('#'), mod_TGAEM.exaltedPlank }); ModLoader.addRecipe(new ItemStack(mod_TGAEM.exaltedGround, 4), new Object []{ "#", Character.valueOf('#'), Block.dirt }); } //NEUTRAL public void generateSurface(World world, Random rand, int chunkX, int chunkZ) { for(int i = 0; i < (13); i++) { int randPosX = chunkX + rand.nextInt(16); int randPosY = rand.nextInt(23); int randPosZ = chunkZ + rand.nextInt(16); (new WorldGenMinable(mod_TGAEM.mithrilOre.blockID, 7)).generate(world, rand, randPosX, randPosY, randPosZ); System.out.println("Mithril Ores Generated."); } BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(chunkX, chunkZ); WorldGenVileTrees tree = new WorldGenVileTrees(); if((biome instanceof BiomeGenPlains) || (biome instanceof BiomeGenForest) || (biome instanceof BiomeGenHills) || (biome instanceof BiomeGenDesert) || (biome instanceof BiomeGenSwamp) || (biome instanceof BiomeGenTaiga)) { for(int x = 0; x < 2; x++) { int Xcoord = chunkX + rand.nextInt(16); int Zcoord = chunkZ + rand.nextInt(16); int i = world.getHeightValue(Xcoord, Zcoord); tree.generate(world, rand, Xcoord, i, Zcoord); System.out.println("Vile Trees Generated."); } BiomeGenBase biome1 = world.getWorldChunkManager().getBiomeGenAt(chunkX, chunkZ); WorldGenExaltedTrees tree1 = new WorldGenExaltedTrees(); if((biome1 instanceof BiomeGenPlains) || (biome1 instanceof BiomeGenForest) || (biome1 instanceof BiomeGenHills) || (biome1 instanceof BiomeGenDesert) || (biome1 instanceof BiomeGenSwamp) || (biome1 instanceof BiomeGenTaiga)) { for(int x = 0; x < 2; x++) { int Xcoord = chunkX + rand.nextInt(16); int Zcoord = chunkZ + rand.nextInt(16); int i = world.getHeightValue(Xcoord, Zcoord); tree1.generate(world, rand, Xcoord, i, Zcoord); System.out.println("Exalted Trees Generated."); } } } } public void load() { ModLoader.addBiome(BiomeHallow); } public String getVersion() { return "1.2.5"; } }BlockexaltedGround
package net.minecraft.src; public class BlockexaltedGround extends Block { public BlockexaltedGround(int i, int j) { super(i, j, Material.grass); } public int getBlockTextureFromSideAndMetadata(int i, int j) { return getBlockTextureFromSide(i); } public int getBlockTextureFromSide(int i) { if (i == 0) { return mod_TGAEM.eGroundbottom; } if (i == 1) { return mod_TGAEM.eGroundtop; } else { return mod_TGAEM.eGroundside; } } }BiomeGenHallow
package net.minecraft.src; import java.util.List; import java.util.Random; public class BiomeGenHallow extends BiomeGenBase { public BiomeGenHallow(int par1) { super(par1); spawnableCreatureList.clear(); topBlock = (byte)mod_TGAEM.exaltedGround.blockID; fillerBlock = (byte)Block.blockSteel.blockID; biomeDecorator.treesPerChunk = 5; biomeDecorator.flowersPerChunk = 4; biomeDecorator.grassPerChunk = 10; } }I believe that the tutorial stated to change the block id of the biome block if minecraft ever crashes but that doesn't work either.
The OP clearly states I'm not taking any requests.
Post the error.
together they are powerful beyond imagination."
2012-07-01 11:43:39 [INFO] Forge Mod Loader has loaded 2 mods Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at cpw.mods.fml.common.modloader.ModLoaderModContainer.preInit(ModLoaderModContainer.java:107) at cpw.mods.fml.common.Loader.preModInit(Loader.java:235) at cpw.mods.fml.common.Loader.loadMods(Loader.java:593) at cpw.mods.fml.client.FMLClientHandler.onPreLoad(FMLClientHandler.java:193) at net.minecraft.client.Minecraft.startGame(Minecraft.java:383) at net.minecraft.client.Minecraft.run(Minecraft.java:735) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at net.minecraft.src.BiomeGenHallow.<init>(BiomeGenHallow.java:12) at net.minecraft.src.mod_TGAEM.<clinit>(mod_TGAEM.java:8) ... 13 morepackage net.minecraft.src; public class mod_Amethyst extends BaseMod { public static final Item amethyst = new Amethyst(5001) .setItemName("amethyst"); public void load() { amethyst.iconIndex = ModLoader.addOverride("/gui/items.png", "/mod/Amethyst.png"); ModLoader.addName(amethyst, "Amethyst"); } public String getVersion() { return "Version 1.2.5"; } }This is for modders. Not people who install mods. You can't just get code and put it in your jar then expect it to work.
You must declare the blocks before the biome.
Are you sure the texture is png? What program did you make it in? A leather hat normally means that the game cannot read the texture.
together they are powerful beyond imagination."
Merge your mod_ classes into one. Put the amethyst stuff inside the other and see if the problem still persists.
together they are powerful beyond imagination."
if (par1Block == Block.bedrock)
{
return toolMaterial.getHarvestLevel() >= 4;
}
I wonder if my harvest level isnt four, but i dont know which parameter sets your harvest level.also, how do I make an item that instead of getting destroyed when you craft with it, gets damaged?