2.Where do i put all those codes you wrote in the mod_soupitem.java or w/e
3. how do i get "basemod"
4. why does it have to extend "basemod"
5. how do i enable modloader.
6. why do we need three files for one item.
7. how do i make a block with modloader.
thats all i have... alot huh? thats because the tut made little to no sense to me :/
1.Basemod is a class file.Its name is pretty much what it is. Its the BASE for a mod. Im not sure there is a clearer way to explain that
2.Use a problem like NotePad ++, Create a new file called mod_soupitem.java.
3.Run EnableModloader.bat ONCE, twice will cause you to have you to Clean up and decompile again
4.Explained in 1
5.Explained in 3
6.Well. Its not alot when you add more items because look at this
mod_****.java is the control centre of your mod
ItemSoupItem or w/e it is the Item
If your adding a item that only is used to craft, like u cant eat it, you cant throw it, its not a sword ETC, then you dont need another java file
7. :ohmy.gif: . Tutorials should make sense!
i dont mean to be mean buuut... i still dont understand it at all. I still dont quite get why i need to extend basemod. I dont get how to even make items anymore :/. Trying to make it compatible ruined my block's and items that already existed and made me recode it :/ and when i finaly compiled it with no errors it crashed minecraft. Also i still have no clue where to place all the errr things he told us to paste in the .java file. I tried to paste them there but it caused errors. I still dont get why we need so many files. when i tried to run the thing to make modloader compatible it didnt even create a basemod file. afterwards i searched my computer and the words "basemod" werent in it anywhere. so basicly i am completly and utterly confused. Despite multiple tutorials (UGH each one said a COMPLETLY different thing...) many explainings and many tests i still cant quite get this.
2.Where do i put all those codes you wrote in the mod_soupitem.java or w/e
3. how do i get "basemod"
4. why does it have to extend "basemod"
5. how do i enable modloader.
6. why do we need three files for one item.
7. how do i make a block with modloader.
thats all i have... alot huh? thats because the tut made little to no sense to me :/
1.Basemod is a class file.Its name is pretty much what it is. Its the BASE for a mod. Im not sure there is a clearer way to explain that
2.Use a problem like NotePad ++, Create a new file called mod_soupitem.java.
3.Run EnableModloader.bat ONCE, twice will cause you to have you to Clean up and decompile again
4.Explained in 1
5.Explained in 3
6.Well. Its not alot when you add more items because look at this
mod_****.java is the control centre of your mod
ItemSoupItem or w/e it is the Item
If your adding a item that only is used to craft, like u cant eat it, you cant throw it, its not a sword ETC, then you dont need another java file
7. :ohmy.gif: . Tutorials should make sense!
i dont mean to be mean buuut... i still dont understand it at all. I still dont quite get why i need to extend basemod. I dont get how to even make items anymore :/. Trying to make it compatible ruined my block's and items that already existed and made me recode it :/ and when i finaly compiled it with no errors it crashed minecraft. Also i still have no clue where to place all the errr things he told us to paste in the .java file. I tried to paste them there but it caused errors. I still dont get why we need so many files. when i tried to run the thing to make modloader compatible it didnt even create a basemod file. afterwards i searched my computer and the words "basemod" werent in it anywhere. so basicly i am completly and utterly confused. Despite multiple tutorials (UGH each one said a COMPLETLY different thing...) many explainings and many tests i still cant quite get this.
i really suggest you go learn some java. First of all if you dont know why you need to extend a class well that means you dont know java and second nobody can help if you dont post your errors. So please read some tutorials. Im not trolling im just saying these are basic concepts of java that you need to know if you want to mod.
I'm making an add on for minecraft but i cant seam to get MC to load my own sound effects. my effects are .ogg and should work but whenever i call them they don't play.
my effect neweffect.ogg is in the the folder resources/newsound/random.
any help getting minecraft to play my effects would be appreciated. oh and i'm not using mod loader i haven't figured out how to make that work yet, i'm going to get a better understanding of editing the plain class files first.
Part 2.
can someone please help me with getting custom blocks and items to have a name when you hover over them in your inventory. iv tried a few things but cant seam to make it work. as i said previously, i'm not using mod loader and i don't plan too just yet. i have some knowledge of Java but iv only just started using it. i do however have several years programing experience with other languages and i'm a quick study.
I'm making an add on for minecraft but i cant seam to get MC to load my own sound effects. my effects are .ogg and should work but whenever i call them they don't play.
my effect neweffect.ogg is in the the folder resources/newsound/random.
any help getting minecraft to play my effects would be appreciated. oh and i'm not using mod loader i haven't figured out how to make that work yet, i'm going to get a better understanding of editing the plain class files first.
Part 2.
can someone please help me with getting custom blocks and items to have a name when you hover over them in your inventory. iv tried a few things but cant seam to make it work. as i said previously, i'm not using mod loader and i don't plan too just yet. i have some knowledge of Java but iv only just started using it. i do however have several years programing experience with other languages and i'm a quick study.
thanks for you time and any help would be great
It's best to start with modloader because that with the names is done in 5 seconds with modloader and like 1 hour if you don't know the files. and you need audiomod installed to let custom sounds working.
audio mod doesnt agree with test_game.bat and also i have tried useing audio mod but where do i call the sounds from and where do i save the files?
2.Where do i put all those codes you wrote in the mod_soupitem.java or w/e
3. how do i get "basemod"
4. why does it have to extend "basemod"
5. how do i enable modloader.
6. why do we need three files for one item.
7. how do i make a block with modloader.
thats all i have... alot huh? thats because the tut made little to no sense to me :/
This tutorial is ment to be for people that know a bit of java and modding in mincraft.
I started modding in minecraft with absolutely 0% java knowledge.
Follow some tutorials on youtube made by thenewboston:
that's the first one.
Quote from X057wind »
Quote from Gidding »
It's best to start with modloader because that with the names is done in 5 seconds with modloader and like 1 hour if you don't know the files. and you need audiomod installed to let custom sounds working.
audio mod doesnt agree with test_game.bat and also i have tried useing audio mod but where do i call the sounds from and where do i save the files?
Don't install audiomod in mcp! just install it in your client. and put your sounds in a map called mod in that map put a map called sounds and in that map put your effects or whatever.[/quote]
Nice tutorials. Can anyone help me how to make some basic block to be power source (like redstone torch)? I studied other classes but cant get it wotking. Thanks for your help and sorry for bad English.
You need to implement at least these two methods for "power" to work:
public boolean canProvidePower()
public boolean isPoweringTo(IBlockAccess iblockaccess, int i, int j, int k, int l)
Hey everyone, I just decided to start a youtube series on Minecraft modding and for the first video I decided to write an SPC plugin (because they are new).
Check out the video (best viewed in 480p+):
Demo of the mod is towards the end of the video.
And the download link: Link Removed
I was wondering if these sorts of videos would be useful for tutorials or seeing what mods I'm making? Is anyone interested in this? If so, what should I do in up coming videos?
if it means anything to anyone i figured out how to change the render color of redstone
its in RenderBlocks.java at about line 791, the part your looking for is
tessellator.setColorOpaque_F
theres a bracket on the end and to change the color just change the values accordingly
tessellator.setColorOpaque_F(f * f2, f * f3, f * f4); ***for Red
tessellator.setColorOpaque_F(f * f3, f * f2, f * f4); ***for Green
tessellator.setColorOpaque_F(f * f4, f * f3, f * f2); ***for Blue
EDIT:
more redstone wire texture colors
tessellator.setColorOpaque_F(f * f2, f * f2, f * f4); ***Yellow
tessellator.setColorOpaque_F(f * f3, f * f2, f * f2); ***Sky Blue
tessellator.setColorOpaque_F(f * f2, f * f3, f * f2); ***Purple
EDIT 2:
more
tessellator.setColorOpaque_F(f * f2, f * f2, f * f2); ***White
tessellator.setColorOpaque_F(f * f2, f * f2*0.5F, f * f2*0.16F); ***Orange
tessellator.setColorOpaque_F(f * f2, f * f2*0.5F, f * f2); ***Pink.... although i dread it
its as simple as finding your RGB color and multiplying in the right numbers. you can use f*f2 in all 3 then multiply it buy how much of that color you want
the 2 represents the dominant color
oh and by the way my previous problems havent been solved if anyone wants to read my earlier post any help is appreciated
Im trying to make a new ore called Naquadah (Nh). I coppied your code and placed it in the right place, but i keep getting an error when i run test_game.bat
*** Minecraft Coder Pack Version 2.9 ***
Exception in thread "main" java.lang.ExceptionInInitializerError
at net.minecraft.src.Session.<clinit>(Session.java:27)
at net.minecraft.client.Minecraft.startMainThread(Minecraft.java:1513)
at net.minecraft.client.Minecraft.func_6269_a(Minecraft.java:1493)
at net.minecraft.client.Minecraft.main(Minecraft.java:1551)
at Start.main(Start.java:26)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 466
at net.minecraft.src.Block.<init>(Block.java:17)
at net.minecraft.src.Block.<init>(Block.java:36)
at net.minecraft.src.BlockNhOre.<init>(BlockNhOre.java:9)
at net.minecraft.src.Block.<clinit>(Block.java:740)
... 5 more
It compiles fine, and theres no '^' in the log, im wondering if its my code.
BlockNhOre.java:
package net.minecraft.src;
import java.util.Random;
public class BlockNhOre extends Block
{
public BlockNhOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
return 0;
}
}
Block.java:
public static final Block orenh;
orenh = (new BlockNhOre(466, 38)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("naquadah");
Incase your wondering, i edited the terrain.png to ad the skin for the block (38)
If you can help, please do!
Thankyou in advance
Your blockid is way to high. It needs to be at 127 or lower or 256 or lower with blockids +
Quote from pwned »
Quote from SuperMarioBros »
Quote from blahthing »
1.Basemod is a class file.Its name is pretty much what it is. Its the BASE for a mod. Im not sure there is a clearer way to explain that
2.Use a problem like NotePad ++, Create a new file called mod_soupitem.java.
3.Run EnableModloader.bat ONCE, twice will cause you to have you to Clean up and decompile again
4.Explained in 1
5.Explained in 3
6.Well. Its not alot when you add more items because look at this
mod_****.java is the control centre of your mod
ItemSoupItem or w/e it is the Item
If your adding a item that only is used to craft, like u cant eat it, you cant throw it, its not a sword ETC, then you dont need another java file
7. :ohmy.gif: . Tutorials should make sense!
i dont mean to be mean buuut... i still dont understand it at all. I still dont quite get why i need to extend basemod. I dont get how to even make items anymore :/. Trying to make it compatible ruined my block's and items that already existed and made me recode it :/ and when i finaly compiled it with no errors it crashed minecraft. Also i still have no clue where to place all the errr things he told us to paste in the .java file. I tried to paste them there but it caused errors. I still dont get why we need so many files. when i tried to run the thing to make modloader compatible it didnt even create a basemod file. afterwards i searched my computer and the words "basemod" werent in it anywhere. so basicly i am completly and utterly confused. Despite multiple tutorials (UGH each one said a COMPLETLY different thing...) many explainings and many tests i still cant quite get this.
i really suggest you go learn some java. First of all if you dont know why you need to extend a class well that means you dont know java and second nobody can help if you dont post your errors. So please read some tutorials. Im not trolling im just saying these are basic concepts of java that you need to know if you want to mod.
I would suggest you read java tutorials to. And to explain your question basemod contains all the methods modloader will call and has the same use as the block class.
Thanks man, never thought it would be the block id.
Now im stuck on the world generation.
*** Minecraft Coder Pack Version 2.9 ***
MCP 2.9 running in C:\Users\Mrs Hamill\Desktop\Minecraft\Naquadah Mod
Compiling Minecraft
sources\minecraft\net\minecraft\src\ChunkProviderGenerate.java:562: cannot find
symbol
symbol : constructor WorldGenNh(int)
location: class net.minecraft.src.WorldGenNh
(new WorldGenNh(Block.NhOre.blockID)).generate(worldObj, rand, k20, i22, i23);
^
1 error
*** minecraft_server.jar was not found, skipping
=== MCP 2.9 recompile script finished ===
Press any key to continue . . .
Again, i have tried looking for a resolution, but i can't find one.
This is the code for the world gen:
package net.minecraft.src;
import java.util.Random;
public class WorldGenNh extends WorldGenerator
{
public WorldGenNh()
{
}
public boolean generate(World world, Random random, int i, int j, int k)
{
// Gives this a 1 in 10 chance of generating
if (random.nextInt(10) == 0)
{
// Loops 64 times, this could create up to 64 TNT
for (int z = 0; z < 128; z++)
{
int i1 = i + random.nextInt(8) - random.nextInt(8);
int j1 = j + random.nextInt(8) - random.nextInt(8);
int k1 = k + random.nextInt(8) - random.nextInt(8);
// Checks that there is nothing in the current location and there is grass beneath.
if(world.getBlockId(i1, j1, k1) == 0 && world.getBlockId(i1, j1 - 1, k1) == Block.grass.blockID && Block.NhOre.canPlaceBlockAt(world, i1, j1, k1))
{
world.setBlockAndMetadata(i1, j1, k1, Block.NhOre.blockID, random.nextInt(4));
}
}
}
}
}
And for chunc provider generate:
for(int l17 = 0; l17 < 20; l17++)
{
int k20 = k + rand.nextInt(16) + 8;
int i22 = rand.nextInt(rand.nextInt(rand.nextInt(112) + 8) + 8);
int i23 = l + rand.nextInt(16) + 8;
(new WorldGenNh(Block.NhOre.blockID)).generate(worldObj, rand, k20, i22, i23);
}
I tried compiling without the for loop, but it came up with more errors than if i compiled it in this state.
Thanks for your help in advance.
ok try changing this (new WorldGenNh(Block.NhOre.blockID)) to (new WorldGenNh()) and if that doesnt work in your
WorldGenNh file change
public WorldGenNh()
{
}
to
public WorldGenNh(int i)
{
}
hope that helps either should work the first one most likely
Thanks man, never thought it would be the block id.
Now im stuck on the world generation.
*** Minecraft Coder Pack Version 2.9 ***
MCP 2.9 running in C:\Users\Mrs Hamill\Desktop\Minecraft\Naquadah Mod
Compiling Minecraft
sources\minecraft\net\minecraft\src\ChunkProviderGenerate.java:562: cannot find
symbol
symbol : constructor WorldGenNh(int)
location: class net.minecraft.src.WorldGenNh
(new WorldGenNh(Block.NhOre.blockID)).generate(worldObj, rand, k20, i22, i23);
^
1 error
*** minecraft_server.jar was not found, skipping
=== MCP 2.9 recompile script finished ===
Press any key to continue . . .
Again, i have tried looking for a resolution, but i can't find one.
This is the code for the world gen:
package net.minecraft.src;
import java.util.Random;
public class WorldGenNh extends WorldGenerator
{
public WorldGenNh()
{
}
public boolean generate(World world, Random random, int i, int j, int k)
{
// Gives this a 1 in 10 chance of generating
if (random.nextInt(10) == 0)
{
// Loops 64 times, this could create up to 64 TNT
for (int z = 0; z < 128; z++)
{
int i1 = i + random.nextInt(8) - random.nextInt(8);
int j1 = j + random.nextInt(8) - random.nextInt(8);
int k1 = k + random.nextInt(8) - random.nextInt(8);
// Checks that there is nothing in the current location and there is grass beneath.
if(world.getBlockId(i1, j1, k1) == 0 && world.getBlockId(i1, j1 - 1, k1) == Block.grass.blockID && Block.NhOre.canPlaceBlockAt(world, i1, j1, k1))
{
world.setBlockAndMetadata(i1, j1, k1, Block.NhOre.blockID, random.nextInt(4));
}
}
}
}
}
And for chunc provider generate:
for(int l17 = 0; l17 < 20; l17++)
{
int k20 = k + rand.nextInt(16) + 8;
int i22 = rand.nextInt(rand.nextInt(rand.nextInt(112) + 8) + 8);
int i23 = l + rand.nextInt(16) + 8;
(new WorldGenNh(Block.NhOre.blockID)).generate(worldObj, rand, k20, i22, i23);
}
I tried compiling without the for loop, but it came up with more errors than if i compiled it in this state.
Thanks for your help in advance.
Learn java
Quote from ZXhacking »
Quote from Gidding »
Don't include modloader in the jar your going to decompile.
that brings errors. instead run enable_modloader.
ok thanks i tried that and got this error
*** Minecraft Coder Pack Version 2.9 ***
MCP 2.9 running in C:\Users\chris\Desktop\mc nod creater
Compiling Minecraft
sources\minecraft\net\minecraft\src\Mod_BlockRedStone.java:7: class mod_BlockRed
Stone is public, should be declared in a file named mod_BlockRedStone.java
public class mod_BlockRedStone extends BaseMod
^
sources\minecraft\net\minecraft\src\Mod_BlockRedStone.java:17: cannot find symbo
l
symbol : variable Redstone
location: class net.minecraft.src.mod_BlockRedStone
Redstone = (new BlockRedStone(100, 1)).setHardness(1.5F).setStepSound(Bloc
k.soundStoneFootstep);
^
sources\minecraft\net\minecraft\src\Mod_BlockRedStone.java:17: cannot find symbo
l
symbol : constructor BlockRedStone(int,int)
location: class net.minecraft.src.BlockRedStone
Redstone = (new BlockRedStone(100, 1)).setHardness(1.5F).setStepSound(Bloc
k.soundStoneFootstep);
^
sources\minecraft\net\minecraft\src\Mod_BlockRedStone.java:21: cannot find symbo
l
symbol : variable RedStone
location: class net.minecraft.src.Block
recipes.addRecipe(new ItemStack(Block.RedStone, 1), new Object[] {
^
4 errors
*** minecraft_server.jar was not found, skipping
=== MCP 2.9 recompile script finished ===
Press any key to continue . . .
i changed files slightly becauuse there were a few mistakes
they now are Mod_BlockRedStone
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public class mod_BlockRedStone extends BaseMod
{
public String Version()
{
return "1.3_01";
}
public static final Block RedStone;
static
{
Redstone = (new BlockRedStone(100, 1)).setHardness(1.5F).setStepSound(Block.soundStoneFootstep);
}
public void AddRecipes(CraftingManager recipes)
{
recipes.addRecipe(new ItemStack(Block.RedStone, 1), new Object[] {
"#", Character.valueOf('#'), Block.dirt
});
}
}
and BlockRedStone
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
import java.util.Random;
public class BlockRedStone extends Block
{
public BlockRedStone(int i, int j, Material material)
{
super(i, j, material);
}
public int idDropped(int i, Random random)
{
return Item.lightStoneDust.shiftedIndex;
}
}
and those are the only files i have added/modified
thanks
[] [] []
[] []
i dont mean to be mean buuut... i still dont understand it at all. I still dont quite get why i need to extend basemod. I dont get how to even make items anymore :/. Trying to make it compatible ruined my block's and items that already existed and made me recode it :/ and when i finaly compiled it with no errors it crashed minecraft. Also i still have no clue where to place all the errr things he told us to paste in the .java file. I tried to paste them there but it caused errors. I still dont get why we need so many files. when i tried to run the thing to make modloader compatible it didnt even create a basemod file. afterwards i searched my computer and the words "basemod" werent in it anywhere. so basicly i am completly and utterly confused. Despite multiple tutorials (UGH each one said a COMPLETLY different thing...) many explainings and many tests i still cant quite get this.
I NEED THIS
i really suggest you go learn some java. First of all if you dont know why you need to extend a class well that means you dont know java and second nobody can help if you dont post your errors. So please read some tutorials. Im not trolling im just saying these are basic concepts of java that you need to know if you want to mod.
I'm using
world.playSoundAtEntity(entityplayer, "random.neweffect", 1.0F, 1.0F / (itemRand.nextFloat() * 0.1F + 0.1F));
my effect neweffect.ogg is in the the folder resources/newsound/random.
any help getting minecraft to play my effects would be appreciated. oh and i'm not using mod loader i haven't figured out how to make that work yet, i'm going to get a better understanding of editing the plain class files first.
Part 2.
can someone please help me with getting custom blocks and items to have a name when you hover over them in your inventory. iv tried a few things but cant seam to make it work. as i said previously, i'm not using mod loader and i don't plan too just yet. i have some knowledge of Java but iv only just started using it. i do however have several years programing experience with other languages and i'm a quick study.
thanks for you time and any help would be great
audio mod doesnt agree with test_game.bat and also i have tried useing audio mod but where do i call the sounds from and where do i save the files?
This tutorial is ment to be for people that know a bit of java and modding in mincraft.
I started modding in minecraft with absolutely 0% java knowledge.
Follow some tutorials on youtube made by thenewboston:
that's the first one.
Don't install audiomod in mcp! just install it in your client. and put your sounds in a map called mod in that map put a map called sounds and in that map put your effects or whatever.[/quote]
but then how do i call the sounds. is it just
world.playSoundAtEntity(entityplayer, "sound.newFX", 0, 0);
? thankyou
You need to implement at least these two methods for "power" to work:
Best of luck.
Hey everyone, I just decided to start a youtube series on Minecraft modding and for the first video I decided to write an SPC plugin (because they are new).
Check out the video (best viewed in 480p+):
Demo of the mod is towards the end of the video.
And the download link: Link Removed
I was wondering if these sorts of videos would be useful for tutorials or seeing what mods I'm making? Is anyone interested in this? If so, what should I do in up coming videos?
its in RenderBlocks.java at about line 791, the part your looking for is
tessellator.setColorOpaque_F
theres a bracket on the end and to change the color just change the values accordingly
tessellator.setColorOpaque_F(f * f2, f * f3, f * f4); ***for Red
tessellator.setColorOpaque_F(f * f3, f * f2, f * f4); ***for Green
tessellator.setColorOpaque_F(f * f4, f * f3, f * f2); ***for Blue
EDIT:
more redstone wire texture colors
tessellator.setColorOpaque_F(f * f2, f * f2, f * f4); ***Yellow
tessellator.setColorOpaque_F(f * f3, f * f2, f * f2); ***Sky Blue
tessellator.setColorOpaque_F(f * f2, f * f3, f * f2); ***Purple
EDIT 2:
more
tessellator.setColorOpaque_F(f * f2, f * f2, f * f2); ***White
tessellator.setColorOpaque_F(f * f2, f * f2*0.5F, f * f2*0.16F); ***Orange
tessellator.setColorOpaque_F(f * f2, f * f2*0.5F, f * f2); ***Pink.... although i dread it
its as simple as finding your RGB color and multiplying in the right numbers. you can use f*f2 in all 3 then multiply it buy how much of that color you want
the 2 represents the dominant color
oh and by the way my previous problems havent been solved if anyone wants to read my earlier post any help is appreciated
Your blockid is way to high. It needs to be at 127 or lower or 256 or lower with blockids +
I would suggest you read java tutorials to. And to explain your question basemod contains all the methods modloader will call and has the same use as the block class.
Many thanks for these wonderful tutorials.
obviously i have audio mod but i cant figure out how to call the sound files. im trying to use this but with no success
world.playSoundAtEntity(entityplayer, "sound.newFX", 1.0F, 1.0F / (itemRand.nextFloat() * 0.1F + 0.1F));
can someone please tell me exactly what i need to write
Possibly more customization and explanation of block classes would be nice. Things such as a GUI, inventory, etc.
yet unsloved
ok try changing this (new WorldGenNh(Block.NhOre.blockID)) to (new WorldGenNh()) and if that doesnt work in your
WorldGenNh file change
public WorldGenNh()
{
}
to
public WorldGenNh(int i)
{
}
hope that helps either should work the first one most likely
If I create some new ores, how do I get them to generate in the ground, rather than needing sox or something like it to get them?
Thanks
Learn java
Learn java
If you need any more info just tell me
Learn java
That isn't very helpful at all