2. When I try to make a block appear in the creative manu I just get a error. It stands tabBlock cannot be resolved or is not a field
Why?
MCP would have changed the name when it updated the field and method names. The latest is tabBlock. I don't know what is was called before the name was updated. Backup your source then decompile again and get the correct names.
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 still can't get my block to show up, I feel that I've not registered it, and I also feel I'm leaving a step out.
To enter a block into the game via coding, eclipse, MCP, etc. don't I have to do something like reobfuscate, recompile? If not, then why doesn't my block show up when I put the dirt into the crafting table?
I still can't get my block to show up, I feel that I've not registered it, and I also feel I'm leaving a step out.
To enter a block into the game via coding, eclipse, MCP, etc. don't I have to do something like reobfuscate, recompile? If not, then why doesn't my block show up when I put the dirt into the crafting table?
If I need to show my coding, AGAIN, I'll post it.
I don't know where your code is so you'll have to post it again. If using Eclipse your code is automatically built when you run the game through it.
Hey Techguy, would the same Creative Menu method work for items?? Say if mine was a food or if it was a battery could I define as to where they are stationed in the tabs?? I'm pretty sure when you add the food variables it will automatically add it to the food tab, but if I made a battery say, can I use the same method for the blocks to add my battery to redstone tab?? Note my mod doesn't add a battery I'm just asking if it's possible to do that. Thanks.
I haven't tested it but it should.
EDIT: For items you use:
setTabToDisplayOn(CreativeTabs.tabFood);
and just define the tab you want to use like with blocks.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I am not lucky, my post got buried twice...
Here is a link:
That is a strange error. I haven't ever really come across something like that. Try asking in Mod Development.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Hey, I'm working on a mod, and I was wondering if you could help me by doing a tutorial for generating things like villages, with randomly generated random objects from a list kind of thing. How different would that be from the structures tutorial?
Could you also do one for armors, and maybe item powers (like the flint and steel)? Thanks, that would help a lot! Your tutorials are very nice to have, and they've gotten me into modding. Thanks for explaining the coding too!
Techguy, I am pulling this from a while back, there are currently two versions, one that someone fixed up for me, and the one I did. Now, not only am I trying to add in redstone properties for them, but I am also trying to figure out how to edit the redstone torches, to where they would last two minutes/120 seconds. Like a timer. Once they exceed the time, they brun out for good and you can have burnt out redstone torches. They're supposed to be like batteries in my mod.
Right now, that's pretty much all I need to know, is how to give the redstone torches health9tick each second, subtract one per second), how to put a block in the game, and how to make those blocks give off redstone power.
Here is coding, I still need basic block entry, and redstone application.
mod_Core
package net.minecraft.src;
public class mod_Core extends BaseMod
{
public static final Block mod_Core = new Core(200, 0).setBlockName("mod_Core").setHardness(3F).setResistance(4F).setLightValue(12F);
public void load()
{
mod_Core.blockIndexInTexture = ModLoader.addOverride("/gui/item.png", "/C:/Users/Anthony/Desktop/core.png");
ModLoader.registerBlock(mod_Core);
ModLoader.addName(mod_Core, "Core");
ModLoader.addRecipe(new ItemStack(mod_Core, 1), new Object [] {"#", "#", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.3.1";
}
}
Core
package net.minecraft.src;
import java.util.Random;
public class Core extends Block
{
public Core(int i, int j)
{
super(200, 0, Material.rock);
}
public int id200(int i, Random random, int j)
{
return mod_Core.mod_Core.blockID;
}
public int quantity1(Random random)
{
return 1;
}
}
Could someone explain why this doesn't work (no errors, but doesn't work as it's supposed to; and of course names have been changed.)?
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { if(par5EntityPlayer.getHeldItem().equals(new ItemStack(mod_MyMod.MyIngot))) { ModLoader.openGUI(par5EntityPlayer, new GuiMyGui()); return true; } else { return false; } } }
Probably because you didn't put your code in a spoiler [/joke]
I think that it is likely because you are trying it in 1.3.1 and Guis don't work so well in 1.3.1...
And what do you mean that it wont work well? Do you mean that it just doesn't open the Gui?
Also: You could try asking in mod development
why do the tools keep switching between compatible and not compatible with 1.3.1
They only switched once.
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 am not sure what the problem is, but when when I choose the eclipse folder as my Workspace, nothing shows up on the left. No files/directories, nothing.
Have I done something wrong? I am completely sure I have followed every step exactly how you say to. I have tried it multiple times but nothing shows up at all after every try.
Rollback Post to RevisionRollBack
"A sound soul, dwells within a sound mind, and a sound body."
I am not sure what the problem is, but when when I choose the eclipse folder as my Workspace, nothing shows up on the left. No files/directories, nothing.
Have I done something wrong? I am completely sure I have followed every step exactly how you say to. I have tried it multiple times but nothing shows up at all after every try.
Hey, have a little problem here with a stair block. Whenever I add the recipe for the stair, this error is thrown and the game crashes on startup:
====================
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
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)
Caused by: java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: 6
at net.minecraft.src.ModLoader.init(ModLoader.java:963)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:161)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:86)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
... 3 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 6
at java.lang.String.charAt(Unknown Source)
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:185)
at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:482)
at net.minecraft.src.mod_ArchitecturePlus.load(mod_ArchitecturePlus.java:59)
at net.minecraft.src.ModLoader.init(ModLoader.java:927)
... 6 more
====================
But if I don't have a recipe, it works just fine. Here is the recipe code incase you need it:
MCP would have changed the name when it updated the field and method names. The latest is tabBlock. I don't know what is was called before the name was updated. Backup your source then decompile again and get the correct names.
together they are powerful beyond imagination."
To enter a block into the game via coding, eclipse, MCP, etc. don't I have to do something like reobfuscate, recompile? If not, then why doesn't my block show up when I put the dirt into the crafting table?
If I need to show my coding, AGAIN, I'll post it.
I don't know where your code is so you'll have to post it again. If using Eclipse your code is automatically built when you run the game through it.
I haven't tested it but it should.
EDIT: For items you use:
and just define the tab you want to use like with blocks.
together they are powerful beyond imagination."
Here is a link:
That is a strange error. I haven't ever really come across something like that. Try asking in Mod Development.
together they are powerful beyond imagination."
Kill two stones with one bird whenever possible
Could you also do one for armors, and maybe item powers (like the flint and steel)? Thanks, that would help a lot! Your tutorials are very nice to have, and they've gotten me into modding. Thanks for explaining the coding too!
how do i do that???????????????/
Right now, that's pretty much all I need to know, is how to give the redstone torches health9tick each second, subtract one per second), how to put a block in the game, and how to make those blocks give off redstone power.
Here is coding, I still need basic block entry, and redstone application.
mod_Core
package net.minecraft.src;
public class mod_Core extends BaseMod
{
public static final Block mod_Core = new Core(200, 0).setBlockName("mod_Core").setHardness(3F).setResistance(4F).setLightValue(12F);
public void load()
{
mod_Core.blockIndexInTexture = ModLoader.addOverride("/gui/item.png", "/C:/Users/Anthony/Desktop/core.png");
ModLoader.registerBlock(mod_Core);
ModLoader.addName(mod_Core, "Core");
ModLoader.addRecipe(new ItemStack(mod_Core, 1), new Object [] {"#", "#", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.3.1";
}
}
Core
package net.minecraft.src;
import java.util.Random;
public class Core extends Block
{
public Core(int i, int j)
{
super(200, 0, Material.rock);
}
public int id200(int i, Random random, int j)
{
return mod_Core.mod_Core.blockID;
}
public int quantity1(Random random)
{
return 1;
}
}
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumProbably because you didn't put your code in a spoiler [/joke]
I think that it is likely because you are trying it in 1.3.1 and Guis don't work so well in 1.3.1...
And what do you mean that it wont work well? Do you mean that it just doesn't open the Gui?
Also: You could try asking in mod development
What do you mean by this?
They only switched once.
together they are powerful beyond imagination."
Have I done something wrong? I am completely sure I have followed every step exactly how you say to. I have tried it multiple times but nothing shows up at all after every try.
http://www.youtube.com/playlist?list=PL1F9E91B6236BE799&feature=plcp
====================
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
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)
Caused by: java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: 6
at net.minecraft.src.ModLoader.init(ModLoader.java:963)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:161)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:86)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
... 3 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 6
at java.lang.String.charAt(Unknown Source)
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:185)
at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:482)
at net.minecraft.src.mod_ArchitecturePlus.load(mod_ArchitecturePlus.java:59)
at net.minecraft.src.ModLoader.init(ModLoader.java:927)
... 6 more
====================
But if I don't have a recipe, it works just fine. Here is the recipe code incase you need it:
ModLoader.addRecipe(new ItemStack(cobbleBrickStair, 4), new Object[] {"#", "##", "###", Character.valueOf('#'), cobbleBrick} );Would greatly appreciate if someone could help me out here! Thanks in advance.
http://www.planetminecraft.com/blog/125-halo-3-weapons---custom-content-for-flans-mods/