I'm watching you right now, and in hopes you can explain where I went wrong in coding. I'll let you know what I think when I watch a few of your videos.
EntityLightningBolt bolt = new EntityLightningBolt(world, entityplayer.posX, entityplayer.posY, entityplayer.posZ);
This will spawn a lightning bolt right on top of you though, and you will most likely die lol.
Wahh is there anyway I could attach it to a snow ball so were ever the snow ball hits it will lighting. Also then how did you get
Your lighting wand to work in your magic mod?
Do you know how to use a certian colour of dye in a recipe fro example cocoa beens?
Look for PowderDye or DyePowder I forgot which one, and look inside the class there is a specific constructor that means different things. I don't know it off the top of my head, but I know it's a 3 variable constructor and in the class it tells you which number is which dye.
Wahh is there anyway I could attach it to a snow ball so were ever the snow ball hits it will lighting. Also then how did you get
Your lighting wand to work in your magic mod?
I combined the Bow with Lightning Bolt and made it so you shoot a "projectile" at something, and wherever it lands I did "entityJoinedWorld(LightningBolt)" at that position.
1.- Is there some limitation on how many new Materials you can add to the EnumToolMaterial class? Beacuse I had no problem adding 1 and a tool, but after attemping 4 additional ones (an one respective tool for each) minecraft crashed.
2.- Can there be only one GenrateSurface method per mod_ class? I tried adding a second one for a different block but Eclipse marks it as a duplicate.
3.- Could you do a Nether Block Generation tutorial? I tried what seemed to be the most obvious way and it unsurprisingly didn't work.
I'm getting a graphical error for my custom item (turd). Its graphic doesn't show up, but it is still minable. After a while, I get this error:
Mods loaded: 2
ModLoader 1.0.0
net.minecraft.src.mod_Shit 1.0.0
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT ef367928 --------
Generated 12/17/11 2:42 PM
Minecraft: Minecraft 1.0.0
OS: Windows 7 (amd64) version 6.1
Java: 1.6.0_29, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce 8400GS/PCI/SSE2 version 3.3.0, NVIDIA Corporation
java.lang.Exception: No more empty item sprite indices left!
at net.minecraft.src.ModLoader.getUniqueItemSpriteIndex(ModLoader.java:563)
at net.minecraft.src.ModLoader.getUniqueSpriteIndex(ModLoader.java:573)
at net.minecraft.src.ModLoader.addOverride(ModLoader.java:330)
at net.minecraft.src.mod_Shit.GenerateSurface(mod_Shit.java:35)
at net.minecraft.src.ModLoader.PopulateChunk(ModLoader.java:1161)
at net.minecraft.src.ChunkProvider.populate(ChunkProvider.java:159)
at net.minecraft.src.Chunk.populateChunk(Chunk.java:894)
at net.minecraft.src.ChunkProvider.loadChunk(ChunkProvider.java:86)
at net.minecraft.src.ChunkProvider.provideChunk(ChunkProvider.java:94)
at net.minecraft.src.World.getChunkFromChunkCoords(World.java:467)
at net.minecraft.src.ChunkCache.<init>(ChunkCache.java:34)
at net.minecraft.src.WorldRenderer.updateRenderer(WorldRenderer.java:129)
at net.minecraft.src.RenderGlobal.updateRenderers(RenderGlobal.java:1265)
at net.minecraft.src.EntityRenderer.renderWorld(EntityRenderer.java:887)
at net.minecraft.src.EntityRenderer.updateCameraAndRender(EntityRenderer.java:747)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:25)
at net.minecraft.client.Minecraft.func_40001_x(Minecraft.java:729)
at net.minecraft.client.Minecraft.run(Minecraft.java:627)
at java.lang.Thread.run(Thread.java:662)
--- END ERROR REPORT e23ad8b ----------
My coding is this:
package net.minecraft.src;
import java.util.Random;
public class mod_Shit extends BaseMod{
//Item/Blocks
public static final Block shitBlock = (new BlockShitBlock(155,0)).setHardness(1.0F).setLightValue(.3F).setResistance(6F).setBlockName("**** Block").setStepSound(Block.soundGravelFootstep);
public static final Item turd = new ItemTurd(500).setItemName("Turds");
//public static final Item friedTurd = new ItemHardTurd(501).setItemName("Fried Turds");
//Blocks
//**** Block
public mod_Shit(){
ModLoader.RegisterBlock(shitBlock);
ModLoader.AddName(shitBlock,"**** Block");
shitBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/ShitBlock.png");
ModLoader.AddRecipe(new ItemStack(shitBlock, 4), new Object[] {
"XX", "XX", Character.valueOf('X'),mod_Shit.turd
});
}
public void GenerateSurface(World world, Random rand, int baseX, int baseZ){
for (int x = 0; x < 15; x++){
int Xcoord = baseX + rand.nextInt(5);
int Ycoord = rand.nextInt(80);
int Zcoord = baseZ + rand.nextInt(5);
(new WorldGenMinable(shitBlock.blockID, 25)).generate(world, rand, Xcoord, Ycoord, Zcoord);
}
//Items
//Turd
ModLoader.AddName(turd, "Turds");
turd.iconIndex = ModLoader.addOverride("/gui/items.png", "/Turd.png");
//Fried Turd
//friedTurd.iconIndex = ModLoader.addOverride("/gui/items.png", "/friedturd.png");
//ModLoader.AddName(friedTurd, "Fried Turds");
}
//ModLoader BS
public void load(){}
public String getVersion(){
return "1.0.0";
}
}
hey i did everything that you did in the mob tut but i got this error when i tried playing it in eclipse
Mods loaded: 1
ModLoader 1.0.0
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 141ccf11 --------
Generated 17/12/11 2:48 PM
Minecraft: Minecraft 1.0.0
OS: Windows Vista (x86) version 6.0
Java: 1.7.0, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Radeon 3100 Graphics version 2.1.7417 Release, ATI Technologies Inc.
java.lang.ClassNotFoundException: net.minecraft.src.mod_cjb_teleport
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:259)
at net.minecraft.src.ModLoader.readFromModFolder(ModLoader.java:1272)
at net.minecraft.src.ModLoader.init(ModLoader.java:734)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:162)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:42)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:314)
at net.minecraft.client.Minecraft.run(Minecraft.java:613)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT dfad5fad ----------
hey i did everything that you did in the mob tut but i got this error when i tried playing it in eclipse
Mods loaded: 1
ModLoader 1.0.0
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 141ccf11 --------
Generated 17/12/11 2:48 PM
Minecraft: Minecraft 1.0.0
OS: Windows Vista (x86) version 6.0
Java: 1.7.0, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Radeon 3100 Graphics version 2.1.7417 Release, ATI Technologies Inc.
java.lang.ClassNotFoundException: net.minecraft.src.mod_cjb_teleport
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:259)
at net.minecraft.src.ModLoader.readFromModFolder(ModLoader.java:1272)
at net.minecraft.src.ModLoader.init(ModLoader.java:734)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:162)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:42)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:314)
at net.minecraft.client.Minecraft.run(Minecraft.java:613)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT dfad5fad ----------
I couldn't really tell you the cause of that, it can't find your mod_ class? Maybe try to rename it without the second _?
1.- Is there some limitation on how many new Materials you can add to the EnumToolMaterial class? Beacuse I had no problem adding 1 and a tool, but after attemping 4 additional ones (an one respective tool for each) minecraft crashed.
2.- Can there be only one GenrateSurface method per mod_ class? I tried adding a second one for a different block but Eclipse marks it as a duplicate.
3.- Could you do a Nether Block Generation tutorial? I tried what seemed to be the most obvious way and it unsurprisingly didn't work.
Great series, BTW. Keep up the good work.
1. I don't know, I've been trying to pick this class apart because so many people say you can do it without modifying that class, which I know and I get, but you would still be using the same ID's as other mods so they would clash anyways.
I guess it only accepts a certain amount of materials? I'm not too sure about this.
2. Put two for loops inside of the same GenerateSurface method, there can't be two of the same methods in the same class.
3. I didn't really try this out yet, I thought it'd work just like the surface one but I'll look into it.
In other news... Item Durability and Item Consumption video will be out in about 30 mins.
Look for PowderDye or DyePowder I forgot which one, and look inside the class there is a specific constructor that means different things. I don't know it off the top of my head, but I know it's a 3 variable constructor and in the class it tells you which number is which dye.
I combined the Bow with Lightning Bolt and made it so you shoot a "projectile" at something, and wherever it lands I did "entityJoinedWorld(LightningBolt)" at that position.
I cant figure out why this wont work i see lighting and hear it but nothing happens
Why did you set the coordinates of the lightning bolt to be icon index? That's the id of the texture of the item...
Set it to be posX, posY, and posZ.
I dont know haha...whoops but i changed it to , And it kinda works except the lighting land right on me and then the snowball goes normaly were ever i throw it.
Thanks for the reply. Here are some request for whenever you have the time:
-Mob drops management (mare than one tipe of item dropped, rarity of each drop, etc.)
-Generating new flower-type blocks (plants)
-Biome-Specific Block/Ore generation
- World features (ruins, dungeons,etc...)
Also, this is more of a doubt than a request, but is there a way to set a specific height level for a block to generate rather than just from the bottom of the map and up?(i.e. a block that would only generate on the surface or on mountain peaks)
I'm getting a graphical error for my custom item (turd). Its graphic doesn't show up, but it is still minable. After a while, I get this error:
Mods loaded: 2
ModLoader 1.0.0
net.minecraft.src.mod_Shit 1.0.0
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT ef367928 --------
Generated 12/17/11 2:42 PM
Minecraft: Minecraft 1.0.0
OS: Windows 7 (amd64) version 6.1
Java: 1.6.0_29, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce 8400GS/PCI/SSE2 version 3.3.0, NVIDIA Corporation
java.lang.Exception: No more empty item sprite indices left!
at net.minecraft.src.ModLoader.getUniqueItemSpriteIndex(ModLoader.java:563)
at net.minecraft.src.ModLoader.getUniqueSpriteIndex(ModLoader.java:573)
at net.minecraft.src.ModLoader.addOverride(ModLoader.java:330)
at net.minecraft.src.mod_Shit.GenerateSurface(mod_Shit.java:35)
at net.minecraft.src.ModLoader.PopulateChunk(ModLoader.java:1161)
at net.minecraft.src.ChunkProvider.populate(ChunkProvider.java:159)
at net.minecraft.src.Chunk.populateChunk(Chunk.java:894)
at net.minecraft.src.ChunkProvider.loadChunk(ChunkProvider.java:86)
at net.minecraft.src.ChunkProvider.provideChunk(ChunkProvider.java:94)
at net.minecraft.src.World.getChunkFromChunkCoords(World.java:467)
at net.minecraft.src.ChunkCache.<init>(ChunkCache.java:34)
at net.minecraft.src.WorldRenderer.updateRenderer(WorldRenderer.java:129)
at net.minecraft.src.RenderGlobal.updateRenderers(RenderGlobal.java:1265)
at net.minecraft.src.EntityRenderer.renderWorld(EntityRenderer.java:887)
at net.minecraft.src.EntityRenderer.updateCameraAndRender(EntityRenderer.java:747)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:25)
at net.minecraft.client.Minecraft.func_40001_x(Minecraft.java:729)
at net.minecraft.client.Minecraft.run(Minecraft.java:627)
at java.lang.Thread.run(Thread.java:662)
--- END ERROR REPORT e23ad8b ----------
My coding is this:
package net.minecraft.src;
import java.util.Random;
public class mod_Shit extends BaseMod{
//Item/Blocks
public static final Block shitBlock = (new BlockShitBlock(155,0)).setHardness(1.0F).setLightValue(.3F).setResistance(6F).setBlockName("**** Block").setStepSound(Block.soundGravelFootstep);
public static final Item turd = new ItemTurd(500).setItemName("Turds");
//public static final Item friedTurd = new ItemHardTurd(501).setItemName("Fried Turds");
//Blocks
//**** Block
public mod_Shit(){
ModLoader.RegisterBlock(shitBlock);
ModLoader.AddName(shitBlock,"**** Block");
shitBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/ShitBlock.png");
ModLoader.AddRecipe(new ItemStack(shitBlock, 4), new Object[] {
"XX", "XX", Character.valueOf('X'),mod_Shit.turd
});
}
public void GenerateSurface(World world, Random rand, int baseX, int baseZ){
for (int x = 0; x < 15; x++){
int Xcoord = baseX + rand.nextInt(5);
int Ycoord = rand.nextInt(80);
int Zcoord = baseZ + rand.nextInt(5);
(new WorldGenMinable(shitBlock.blockID, 25)).generate(world, rand, Xcoord, Ycoord, Zcoord);
}
//Items
//Turd
ModLoader.AddName(turd, "Turds");
turd.iconIndex = ModLoader.addOverride("/gui/items.png", "/Turd.png");
//Fried Turd
//friedTurd.iconIndex = ModLoader.addOverride("/gui/items.png", "/friedturd.png");
//ModLoader.AddName(friedTurd, "Fried Turds");
}
//ModLoader BS
public void load(){}
public String getVersion(){
return "1.0.0";
}
}
I dont know haha...whoops but i changed it to , And it kinda works except the lighting land right on me and then the snowball goes normaly were ever i throw it.
Thanks for the reply. Here are some request for whenever you have the time:
-Mob drops management (mare than one tipe of item dropped, rarity of each drop, etc.)
-Generating new flower-type blocks (plants)
-Biome-Specific Block/Ore generation
- World features (ruins, dungeons,etc...)
Also, this is more of a doubt than a request, but is there a way to set a specific height level for a block to generate rather than just from the bottom of the map and up?(i.e. a block that would only generate on the surface or on mountain peaks)
I was looking for something easy to record today cause I don't have much time, so I'll do that mod drop rarity thing today :ohmy.gif:
As for the block thing goes, you can make a block generate in a certain y value, for example only spawns from 50-55 Y. I'm sure you can make it spawn ONLY on surface, like grass, but I haven't looked at it yet. I suggest you look at the grass class and copy something in there.
Make it
This will spawn a lightning bolt right on top of you though, and you will most likely die lol.
I attempt to entertain on YouTube. Channel
I attempt to entertain on YouTube. Channel
Wahh is there anyway I could attach it to a snow ball so were ever the snow ball hits it will lighting. Also then how did you get
Your lighting wand to work in your magic mod?
Look for PowderDye or DyePowder I forgot which one, and look inside the class there is a specific constructor that means different things. I don't know it off the top of my head, but I know it's a 3 variable constructor and in the class it tells you which number is which dye.
I combined the Bow with Lightning Bolt and made it so you shoot a "projectile" at something, and wherever it lands I did "entityJoinedWorld(LightningBolt)" at that position.
I'm loving it, played it till 6am last night :tongue.gif:
1.- Is there some limitation on how many new Materials you can add to the EnumToolMaterial class? Beacuse I had no problem adding 1 and a tool, but after attemping 4 additional ones (an one respective tool for each) minecraft crashed.
2.- Can there be only one GenrateSurface method per mod_ class? I tried adding a second one for a different block but Eclipse marks it as a duplicate.
3.- Could you do a Nether Block Generation tutorial? I tried what seemed to be the most obvious way and it unsurprisingly didn't work.
Great series, BTW. Keep up the good work.
My coding is this:
I attempt to entertain on YouTube. Channel
I couldn't really tell you the cause of that, it can't find your mod_ class? Maybe try to rename it without the second _?
1. I don't know, I've been trying to pick this class apart because so many people say you can do it without modifying that class, which I know and I get, but you would still be using the same ID's as other mods so they would clash anyways.
I guess it only accepts a certain amount of materials? I'm not too sure about this.
2. Put two for loops inside of the same GenerateSurface method, there can't be two of the same methods in the same class.
3. I didn't really try this out yet, I thought it'd work just like the surface one but I'll look into it.
In other news... Item Durability and Item Consumption video will be out in about 30 mins.
there is only 1
i then tried to edit the egg and I put all the code into comments (//code bla)and i still got the same error?
-SteveFromMinecraft
I cant figure out why this wont work i see lighting and hear it but nothing happens
Why did you set the coordinates of the lightning bolt to be icon index? That's the id of the texture of the item...
Set it to be posX, posY, and posZ.
I dont know haha...whoops but i changed it to , And it kinda works except the lighting land right on me and then the snowball goes normaly were ever i throw it.
And it kinda works except the lighting land right on me and then the snowball goes normaly were ever i throw it.
-Mob drops management (mare than one tipe of item dropped, rarity of each drop, etc.)
-Generating new flower-type blocks (plants)
-Biome-Specific Block/Ore generation
- World features (ruins, dungeons,etc...)
Also, this is more of a doubt than a request, but is there a way to set a specific height level for a block to generate rather than just from the bottom of the map and up?(i.e. a block that would only generate on the surface or on mountain peaks)
I attempt to entertain on YouTube. Channel
You need to set the attributes to turd inside of the constructor, same as your block. You set it inside of GenerateSurface.
I was looking for something easy to record today cause I don't have much time, so I'll do that mod drop rarity thing today :ohmy.gif:
As for the block thing goes, you can make a block generate in a certain y value, for example only spawns from 50-55 Y. I'm sure you can make it spawn ONLY on surface, like grass, but I haven't looked at it yet. I suggest you look at the grass class and copy something in there.