The comments will explain what to change and what not
public int tickRate()
{
//How often it refreshes. If you return 20, that's one second.
return 1;
}
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
{
if(l > 0 && Block.blocksList[l].canProvidePower())
{
//Which direction the power can come from, i is the x coord, j is y, and k is z.
boolean flag = world.isBlockIndirectlyGettingPowered(i, j, k) || world.isBlockIndirectlyGettingPowered(i, j - 1, k);
if(flag)
{
world.scheduleBlockUpdate(i, j, k, blockID, tickRate());
}
}
}
public void updateTick(World world, int i, int j, int k, Random random)
{
if(world.isBlockIndirectlyGettingPowered(i, j, k) || world.isBlockIndirectlyGettingPowered(i, j - 1, k))
{
//Whatever you put here is what happens when it's powered
}
}
Hey Muserae, I am glad to see you back in action. I too have been busy with other things, but the large biomes in the pre-release has me excited about MC again and so I have returned to attempt modding again.
I will personally go through the tutorials over the holiday weekend to test them for you so you know what needs to be updated.
Just off the cuff, I did notice that you don't yet have any mods concerning mobs yet. Perhaps that is a direction to go in if you are looking for more material to tutorial on. Or alternatively, a lengthy one on creating custom Biomes and how to spawn them in to world generation would be welcome as well.
I forgot about biomes
Those are fairly easy, only thing I'll have to figure out is how to add custom tree type gens and whatnot.
Mobs, I will eventually go over how to make the model, in little detail. (basically how to get Techne and add new blocks, set up texture, etc)
As I don't know anything about AI, I can't do anything on that unless I figure anything out. The reason why I haven't done mobs is because in 1.8.1 the mob spawn system was messed up, and I think it's still broken.
Teche isn't hard to figure out at all! The most difficult part to figure out for myself with it was that the lil spheres were the pivot points for movement. Didn't use a tutorial or anything. But, in hind sight, I'm sure there would have been a LOT less editting of the file if I had used one. Such as knowing that I need to move the skin offset so they don't ALL overlap =P. Unfortunately the newest version of Teche removed what little animation it provided, so I AM looking for a tutorial for how to animate a model once made.
If you ever do get to mobs, I suggest a duck. That way you can use the chicken model with a new skin. A chicken that doesn't drown in water, there's a thought!
Back to biomes, things I would like to know off the top of my head but haven't looked up yet: how to make particular plants spawn in new biomes, how to get particular mobs to spawn in the new biomes, and how to get new blocks to spawn in them.
I'm trying to make a ore that can only be mined by diamond. Can you tell me how to do that? I have everything else in it like the generation, items, tools, armour and bow. But i want it to be really hard to get and only be mined with a diamond pickaxe. Could you help me?
If I remember right, you change the material to something like whatever obsidian is. material.rock makes so you need any pickaxe for example, iron makes a stone pick+ needed
--- BEGIN ERROR REPORT cb88c802 --------
Generated 5/27/12 4:05 PM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_04, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 5700 Series version 4.1.10750 Compatibility Profile Context, ATI Technologies Inc.
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 ModLoader.addMod(ModLoader.java:294)
at ModLoader.readFromClassPath(ModLoader.java:1210)
at ModLoader.init(ModLoader.java:886)
at ModLoader.addAllRenderers(ModLoader.java:189)
at ahu.<init>(ahu.java:77)
at ahu.<clinit>(ahu.java:8)
at net.minecraft.client.Minecraft.a(SourceFile:273)
at net.minecraft.client.Minecraft.run(SourceFile:657)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: qk cannot be cast to BlockCaldori
at mod_Vegetation.<clinit>(mod_Vegetation.java:36)
... 15 more
--- END ERROR REPORT 3dde8dd ----------
hey, i used your Block Generation tut but for some reason with the texture and all in the bin/minecraft folder. it wont generate. it says it got the texture and i made it quite common and explored for a while. it just wont generate. any help?
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i=0; i < 500; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(25);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(EnderOre.blockID, 70)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public static final BlockCaldori caldori = (BlockCaldori) (new BlockCaldori(234, ModLoader.addOverride("/terrain.png", "/Vegetation/caldori.png"))).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setBlockName("caldori");
public static final BlockCaldori caldori = (BlockCaldori) (new BlockCaldori(234, ModLoader.addOverride("/terrain.png", "/Vegetation/caldori.png"))).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setBlockName("caldori");
public static final BlockCaldori caldori = (new BlockCaldori(234, ModLoader.addOverride("/terrain.png", "/Vegetation/caldori.png"))).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setBlockName("caldori");
And error:
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.6.0_26\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_Vegetation.java:36: cannot find symbol
symbol : constructor BlockCaldori(int,int)
location: class net.minecraft.src.BlockCaldori
public static final BlockCaldori caldori = (new BlockCaldori(234, ModLoa
der.addOverride("/terrain.png", "/Vegetation/caldori.png"))).setHardness(0.0F).s
etStepSound(Block.soundGrassFootstep).setBlockName("caldori");
^
1 error
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
Normally I can handle errors, but these are ones I have never seen before. They changed flower coding a lot since I made some in 1.8 :/
Also it doesn't work if I change = (new BlockCaldori(...
to = (new BlockFlower(...
i guess ill try putting it in the block file itself or maybe even if its in the mod_ file ill try adding mod_ to the generation code. maybe itll work. if it does, ill be sure to let you know this and x2robbie2x are two of my fav modding tutorials
Following your tutorials verbatium, I do not think they can be used anymore without some updating. I'm running into multiple "cannot find symbol symbol" errors for both new items and new blocks. Here is the error printout.
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_ElysOres.java:18: cannot find symbol
symbol : method AddName(net.minecraft.src.Item,java.lang.String)
location: class net.minecraft.src.ModLoader
ModLoader.AddName(copperingot, "Copper Ingot");
^
src\minecraft\net\minecraft\src\mod_ElysOres.java:32: cannot find symbol
symbol : method AddRecipe(net.minecraft.src.ItemStack,java.lang.Object[])
location: class net.minecraft.src.ModLoader
ModLoader.AddRecipe(new ItemStack(copperingot, 1), new O
bject[] {
^
src\minecraft\net\minecraft\src\mod_ElysOres.java:45: cannot find symbol
symbol : method newItemCopperingot(int)
location: class net.minecraft.src.mod_ElysOres
copperingot = (newItemCopperingot(1000)).setItemName("co
pperingot");
^
3 errors
==================
I went over my typing several times and went so far as to copy paste your template, but I can't rectify them. I used a fresh install of MC with only Modloader installed.
There is always the possibility of an incredibly stupid mistake on my part as well.
Following your tutorials verbatium, I do not think they can be used anymore without some updating. I'm running into multiple "cannot find symbol symbol" errors for both new items and new blocks. Here is the error printout.
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_ElysOres.java:18: cannot find symbol
symbol : method AddName(net.minecraft.src.Item,java.lang.String)
location: class net.minecraft.src.ModLoader
ModLoader.AddName(copperingot, "Copper Ingot");
^
src\minecraft\net\minecraft\src\mod_ElysOres.java:32: cannot find symbol
symbol : method AddRecipe(net.minecraft.src.ItemStack,java.lang.Object[])
location: class net.minecraft.src.ModLoader
ModLoader.AddRecipe(new ItemStack(copperingot, 1), new O
bject[] {
^
src\minecraft\net\minecraft\src\mod_ElysOres.java:45: cannot find symbol
symbol : method newItemCopperingot(int)
location: class net.minecraft.src.mod_ElysOres
copperingot = (newItemCopperingot(1000)).setItemName("co
pperingot");
^
3 errors
==================
I went over my typing several times and went so far as to copy paste your template, but I can't rectify them.
Simple fix, modloader changed the way it uses methods, so change AddRecipe to addRecipe, AddName to addName, and I think the last one is newitemCopperingot instead of newItemcopperingot
Simple fix, modloader changed the way it uses methods, so change AddRecipe to addRecipe, AddName to addName, and I think the last one is newitemCopperingot instead of newItemcopperingot
That DID fix the first two errors. As for the third, I played with it for a bit, and it should be new ItemCopperingot, instead of newItemCopperingot. So there you go Muserae! Update the methods in your template and you'll be all set for the first few. I'll keep testing these later tonight.
Be sure to check out my texture pack: Easy Ores!
I will personally go through the tutorials over the holiday weekend to test them for you so you know what needs to be updated.
Just off the cuff, I did notice that you don't yet have any mods concerning mobs yet. Perhaps that is a direction to go in if you are looking for more material to tutorial on. Or alternatively, a lengthy one on creating custom Biomes and how to spawn them in to world generation would be welcome as well.
I forgot about biomes
Those are fairly easy, only thing I'll have to figure out is how to add custom tree type gens and whatnot.
Mobs, I will eventually go over how to make the model, in little detail. (basically how to get Techne and add new blocks, set up texture, etc)
As I don't know anything about AI, I can't do anything on that unless I figure anything out. The reason why I haven't done mobs is because in 1.8.1 the mob spawn system was messed up, and I think it's still broken.
If you ever do get to mobs, I suggest a duck. That way you can use the chicken model with a new skin. A chicken that doesn't drown in water, there's a thought!
Back to biomes, things I would like to know off the top of my head but haven't looked up yet: how to make particular plants spawn in new biomes, how to get particular mobs to spawn in the new biomes, and how to get new blocks to spawn in them.
If I remember right, you change the material to something like whatever obsidian is. material.rock makes so you need any pickaxe for example, iron makes a stone pick+ needed
And here is my BlockCaldori.java
Also, here is my mod_ for caldori (I cut the other parts out
change setTickOnLoad(true); in the Block class to
setTickRandomly(true);
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i=0; i < 500; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(25);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(EnderOre.blockID, 70)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
Try changing the number I have quoted to higher. By it being 25, it can only spawn in Y 25 and lower
Can I see line 36 of mod_Vegetation?
I need to make something like this eventually. Once I make that (which might not be for a long time) then I'll make a tutorial on it.
ive tried it being as high as 75 or 65 but it still wont work
Get rid of (BlockCaldori)
Idk then, it should be working
Code:
And error:
Normally I can handle errors, but these are ones I have never seen before. They changed flower coding a lot since I made some in 1.8 :/
Also it doesn't work if I change = (new BlockCaldori(...
to = (new BlockFlower(...
i guess ill try putting it in the block file itself or maybe even if its in the mod_ file ill try adding mod_ to the generation code. maybe itll work. if it does, ill be sure to let you know this and x2robbie2x are two of my fav modding tutorials
Following your tutorials verbatium, I do not think they can be used anymore without some updating. I'm running into multiple "cannot find symbol symbol" errors for both new items and new blocks. Here is the error printout.
I went over my typing several times and went so far as to copy paste your template, but I can't rectify them. I used a fresh install of MC with only Modloader installed.
There is always the possibility of an incredibly stupid mistake on my part as well.
Simple fix, modloader changed the way it uses methods, so change AddRecipe to addRecipe, AddName to addName, and I think the last one is newitemCopperingot instead of newItemcopperingot
That DID fix the first two errors. As for the third, I played with it for a bit, and it should be new ItemCopperingot, instead of newItemCopperingot. So there you go Muserae! Update the methods in your template and you'll be all set for the first few. I'll keep testing these later tonight.