Does anyone know how to make a block generate on the surface?
If you mean like only on land, what I did is before it placed the block it used world.getBlockId to see if the block it would place it on was dirt and then the location that it was being placed in was air.
Seriously? Why? I hope you realize that the mods'll never let you release that, and I doubt anyone will help you.
Well, I have seen some pretty nasty mods out there, but I would still recommend that he simply make a different mod, because even if the mods did let it stay, you would get a very small amount of people that would download it.
That being said; I will not assist in the creation of a mod that encourages something that is against my values.
You've most likely misplaced a texture file for your mod. A lot of people are under the impression that you need to put the textures into the .jar, but this is false. You simply need to put the textures in Your MCP Directory > bin > minecraft. It'd probably be better to place your textures within its own folder in there. Let's say we call this folder "Example". (You can call it whatever, as long as your code reflects that)
So your textures would be in Your MCP Directory > bin > minecraft > Example
Let's just assume you're trying to add a block. I'll call it blockExample. A texture override at that point would look like this;
Seriously? Why? I hope you realize that the mods'll never let you release that, and I doubt anyone will help you.
Dunno. I just want my flowers!
You do realize this a mod right? Do you get angry at Betheda Studios because you can take phsyco in Fallout? If you can I still think you should help him with his coding, as long as it does not contain content that makes fun of this subject.
was trying to make a cookie block but i got these errors help?
== ERRORS FOUND ==
src/minecraft/net/minecraft/src/mod_cb.java:4: net.minecraft.src.mod_cb is not abstract and does not override abstract method load() in net.minecraft.src.BaseMod
public class mod_cb extends BaseMod
^
src/minecraft/net/minecraft/src/mod_cb.java:10: cannot find symbol
symbol : variable Modloader
location: class net.minecraft.src.mod_cb
cookieBlock.blockIndexInTexture = Modloader.addOverride("/terrain.png","/CookieBlock.png");
^
src/minecraft/net/minecraft/src/mod_cb.java:11: cannot find symbol
symbol : variable Modloader
location: class net.minecraft.src.mod_cb
Modloader.registerBlock(cookieBlock);
^
src/minecraft/net/minecraft/src/mod_cb.java:12: cannot find symbol
symbol : variable Modloader
location: class net.minecraft.src.mod_cb
Modloader.addName(cookieBlock, "CookieBlock");
^
src/minecraft/net/minecraft/src/mod_cb.java:13: cannot find symbol
symbol : variable Modloader
location: class net.minecraft.src.mod_cb
Modloader.addRecipe(new ItemStack(cookieBlock, 1), new Object []{
^
5 errors
==================
btw heres the code
package net.minecraft.src;
import java.util.Random;
public class mod_cb extends BaseMod
{
public static final Block cookieBlock = new BlockCookie(155,0).setHardness(0.1F).setResistance(5.0F).setBlockName("CB");
public mod_cb()
{
cookieBlock.blockIndexInTexture = Modloader.addOverride("/terrain.png","/CookieBlock.png");
Modloader.registerBlock(cookieBlock);
Modloader.addName(cookieBlock, "CookieBlock");
Modloader.addRecipe(new ItemStack(cookieBlock, 1), new Object []{
"**", Character.valueOf('*'), Block.dirt
});
}
public String getVersion()
{
return "1345124077000";
}
}
Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.
This error has been saved to C:\Users\Josh\Desktop\The Runic Mod\Files\Files from MCP\jars\.\crash-reports\crash-2012-09-04_18.37.15-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT a594c222 --------
Generated 9/4/12 6:37 PM
java.lang.Error: Unresolved compilation problem:
CreeperBerrySeed cannot be resolved or is not a field
at net.minecraft.src.mod_CreeperBerry.load(mod_CreeperBerry.java:11)
at net.minecraft.src.ModLoader.init(ModLoader.java:952)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:186)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:86)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
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)
--- END ERROR REPORT ef20cfbb ----------
You haven't even defined CreeperBerrySeed yet. That's what's causing the crash and the shapeless recipe not to work. Define it and it'll work.
Rollback Post to RevisionRollBack
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
How does one obtain such a definition of said item? I'm having a similar issue with the recipes and such.
You didn't define your CrystalFragment block. It's set to null. It's like me telling you to make a pizza, with just flour. Go ahead and define your CrystalFragment block first. Then try again.
For example, here is a definition for an ore block of mine.
public static final Block Valkyrie = new Block(160,0, Material.rock).setBlockName("Valkyrie").setHardness(10F).setResistance(4F);
Now, if this is going to be an actual block, it will be different. Eg; it's a cube of 9 items (like diamond.)
It will be lacking the Material class. But I would suggest looking at TechGuy's guide for Blocks.
Like this?
I don't fully understand what I'm suppose to stick where. It keeps saying something about the craftmanager. Am I suppose to put a recipe in the craftmanager.java?
Wait, wait, wait. No. That's not right. You don't have to do this under a new Java file.
In fact, you shouldn't be doing that at all. You do the new Items or Blocks, recipes, etc in your mod_CrystalPowder. Here, your mod_CrystalPowder should look like this.
package net.minecraft.src;
public class mod_CrystalPowder extends BaseMod
{
public static final Item CrystalPowder = new ItemCrystalPowder(4001).setItemName("CrystalPowder");
public static final Block CrystalFragment = new BlockCrystalFragment(160, 0).setBlockName("CrystalFragment").setHardness(3F).setResistance(4F).setCreativeTab(CreativeTabs.tabBlock);
public void load()
{
CrystalPowder.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystalpowder.png");
ModLoader.addName(CrystalPowder, "Crystal Powder");
ModLoader.addShapelessRecipe(new ItemStack(CrystalPowder, 4), new Object [] {CrystalFragment});
}
public String getVersion()
{
return "1.3.2";
}
}
This is what I mean. See how your old Block Crystal Fragment has changed? Now instead of it being null, and having no definition, it is defined. Thus, the mod knows what to do with it.
If you mean like only on land, what I did is before it placed the block it used world.getBlockId to see if the block it would place it on was dirt and then the location that it was being placed in was air.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWell, I have seen some pretty nasty mods out there, but I would still recommend that he simply make a different mod, because even if the mods did let it stay, you would get a very small amount of people that would download it.
That being said; I will not assist in the creation of a mod that encourages something that is against my values.
Dude, you are a moderator, congrats
Coding:
ModLoader.addRecipe(new ItemStack(CreeperBerry, 1), new Object [] {"#", Character.valueOf('#'), Item.CreeperBerrySeed});
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumUm, you should try making that recipe shapeless...
ModLoader.addShapelessRecipe(new ItemStack(CreeperBerry, 1), new Object [] {Item.CreeperBerrySeed});Oh, and use the code tags, the button with the blue "<>"s on it
Same thing as Koadmaster posted. Should be,
ModLoader.addShapelessRecipe(new ItemStack(CrystalPowder, 4), new Object [] {Item.CrystalFragment});You do realize this a mod right? Do you get angry at Betheda Studios because you can take phsyco in Fallout? If you can I still think you should help him with his coding, as long as it does not contain content that makes fun of this subject.
It got burried again.
Can you supply an error code?
== ERRORS FOUND == src/minecraft/net/minecraft/src/mod_cb.java:4: net.minecraft.src.mod_cb is not abstract and does not override abstract method load() in net.minecraft.src.BaseMod public class mod_cb extends BaseMod ^ src/minecraft/net/minecraft/src/mod_cb.java:10: cannot find symbol symbol : variable Modloader location: class net.minecraft.src.mod_cb cookieBlock.blockIndexInTexture = Modloader.addOverride("/terrain.png","/CookieBlock.png"); ^ src/minecraft/net/minecraft/src/mod_cb.java:11: cannot find symbol symbol : variable Modloader location: class net.minecraft.src.mod_cb Modloader.registerBlock(cookieBlock); ^ src/minecraft/net/minecraft/src/mod_cb.java:12: cannot find symbol symbol : variable Modloader location: class net.minecraft.src.mod_cb Modloader.addName(cookieBlock, "CookieBlock"); ^ src/minecraft/net/minecraft/src/mod_cb.java:13: cannot find symbol symbol : variable Modloader location: class net.minecraft.src.mod_cb Modloader.addRecipe(new ItemStack(cookieBlock, 1), new Object []{ ^ 5 errors ==================btw heres the codepackage net.minecraft.src; import java.util.Random; public class mod_cb extends BaseMod { public static final Block cookieBlock = new BlockCookie(155,0).setHardness(0.1F).setResistance(5.0F).setBlockName("CB"); public mod_cb() { cookieBlock.blockIndexInTexture = Modloader.addOverride("/terrain.png","/CookieBlock.png"); Modloader.registerBlock(cookieBlock); Modloader.addName(cookieBlock, "CookieBlock"); Modloader.addRecipe(new ItemStack(cookieBlock, 1), new Object []{ "**", Character.valueOf('*'), Block.dirt }); } public String getVersion() { return "1345124077000"; } }Modloader should be ModLoader. Capitalization and spelling are crucial.
You are missing a load method. Instead of mod_cb() it should be load().
Never change that no matter what the reason.
Should look like this
public void load() { cookieBlock.blockIndexInTexture = Modloader.addOverride("/terrain.png","/CookieBlock.png"); Modloader.registerBlock(cookieBlock); Modloader.addName(cookieBlock, "CookieBlock"); Modloader.addRecipe(new ItemStack(cookieBlock, 1), new Object []{ "**", Character.valueOf('*'), Block.dirt }); }thanks it works now
ModLoader.addShapelessRecipe(new ItemStack(CreeperBerry, 1), new Object [] {Item.CreeperBerrySeed});What am I doing Wrong?
The Game Crashes when I load it.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWhat is the crash report...
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.
This error has been saved to C:\Users\Josh\Desktop\The Runic Mod\Files\Files from MCP\jars\.\crash-reports\crash-2012-09-04_18.37.15-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT a594c222 --------
Generated 9/4/12 6:37 PM
- Minecraft Version: 1.3.2
- Operating System: Windows 7 (amd64) version 6.1
- Java Version: 1.7.0_05, Oracle Corporation
- Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
- Memory: 955305424 bytes (911 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
- JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
- ModLoader: Mods loaded: 19
ModLoader 1.3.2
mod_CandyCrystal 1.3.2
mod_CandyCrystalRed 1.3.2
mod_CreeperBerry 1.3.2
mod_CreeperBerryBush 1.3.2
mod_CreeperBerrySeed 1.3.2
mod_FireRubyDust 1.3.2
mod_FireRubyOre 1.3.2
mod_GravitestCrystal 1.3.2
mod_GravitestOre 1.3.2
mod_MBlueS 1.3.1
mod_MGS 1.3.1
mod_MRedS 1.3.1
mod_MYellowS 1.3.1
mod_MythicStoneBlack 1.3.1
mod_Orange 1.3.2
mod_runic 1.3.2
mod_RunicGem 1.3.2
mod_RunicOre 1.3.2
java.lang.Error: Unresolved compilation problem:
CreeperBerrySeed cannot be resolved or is not a field
at net.minecraft.src.mod_CreeperBerry.load(mod_CreeperBerry.java:11)
at net.minecraft.src.ModLoader.init(ModLoader.java:952)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:186)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:86)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
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)
--- END ERROR REPORT ef20cfbb ----------
Here's my coding:
package net.minecraft.src; public class mod_CreeperBerry extends BaseMod { public static final Item CreeperBerry = new ItemFood(2012, 4, 1F, false).setItemName("CreeperBerry"); public void load() { CreeperBerry.iconIndex = ModLoader.addOverride("/gui/items.png", "/CreeperBerry.png"); ModLoader.addName(CreeperBerry, "CreeperBerry"); ModLoader.addShapelessRecipe(new ItemStack(CreeperBerry, 1), new Object [] {youritem.CreeperBerrySeed}); } public String getVersion() { return "1.3.2"; } }Still doesn't work, Either I'm a failure at modding or something else is the problem, but I'm still not getting it..
-
View User Profile
-
View Posts
-
Send Message
Retired StaffYou haven't even defined CreeperBerrySeed yet. That's what's causing the crash and the shapeless recipe not to work. Define it and it'll work.
You didn't define your CrystalFragment block. It's set to null. It's like me telling you to make a pizza, with just flour. Go ahead and define your CrystalFragment block first. Then try again.
For example, here is a definition for an ore block of mine.
public static final Block Valkyrie = new Block(160,0, Material.rock).setBlockName("Valkyrie").setHardness(10F).setResistance(4F);Now, if this is going to be an actual block, it will be different. Eg; it's a cube of 9 items (like diamond.)
It will be lacking the Material class. But I would suggest looking at TechGuy's guide for Blocks.
Wait, wait, wait. No. That's not right. You don't have to do this under a new Java file.
In fact, you shouldn't be doing that at all. You do the new Items or Blocks, recipes, etc in your mod_CrystalPowder. Here, your mod_CrystalPowder should look like this.
package net.minecraft.src;
public class mod_CrystalPowder extends BaseMod
{
public static final Item CrystalPowder = new ItemCrystalPowder(4001).setItemName("CrystalPowder");
public static final Block CrystalFragment = new BlockCrystalFragment(160, 0).setBlockName("CrystalFragment").setHardness(3F).setResistance(4F).setCreativeTab(CreativeTabs.tabBlock);
public void load()
{
CrystalPowder.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystalpowder.png");
ModLoader.addName(CrystalPowder, "Crystal Powder");
ModLoader.addShapelessRecipe(new ItemStack(CrystalPowder, 4), new Object [] {CrystalFragment});
}
public String getVersion()
{
return "1.3.2";
}
}
This is what I mean. See how your old Block Crystal Fragment has changed? Now instead of it being null, and having no definition, it is defined. Thus, the mod knows what to do with it.