may i suggest that you should also throw in little things about java its self every here and there so that we could eventualy go beyond your tutorials and to the true part of infinite possibilites.
Thanks for doing all these videos . However, I've been trying to do your tutorials, and I tried to make a mod (mod_Mysterium), and a block (BlockMysterium), and when I decompile, code, recompile, and test, I get no errors. However, I've been looking around about 4 worlds in 'all' biomes, and I can't find my block. My source code is (I'm on Minecraft 1.2.5):
mod_Mysterium
package net.minecraft.src;
import java.util.Random;
public class mod_Myterium extends BaseMod {
public static final Block mysterium = new BlockMysterium(180, 0).setHardness(1F).setLightValue(20.0F).setBlockName("mysterium");
public mod_Myterium() {
ModLoader.registerBlock(mysterium);
ModLoader.addName(mysterium, "Mysterium");
mysterium.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/customBlock.png");
}
public void GenerateSurface(World world, Random rand, int baseX, int baseZ) {
for(int x = 0; x < 100; x++)
{
int Xcoord = baseX + rand.nextInt(16);
int Zcoord = baseZ + rand.nextInt(16);
int Ycoord = rand.nextInt(35);
(new WorldGenMinable(mysterium.blockID, 35)).generate(world, rand, Xcoord, Ycoord, Zcoord);
}
}
@Override
public String getVersion() {
return "1.2.5";
}
@Override
public void load() {
}
}
BlockMysterium
package net.minecraft.src;
import java.util.Random;
public class BlockMysterium extends Block {
protected BlockMysterium(int x, int y){
super(x,y, Material.rock);
}
public int idDropped(int x, Random rand, int y) {
return mod_Myterium.mysterium.blockID;
}
public int quantityDropped(Random rand) {
return 1;
}
}
Sorry if someone has already answered this, I couldn't find any answers . Thanks for any solutions !
Thanks for doing all these videos . However, I've been trying to do your tutorials, and I tried to make a mod (mod_Mysterium), and a block (BlockMysterium), and when I decompile, code, recompile, and test, I get no errors. However, I've been looking around about 4 worlds in 'all' biomes, and I can't find my block. My source code is (I'm on Minecraft 1.2.5):
mod_Mysterium
package net.minecraft.src;
import java.util.Random;
public class mod_Myterium extends BaseMod {
public static final Block mysterium = new BlockMysterium(180, 0).setHardness(1F).setLightValue(20.0F).setBlockName("mysterium");
public mod_Myterium() {
ModLoader.registerBlock(mysterium);
ModLoader.addName(mysterium, "Mysterium");
mysterium.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/customBlock.png");
}
public void GenerateSurface(World world, Random rand, int baseX, int baseZ) {
for(int x = 0; x < 100; x++)
{
int Xcoord = baseX + rand.nextInt(16);
int Zcoord = baseZ + rand.nextInt(16);
int Ycoord = rand.nextInt(35);
(new WorldGenMinable(mysterium.blockID, 35)).generate(world, rand, Xcoord, Ycoord, Zcoord);
}
}
@Override
public String getVersion() {
return "1.2.5";
}
@Override
public void load() {
}
}
BlockMysterium
package net.minecraft.src;
import java.util.Random;
public class BlockMysterium extends Block {
protected BlockMysterium(int x, int y){
super(x,y, Material.rock);
}
public int idDropped(int x, Random rand, int y) {
return mod_Myterium.mysterium.blockID;
}
public int quantityDropped(Random rand) {
return 1;
}
}
Sorry if someone has already answered this, I couldn't find any answers . Thanks for any solutions !
you need to change "GenerateSurface" to "generateSurface" and fwi you generated WAY many blocks turn the 100 to like 20 maybe 10 it will still be very easy to find if you don't it will take AGES to generate...
you need to change "GenerateSurface" to "generateSurface" and fwi you generated WAY many blocks turn the 100 to like 20 maybe 10 it will still be very easy to find if you don't it will take AGES to generate...
Thanks for this solution! Now, it works!
However, now I have one more question. I changed the number of generated blocks from 100 to 10, but when I try to recompile and start the client, it takes forever to generate a world, and I get tons of lag spikes when playing. Is there a way to fix this?
However, now I have one more question. I changed the number of generated blocks from 100 to 10, but when I try to recompile and start the client, it takes forever to generate a world, and I get tons of lag spikes when playing. Is there a way to fix this?
Hey x2Robbie2x could you please make a tutorial on how to add special effects to armor.
Like Fire Immunity(Fire Resistance), Infinity Water Breathing...
I would like this for minecraft 1.3.1, and for SP.
Thank you
Please hit the "Vote this Post up" if you want it to! ----->
I saw that half blocks were on your to-do list. I'm really hoping that after you finish your tutorial or tutorials about modAPI that you could do a short briefing on directional custom block models.
im trying to figure out a method that i can put a zoom code for the item in, i know its some sort of gl code, and since you have the zoom by keybind on your to do list im wondering if you have any ideas? my keybind works perfect except for the zoom(which is multi zoom)
Hey I have a problem whenever I try to load some method from other class like EntityPlayer.addChatMessage("Who Dares?"); I get Cannot make a static reference to the non-static method addChatMessage(String) from the type EntityPlayer
That's not a minecraft thing, that's just basic Java.
addChatMessage is obviously a static method.
You can't do Class.staticMethod(). You have to do Object.staticMethod().
In other words, you need to find the specific player's name.
It makes sense, really. Imagine that you're playing on a MP server. Do messages always pop up for every player?
I'm making a mod that involves granite, and since granite takes longer time to cool than obsidian, i was going to make it so after 10 minutes obsidian would change into granite. Anyone know how I could code this?
Hello, I'm making a custom NPC named "Cobalt Miner" and the code has updated since the video on how to make a custom NPC but I've updated it correctly. My problem is minecraft won't even load and It says this - vvvvvv
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:404)
at net.minecraft.client.Minecraft.run(Minecraft.java:724)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.RenderManager.<init>(RenderManager.java:92)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
... 3 more
Someone is closing me!
Where is says "...3 more" It would help if it said what and where the other 3 errors were, But it obviously has something to do with RenderManager. If anybody could help me, that would be awesome. If you need any more like the Entity for the NPC or the Render for the NPC I will be more than happy to supply that.
Thanks, Jared
on the constructer of the item stack
new ItemStack(Item.coal, 1, 1) the 3rd numbers is the damage value
new ItemStack(Item.coal, 1, 1)
So I tried doing that and no work. Also I don't think that part where it says coal is the constructor.
do this
new ItemStack(Item.coal, 1, 1).itemId as the last parameter
Saltpeter, Sulfur, new ItemStack(Item.coal,1,10.itemId
});
might be spelled wrong
for you!!!
mod_Mysterium
BlockMysterium
Sorry if someone has already answered this, I couldn't find any answers . Thanks for any solutions !
you need to change "GenerateSurface" to
"generateSurface" and fwi you generated WAY many blocks turn the 100 to like 20 maybe 10 it will still be very easy to find if you don't it will take AGES to generate...
Thanks for this solution! Now, it works!
However, now I have one more question. I changed the number of generated blocks from 100 to 10, but when I try to recompile and start the client, it takes forever to generate a world, and I get tons of lag spikes when playing. Is there a way to fix this?
i quess even 10 is too much try even lower
What I have now is fine, thanks for the solution. (Sorry if this post is too small to be 'worthy' to be posted )
Like Fire Immunity(Fire Resistance), Infinity Water Breathing...
I would like this for minecraft 1.3.1, and for SP.
Thank you
Please hit the "Vote this Post up" if you want it to! ----->
That's not a minecraft thing, that's just basic Java.
addChatMessage is obviously a static method.
You can't do Class.staticMethod(). You have to do Object.staticMethod().
In other words, you need to find the specific player's name.
It makes sense, really. Imagine that you're playing on a MP server. Do messages always pop up for every player?
Where is says "...3 more" It would help if it said what and where the other 3 errors were, But it obviously has something to do with RenderManager. If anybody could help me, that would be awesome. If you need any more like the Entity for the NPC or the Render for the NPC I will be more than happy to supply that.
Thanks, Jared