No longer taking requests. I will do the tutorials in the order below.
Finish GUI tutorial
NPC Series
Trees
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I'm sorry if you answered this before, or I'm blind but is "Mod_Block" and "Mod_Item" different files? Because they begin with the same code as the base class.
I'm sorry if you answered this before, or I'm blind but is "Mod_Block" and "Mod_Item" different files? Because they begin with the same code as the base class.
You can add the code into the same file. I just keep it all separate for people who only want certain things. Look at the last tutorial on the first post to see how to add it all into one class.
TechGuy, why you don't want to help me. Please help.
So I have the code:
public static final Block BlueTorch = new BlockBlueTorch(162, 0).setBlockName("BlueTorch").setHardness(0.0F).setLightValue(0.9375F);
public static Item BlueTorchIcon = (new ItemReed(82, mod_Ja.BlueTorch)).setIconCoord(11, 1).setItemName("reeds");
And didn't work.
I don't have a torch tutorial. If you read the bottom of the OP it clearly states
Quote from [color=#0000ff »
TechGuy543]]
If you have used someone else's tutorials and you have a problem with your code, do not ask for help here. I WILL ignore you. I will only help people who are having problems with their code from using my tutorials.
On the same note, if you are having trouble modding, don't just ask here, go and ask in the Mod Development section. As I said above, this thread is ONLY for people who are using the tutorials I have written and need some help.
I can see one of your problems with it. But seeing as you don't bother reading something I put on the OP, I refuse to help.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I haven't checked this out for a while, awesome GUI tutorial. I've never understood GUI before, but great explanation. Just one question. What is the ModLoader method for showing the GUI?
ModLoader.openGui(new GuiNameHere(world, entityplayer /*other args, if any*/));
I think it is something like that. I don't know for certain, I just use Minecraft's method for displaying GUIs.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
[code]ModLoader.openGui(new GuiNameHere(world, entityplayer /*other args, if any*/));[/code]
I think it is something like that. I don't know for certain, I just use Minecraft's method for displaying GUIs.
basically to make peoples lives easier you can create a method like:
[code] public static void openGUI***(EntityPlayer player){
ModLoader.openGUI(player, new GUI***(world, minecraft, player));
}
also make a private instance of the following things if you have not already:
private Minecraft minecraft;
private World world;
that will help you display the GUI, all you have to do is in the thing that you want to display the GUI just for like items put:
public ItemStack onItemRightClick(*The Correct Params){
mod_***.openGUI***(player);
}
or for a block just do the same for a block.
hopefully this helped, if not i will be willing to provide more help with it if you need it
I need help, as I am new to modding. I'm trying to make a recipe that contains a certain dye, Cocoa beans. I do not know how you can make it where only the cocoa beans can be used. Thank you.
yes he needs to have a space when there is nothing there, so it would be " B ", " I ". unless he wants to add a shapeless crafting recipe then he needs to change it to modloader.addShapeless(); then it should work
I decided to make a simple gems mod, but every time I tested minecraft, it says
Mods loaded: 2
ModLoader 1.2.5
mod_Gems 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT eca9b7ce --------
Generated 7/20/12 12:33 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.RuntimeException: java.lang.Exception: Image not found: /items/SapphireOre
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1451)
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1104)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.Exception: Image not found: /items/SapphireOre
at net.minecraft.src.ModLoader.loadImage(ModLoader.java:1024)
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1443)
... 5 more
--- END ERROR REPORT 4fa10203 ----------
Please help this happens every time I try to get an image to work.
Never mind, I derped badly, just didn't put the .png extension. Sorry for wasting your time.
I need help, as I am new to modding. I'm trying to make a recipe that contains a certain dye, Cocoa beans. I do not know how you can make it where only the cocoa beans can be used. Thank you.
I was new to modding a while ago also, so I know what you mean.
ModLoader.addRecipe(new ItemStack(Chocolate, 4), new Object [] {"@", "&", "#", '@', new ItemStack(Item.dyePowder, 1, 3), '&', Item.sugar, '@', Item.bucketMilk});
//We need the "new ItemStack(Item.dyePowder,1,3)" because Coco beans is really the Item.dyePowder, but with a damage value of 3.
//Normally we could just go Item.whatever but if we did that in this case, you could use any dye in the recipe.
I seem to have successfully made a Human-like Bandit Monster, it spawns all good and everything. But with the drops, how do I make it drop certain items on chance? What if I don't want it to drop an iron ingot every time? Zombies don't drop rotten flesh every time. How do I apply this to my created monster?
Use this:
protected void dropFewItems(boolean par1, int par2)
{
int i = rand.nextInt(3 + par2);
for (int j = 0; j < i; j++)
{
dropItem(Item.ingotGold.shiftedIndex, 1);
}
i = rand.nextInt(3 + par2);
for (int k = 0; k < i; k++)
{
dropItem(Item.ingotIron.shiftedIndex, 1);
}
}
That drops those Items randomly, kind of like a skeleton.
Hey, i want to know how to make then i right click the plock a npc spawn
This is code I have used before that makes the block explode and spawn lots of pigs
package net.minecraft.src;
import java.util.Random;
public class PigSpawnBlock extends Block
{
public PigSpawnBlock(int i, int j)
{
super(i, j, Material.wood);
}
public boolean blockActivated(World world, int x, int y, int z, EntityPlayer player)
{
int numOfPigs = world.rand.nextInt(7);
numOfPigs++;
numOfPigs++;
numOfPigs++;
for (int i=0; i<numOfPigs; i++)
{
EntityPig entity = new EntityPig(world);
entity.setLocationAndAngles(x, y + 1, z, world.rand.nextFloat() * 360.0F, 0.0F);
world.spawnEntityInWorld(entity);
}
world.setBlockWithNotify(x, y, z, 20);
world.createExplosion(null, x, y, z, 0.1F);
return true;
}
public int idDropped(int i, Random random, int j)
{
return mod_SpawnerBlocks.PigSpawnBlock.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
Hello! I'm having a bit of trouble with the items that I can make a mob drop. I have used your HumanNPC code, but for some reason whenever I choose what item for the mob to drop, I get an error message saying that "blockTNT is not a type". I can only make a mob drop the following items:
Iron Ingot, Gold Ingot, and a Diamond Sword.(these are the only ones that I have experimented with an worked, I have also tried a wooden pickaxe, but it didn't work.)
I am new to modding, so am I using the wrong format? (blockXxx) or can a mob only drop items?
Also how do you make a mob drop more than one thing? Like exp, leather, and steak for instance?
Thanks in advance, and I love your tutorials
Yeah, just like you do with items, it is "Block.xxx", not "Blockxxx"
I decided to make a simple gems mod, but every time I tested minecraft, it says
Mods loaded: 2
ModLoader 1.2.5
mod_Gems 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT eca9b7ce --------
Generated 7/20/12 12:33 PM
Minecraft: Minecraft 1.2.5
OS: Windows Vista (x86) version 6.0
Java: 1.7.0_05, Oracle Corporation
VM: Java HotSpot™ 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.RuntimeException: java.lang.Exception: Image not found: /items/SapphireOre
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1451)
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1104)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.Exception: Image not found: /items/SapphireOre
at net.minecraft.src.ModLoader.loadImage(ModLoader.java:1024)
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1443)
... 5 more
--- END ERROR REPORT 4fa10203 ----------
Please help this happens every time I try to get an image to work.
Never mind, I derped badly, just didn't put the .png extension. Sorry for wasting your time.
you need to put .png at the end of SapphireOre so it would look like this /items/SapphireOre.png hope I helped
How do you change the tool's efficeiency and speed? For example, my pickaxe, by default, is like wood. How do I make it like diamond?
you can make your own enumerator which would allow you to make a pickaxe with your own custom breaking speed, and allow you to have everything else custom to??
you can make your own enumerator which would allow you to make a pickaxe with your own custom breaking speed, and allow you to have everything else custom to??
Can you explain? Or show an example, because I've made the enum tool material, If enum material has anything to do with an enumerator.... but I don't know how to change the speed,
okay a enum and enumerator are the same thing lol, and yes you can have a item have a achievement trigger, ill work on getting you a tutorial and ill show you how it works. and ill show you how to change the breaking speed too i have a few things to do right this minute but ill get one to you either later tonight, or tomorrow morning
okay a enum and enumerator are the same thing lol, and yes you can have a item have a achievement trigger, ill work on getting you a tutorial and ill show you how it works. and ill show you how to change the breaking speed too i have a few things to do right this minute but ill get one to you either later tonight, or tomorrow morning
Thanks!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
together they are powerful beyond imagination."
You can add the code into the same file. I just keep it all separate for people who only want certain things. Look at the last tutorial on the first post to see how to add it all into one class.
The mod_ class must have a lowercase m. mod_Name
I don't have a torch tutorial. If you read the bottom of the OP it clearly states
I can see one of your problems with it. But seeing as you don't bother reading something I put on the OP, I refuse to help.
together they are powerful beyond imagination."
I think it is something like that. I don't know for certain, I just use Minecraft's method for displaying GUIs.
together they are powerful beyond imagination."
basically to make peoples lives easier you can create a method like:
[code] public static void openGUI***(EntityPlayer player){
ModLoader.openGUI(player, new GUI***(world, minecraft, player));
}
also make a private instance of the following things if you have not already:
private Minecraft minecraft;
private World world;
that will help you display the GUI, all you have to do is in the thing that you want to display the GUI just for like items put:
public ItemStack onItemRightClick(*The Correct Params){
mod_***.openGUI***(player);
}
or for a block just do the same for a block.
hopefully this helped, if not i will be willing to provide more help with it if you need it
yes he needs to have a space when there is nothing there, so it would be " B ", " I ". unless he wants to add a shapeless crafting recipe then he needs to change it to modloader.addShapeless(); then it should work
Mods loaded: 2
ModLoader 1.2.5
mod_Gems 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT eca9b7ce --------
Generated 7/20/12 12:33 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.RuntimeException: java.lang.Exception: Image not found: /items/SapphireOre
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1451)
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1104)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.Exception: Image not found: /items/SapphireOre
at net.minecraft.src.ModLoader.loadImage(ModLoader.java:1024)
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1443)
... 5 more
--- END ERROR REPORT 4fa10203 ----------
Please help this happens every time I try to get an image to work.
Never mind, I derped badly, just didn't put the .png extension.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumSame with anyone else that wants one
I was new to modding a while ago also, so I know what you mean.
ModLoader.addRecipe(new ItemStack(Chocolate, 4), new Object [] {"@", "&", "#", '@', new ItemStack(Item.dyePowder, 1, 3), '&', Item.sugar, '@', Item.bucketMilk}); //We need the "new ItemStack(Item.dyePowder,1,3)" because Coco beans is really the Item.dyePowder, but with a damage value of 3. //Normally we could just go Item.whatever but if we did that in this case, you could use any dye in the recipe.If you need any more help, PM me
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumAs for the custom biome spawning, TechGuys has that in the Other NPC Tut
Use this:
protected void dropFewItems(boolean par1, int par2) { int i = rand.nextInt(3 + par2); for (int j = 0; j < i; j++) { dropItem(Item.ingotGold.shiftedIndex, 1); } i = rand.nextInt(3 + par2); for (int k = 0; k < i; k++) { dropItem(Item.ingotIron.shiftedIndex, 1); } }That drops those Items randomly, kind of like a skeleton.
This is code I have used before that makes the block explode and spawn lots of pigs
package net.minecraft.src; import java.util.Random; public class PigSpawnBlock extends Block { public PigSpawnBlock(int i, int j) { super(i, j, Material.wood); } public boolean blockActivated(World world, int x, int y, int z, EntityPlayer player) { int numOfPigs = world.rand.nextInt(7); numOfPigs++; numOfPigs++; numOfPigs++; for (int i=0; i<numOfPigs; i++) { EntityPig entity = new EntityPig(world); entity.setLocationAndAngles(x, y + 1, z, world.rand.nextFloat() * 360.0F, 0.0F); world.spawnEntityInWorld(entity); } world.setBlockWithNotify(x, y, z, 20); world.createExplosion(null, x, y, z, 0.1F); return true; } public int idDropped(int i, Random random, int j) { return mod_SpawnerBlocks.PigSpawnBlock.blockID; } public int quantityDropped(Random random) { return 1; } }you need to put .png at the end of SapphireOre so it would look like this /items/SapphireOre.png hope I helped
you can make your own enumerator which would allow you to make a pickaxe with your own custom breaking speed, and allow you to have everything else custom to??
Can you explain? Or show an example, because I've made the enum tool material, If enum material has anything to do with an enumerator.... but I don't know how to change the speed,
Thanks!