“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Well, seeing as you only want to generate your trees in a specific biome, you could just follow the specific biome generation tutorial in the "Other World Generation" section.
Yeah, but I'm just a tad on the stupid side, so I don't know how I can use it for the likes of what I'm doing. XD
Thanks for the help it fixed everything except theses
My errors
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files (x86)\Java\jdk7\bin\javac" -Xlint:-options -deprecation -g -s
ource 1.6 -target 1.6...' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\telelight.java:5: error: <identifier> expected
public static final telelight new telelight(160,0).setBlockName("telelight").set
Hardness(2F).setResistance(1F).setLightValue(9F) ;
^
src\minecraft\net\minecraft\src\telelight.java:5: error: illegal start of type
public static final telelight new telelight(160,0).setBlockName("telelight").set
Hardness(2F).setResistance(1F).setLightValue(9F) ;
^
src\minecraft\net\minecraft\src\telelight.java:5: error: illegal start of type
public static final telelight new telelight(160,0).setBlockName("telelight").set
Hardness(2F).setResistance(1F).setLightValue(9F) ;
^
src\minecraft\net\minecraft\src\telelight.java:5: error: ';' expected
public static final telelight new telelight(160,0).setBlockName("telelight").set
Hardness(2F).setResistance(1F).setLightValue(9F) ;
^
4 errors
==================
And here is my code
package net.minecraft.src;
public class telelight extends BaseMod
{
public static final telelight new telelight(160,0).setBlockName("telelight").setHardness(2F).setResistance(1F).setLightValue(9F) ;
public void load()
{
telelight.iconIndex = ModLoader.addOverride("/mods/telelighti.png");
telelight.blockIndexInTexture = ModLoader.addOverride("/mods/telelightb.png");
Modloader.addRecipe(new ItemStack(Block.telelight, 8), new Object [] {"###", "#@#", "###", Character.valueOf('#'), Block.obsidian, Character.valueOf('@'), Block.glowStone});
ModLoader.registerBlock(telelight);
ModLoader.addName (telelight, "telelight");
}
public String getVersion()
{
return "1.2.5";
}
}
Thanks for the help it fixed everything except theses
My errors
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files (x86)\Java\jdk7\bin\javac" -Xlint:-options -deprecation -g -s
ource 1.6 -target 1.6...' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\telelight.java:5: error: <identifier> expected
public static final telelight new telelight(160,0).setBlockName("telelight").set
Hardness(2F).setResistance(1F).setLightValue(9F) ;
^
src\minecraft\net\minecraft\src\telelight.java:5: error: illegal start of type
public static final telelight new telelight(160,0).setBlockName("telelight").set
Hardness(2F).setResistance(1F).setLightValue(9F) ;
^
src\minecraft\net\minecraft\src\telelight.java:5: error: illegal start of type
public static final telelight new telelight(160,0).setBlockName("telelight").set
Hardness(2F).setResistance(1F).setLightValue(9F) ;
^
src\minecraft\net\minecraft\src\telelight.java:5: error: ';' expected
public static final telelight new telelight(160,0).setBlockName("telelight").set
Hardness(2F).setResistance(1F).setLightValue(9F) ;
^
4 errors
==================
And here is my code
package net.minecraft.src;
public class telelight extends BaseMod
{
public static final telelight new telelight(160,0).setBlockName("telelight").setHardness(2F).setResistance(1F).setLightValue(9F) ;
public void load()
{
telelight.iconIndex = ModLoader.addOverride("/mods/telelighti.png");
telelight.blockIndexInTexture = ModLoader.addOverride("/mods/telelightb.png");
Modloader.addRecipe(new ItemStack(Block.telelight, 8), new Object [] {"###", "#@#", "###", Character.valueOf('#'), Block.obsidian, Character.valueOf('@'), Block.glowStone});
ModLoader.registerBlock(telelight);
ModLoader.addName (telelight, "telelight");
}
public String getVersion()
{
return "1.2.5";
}
}
It looks like you want a block as well as an item. First off, your block declaration is incorrect. Use this instead:
public static final Block telelight = new telelightBlock(160,0).setBlockName("telelightBlock").setHardness(2F).setResistance(1F).setLightValue(9F) ;
You also need to add declaration for your item as well.
public static final Item telelight = new telelight(123).setItemName("telelight");
If it's too much to get, just use this as your mod class:
package net.minecraft.src;
public class telelight extends BaseMod
{
public static final Block telelightBlock = new telelightBlock(160,0).setBlockName("telelightBlock").setHardness(2F).setResistance(1F).setLightValue(9F);
public static final Item telelightItem = new telelight(123).setItemName("telelightItem");
public void load()
{
telelightItem.iconIndex = ModLoader.addOverride("/mods/telelighti.png");
telelightBlock.blockIndexInTexture = ModLoader.addOverride("/mods/telelightb.png");
Modloader.addRecipe(new ItemStack(telelightBlock, 8), new Object [] {"###", "#@#", "###", Character.valueOf('#'), Block.obsidian, Character.valueOf('@'), Block.glowStone});
ModLoader.registerBlock(telelight);
ModLoader.addName (telelightBlock, "telelight");
ModLoader.addName (telelightItem, "telelight");
}
public String getVersion()
{
return "1.2.5";
}
}[size=medium]
Can you help ? i am doing everything right but the texture of the mob when i test it doesn't come?? and a question does the mob hands and head move? mine is like a statue moving around. pls anyone help
Yes, the normal ModelBiped class should allow the arms and legs to move. Have you got it rendering under another model? You should post your code.
As for the texture, that's rather normal. When you test the client, the texture usually is a rather weird/white texture but is completely fine when you compile your mod and run it on normal minecraft.
Hi! I just got into modding, and your tutorials are VERY helpful but I've had a question.... In some mods, I notice that you have to replace files like vm.class, etc. When would you have to edit files like those, and how do you know when you have to edit them? Thanks in advance, and love your tutorial!
Hi! I just got into modding, and your tutorials are VERY helpful but I've had a question.... In some mods, I notice that you have to replace files like vm.class, etc. When would you have to edit files like those, and how do you know when you have to edit them? Thanks in advance, and love your tutorial!
If a mod has those type of class files in it, it means that the mod has edited the class file. For good mods, you don't try to edit base classes as your mod won't be compatible with other mods that also have edited that class.
But don't worry about them. You should be fine without editing any
I'm having some coding problems, if someone could help me...
Here's the error log:
src\minecraft\net\minecraft\src\mod_DatMod.java:80: error: cannot find symbol
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
^
symbol: class Random
location: class mod_DatMod
src\minecraft\net\minecraft\src\BlockStar.java:18: error: cannot find symbol
if (blockID == Block.StarBlock.blockID)
^
symbol: variable StarBlock
location: class Block
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
And here's the code:
package net.minecraft.src;
public class mod_DatMod extends BaseMod
{
public static final Block RubyOre = new BlockRubyOre(160, 0).setBlockName("rubyore").setHardness(3F).setResistance(5F);
public static final Block SapphireOre = new BlockSapphireOre(161, 0).setBlockName("sapphireore").setHardness(3F).setResistance(5F);
public static final Block EmeraldOre = new BlockEmeraldOre(162, 0).setBlockName("emeraldore").setHardness(3F).setResistance(5F);
public static final Block RubyBlock = new Block(163, 0, Material.iron).setBlockName("rubyblock").setHardness(3F).setResistance(10F);
public static final Block SapphireBlock = new Block(164, 0, Material.iron).setBlockName("sapphireblock").setHardness(3F).setResistance(10F);
public static final Block EmeraldBlock = new Block(165, 0, Material.iron).setBlockName("emeradblock").setHardness(3F).setResistance(10F);
public static final Block CoalBlock = new Block(166, 0, Material.rock).setBlockName("coalblock").setHardness(3F).setResistance(5F);
public static final Block RedstoneBlock = new Block(167, 0, Material.rock).setBlockName("redstoneblock").setHardness(3F).setResistance(5F);
public static final Block StarBlock = new BlockStar(168, 0).setBlockName("starblock").setHardness(60F).setResistance(3000F).setLightValue(1F);
public static final Item Ruby = new Item(960).setItemName("ruby");
public static final Item Sapphire = new Item(961).setItemName("sapphire");
public static final Item Emeraude = new Item(962).setItemName("emeraude");
public static final Item StarPiece = new Item(963).setItemName("starpiece");
public static final Item Star = new Item(964).setItemName("star");
public void load()
{
RubyOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/RubyOre.png");
ModLoader.registerBlock(RubyOre);
ModLoader.addName(RubyOre, "Ruby Ore");
SapphireOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/SapphireOre.png");
ModLoader.registerBlock(SapphireOre);
ModLoader.addName(SapphireOre, "Sapphire Ore");
EmeraldOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/EmeraldOre.png");
ModLoader.registerBlock(EmeraldOre);
ModLoader.addName(EmeraldOre, "Emerald Ore");
RubyBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/RubyBlock.png");
ModLoader.registerBlock(RubyBlock);
ModLoader.addName(RubyBlock, "Block of Ruby");
ModLoader.addRecipe(new ItemStack(RubyBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.dirt});
SapphireBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/SapphireBlock.png");
ModLoader.registerBlock(SapphireBlock);
ModLoader.addName(SapphireBlock, "Block of Sapphire");
ModLoader.addRecipe(new ItemStack(SapphireBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.cobblestone});
EmeraldBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/EmeraldBlock.png");
ModLoader.registerBlock(EmeraldBlock);
ModLoader.addName(EmeraldBlock, "Block of Emerald");
ModLoader.addRecipe(new ItemStack(EmeraldBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.wood});
CoalBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/CoalBlock.png");
ModLoader.registerBlock(CoalBlock);
ModLoader.addName(CoalBlock, "Block of Coal");
ModLoader.addRecipe(new ItemStack(CoalBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.sand});
RedstoneBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/RedstoneBlock.png");
ModLoader.registerBlock(RedstoneBlock);
ModLoader.addName(RedstoneBlock, "Block of Redstone");
ModLoader.addRecipe(new ItemStack(RedstoneBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.sandStone});
StarBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mods/StarMeteor.png");
ModLoader.registerBlock(StarBlock);
ModLoader.addName(StarBlock, "Big Star");
Ruby.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/Ruby.png");
ModLoader.addName(Ruby, "Ruby");
Sapphire.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/Sapphire.png");
ModLoader.addName(Sapphire, "Sapphire");
Emeraude.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/Emerald.png");
ModLoader.addName(Emeraude, "Emerald");
StarPiece.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/StarPiece.png");
ModLoader.addName(StarPiece, "Star Piece");
Star.iconIndex = ModLoader.addOverride("/gui/items.png", "/mods/items/Star.png");
ModLoader.addName(Star, "Star");
ModLoader.addRecipe(new ItemStack(Star, 1), new Object [] {" # ", "# #", "# #", Character.valueOf('#'), Block.flower});
}
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(60);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(RubyOre.blockID, 25)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
public String getVersion()
{
return "1.2.5";
}
}
Some errors might be in other java source files... So...
package net.minecraft.src;
import java.util.Random;
public class BlockRubyOre extends Block
{
public BlockRubyOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_DatMod.Ruby.shiftedIndex;
}
public int quantityDropped(Random random)
{
return 1;
}
}
package net.minecraft.src;
import java.util.Random;
public class BlockSapphireOre extends Block
{
public BlockSapphireOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_DatMod.Sapphire.shiftedIndex;
}
public int quantityDropped(Random random)
{
return 1;
}
}
package net.minecraft.src;
import java.util.Random;
public class BlockEmeraldOre extends Block
{
public BlockEmeraldOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_DatMod.Emeraude.shiftedIndex;
}
public int quantityDropped(Random random)
{
return 1;
}
}
package net.minecraft.src;
import java.util.Random;
public class BlockStar extends Block
{
public BlockStar(int par1, int par2)
{
super(par1, par2, Material.iron);
}
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_DatMod.StarPiece.shiftedIndex;
}
public int quantityDropped(Random par1Random)
{
if (blockID == Block.StarBlock.blockID)
{
return 1 + par1Random.nextInt(2);
}
else
{
return 1;
}
}
}
Note: The post has been modified several times because I was trying to correct most of these mistakes...
...but now I'm unable to correct any mistake. Feel free to help now!
If a mod has those type of class files in it, it means that the mod has edited the class file. For good mods, you don't try to edit base classes as your mod won't be compatible with other mods that also have edited that class.
But don't worry about them. You should be fine without editing any
Help, I was trying to start an explosives mod by first creating a fuse, but I got this:
Mods loaded: 2 ModLoader 1.2.5 mod_fuse 1.2.5
Minecraft has crashed! ----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 2055c871 -------- Generated 7/9/12 9:14 PM
Minecraft: Minecraft 1.2.5 OS: Windows Vista (x86) version 6.0 Java: 1.7.0_05, Oracle Corporation VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation LWJGL: 2.4.2 OpenGL: GeForce 7150M / nForce 630M/PCI/SSE2/3DNOW! version 2.1.1, NVIDIA Corporation
java.lang.ClassCastException: net.minecraft.src.Item cannot be cast to java.lang.Character at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:371) at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:412) at net.minecraft.src.mod_fuse.load(mod_fuse.java:11) at net.minecraft.src.ModLoader.init(ModLoader.java:856) at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157) at net.minecraft.src.RenderManager.<init>(RenderManager.java:85) at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12) at net.minecraft.client.Minecraft.startGame(Minecraft.java:424) at net.minecraft.client.Minecraft.run(Minecraft.java:786) at java.lang.Thread.run(Thread.java:722) --- END ERROR REPORT 1748318c ----------
I did everything in there that concerns custom mob:, but when I run startclient.sh my mob is nowhere to be seen. After exploring almost 20 caves and other places, I decided that I did something wrong. Any ideas?
for your efforts!
I did everything in there that concerns custom mob:, but when I run startclient.sh my mob is nowhere to be seen. After exploring almost 20 caves and other places, I decided that I did something wrong. Any ideas?
for your efforts!
Is it on peaceful? That's one mistake I made when I made a new mob XD
hi, i followed another tut on making a new craftable block. now i want to do it again but modloader compatible. i'm trying to follow your block tut but i'm confused.
i get that mod_xxxx.class is what lets mod loader know to load it and what needs doing but i'm confused as everything in the tut is named "blocknamehere" which tells me nothing.
so im at a lost as to what info i need to enter into the mod_xxxx.class. also do i need my block class i have made?
heres what i got so far:
-mod_glowdirt.class-
package net.minecraft.src;
public class mod_glowdirt extends BaseMod
{
public static final Block lightdirt = new BlockLightdirt(160, 0).setBlockName("anynamehere").setLightValue(1F);
public void load()
{
}
public String getVersion()
{
return "1.2.5";
}
}
and heres my block class i had made previously:
-BlockLightdirt.class-
package net.minecraft.src;
public class BlockLightdirt extends Block
{
protected BlockLightdirt(int par1, int par2)
{
super(par1, par2, Material.ground);
slipperiness = 0.8F;
}
}
hi, i followed another tut on making a new craftable block. now i want to do it again but modloader compatible. i'm trying to follow your block tut but i'm confused.
i get that mod_xxxx.class is what lets mod loader know to load it and what needs doing but i'm confused as everything in the tut is named "blocknamehere" which tells me nothing.
so im at a lost as to what info i need to enter into the mod_xxxx.class. also do i need my block class i have made?
heres what i got so far:
-mod_glowdirt.class-
package net.minecraft.src;
public class mod_glowdirt extends BaseMod
{
public static final Block lightdirt = new BlockLightdirt(160, 0).setBlockName("anynamehere").setLightValue(1F);
public void load()
{
}
public String getVersion()
{
return "1.2.5";
}
}
and heres my block class i had made previously:
-BlockLightdirt.class-
package net.minecraft.src;
public class BlockLightdirt extends Block
{
protected BlockLightdirt(int par1, int par2)
{
super(par1, par2, Material.ground);
slipperiness = 0.8F;
}
}
It looks good so far, now all you need is some minor tweeks and some code in the public void load()
ok. i think i've wrapped my brain around this.
mod_xxxx does the stuff thatd id do in the block.class if i were modifying the source files.
so with my mod_glowdirt.class and my BlockLightdirt.class zipped up together my mod would work.
lol. slipperyness is from the blockice.class supposedly, i should look it back up though as it really didnt work the way it should when i made the mod by modifying the class files.
Here's my Modified mod_glowdirt code:
package net.minecraft.src;
public class mod_glowdirt extends BaseMod
{
public static final Block lightdirt = new BlockLightdirt(125, 48).setHardness(0.5F).setStepSound(soundGravelFootstep).setBlockName("lightdirt").setLightValue(0.9375F);
public void load()
{
ModLoader.registerBlock(lightdirt);
ModLoader.addName(lightdirt, "Glowing Dirt");
ModLoader.addRecipe(new ItemStack(lightdirt, 4), new Object [] {" @ ","@#@"," @ ", Character.valueOf('#'), Block.dirt, Character.valueOf('@'),Item.lightStoneDust});
}
public String getVersion()
{
return "1.2.5";
}
}
tell me if it looks alright
as a side note, do i place theses two files in the minecraft source folder and recompile to get my two classes? i assume so as it makes sense. but i figured i'd ask first.
thanks for the reply.
EDIT: setstepsound doesnt work. i just deleted it. i recompiled and reobf, zipped them and dropped the zip in my mods folder and low and behold it works! just wish i could change the sound as it defaulted to stone. got the slipperiness stat to work too. i didnt have it set high enough. it was set to minecraft 1.7.3's ice value rather then 1.2.5's value which is .98f and not .8f. now to try it in my main world and see what happens when i craft it and harvest it in survival.
Your errors are being caused by these lines:
Go back and look at the tutorial again very closely.
Ok
together they are powerful beyond imagination."
I second that motion! This must be pinned!
All for say "Aye!" All against say "Nay!"
Kill two stones with one bird whenever possible
My errors
And here is my code
As for the texture, that's rather normal. When you test the client, the texture usually is a rather weird/white texture but is completely fine when you compile your mod and run it on normal minecraft.
Hope I helped
But don't worry about them. You should be fine without editing any
Thanks for the help.
yes, i am trying to make my own swords mod, but I don't plan on releasing it to be downloaded, lol.
Here's the error log:
Note: The post has been modified several times because I was trying to correct most of these mistakes...
...but now I'm unable to correct any mistake. Feel free to help now!
!!!!! !!!!!
Thanks for the reply!
ModLoader 1.2.5
mod_fuse 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 2055c871 --------
Generated 7/9/12 9:14 PM
Minecraft: Minecraft 1.2.5
OS: Windows Vista (x86) version 6.0
Java: 1.7.0_05, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce 7150M / nForce 630M/PCI/SSE2/3DNOW! version 2.1.1, NVIDIA Corporation
java.lang.ClassCastException: net.minecraft.src.Item cannot be cast to java.lang.Character
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:371)
at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:412)
at net.minecraft.src.mod_fuse.load(mod_fuse.java:11)
at net.minecraft.src.ModLoader.init(ModLoader.java:856)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 1748318c ----------
for your efforts!
It's basicky what you had but you missed a bracket. If you still get heaps of other errors, post your code.
Is it on peaceful? That's one mistake I made when I made a new mob XD
If it's still not spawning, post your code.
i get that mod_xxxx.class is what lets mod loader know to load it and what needs doing but i'm confused as everything in the tut is named "blocknamehere" which tells me nothing.
so im at a lost as to what info i need to enter into the mod_xxxx.class. also do i need my block class i have made?
heres what i got so far:
That goes in the public void load(). You also need to change .setBlockName("anynamehere") to .setBlockName("lightdirt")
If you've done all of that, you should be all good.
Though I haven't seen the slipperiness variable before...
mod_xxxx does the stuff thatd id do in the block.class if i were modifying the source files.
so with my mod_glowdirt.class and my BlockLightdirt.class zipped up together my mod would work.
lol. slipperyness is from the blockice.class supposedly, i should look it back up though as it really didnt work the way it should when i made the mod by modifying the class files.
Here's my Modified mod_glowdirt code:
as a side note, do i place theses two files in the minecraft source folder and recompile to get my two classes? i assume so as it makes sense. but i figured i'd ask first.
thanks for the reply.
EDIT: setstepsound doesnt work. i just deleted it. i recompiled and reobf, zipped them and dropped the zip in my mods folder and low and behold it works! just wish i could change the sound as it defaulted to stone. got the slipperiness stat to work too. i didnt have it set high enough. it was set to minecraft 1.7.3's ice value rather then 1.2.5's value which is .98f and not .8f. now to try it in my main world and see what happens when i craft it and harvest it in survival.