This is very peculiar... I have moved all of the .png files to the minecraft.jar in MCP and I just now added a couple items and recipes to the code and... This is weird, because, you must make 2 chains and a case to make the lantern, and then combine the three items in the crafting window like so:
[ ][Chain][ ]
[ ][Chain][ ]
[ ][Casing][ ]
...
Now, here's the weird part:
When I'm testing it out, I can craft the chain and casing, and they are both using the custom .png's that I made, but when I craft the lantern, It's acting like I didn't even add the recipe. And the lantern block itself is still trying to draw from the terrain.png, even though I told it to draw form the custom .png which is located the the same place as the chain and case....
--EDIT--
Fixed it! I accidentally told it that in the recipe for the lantern to make the player put a lantern in the bottom instead of the casing! lol :tongue.gif:
Rollback Post to RevisionRollBack
"If you wish make an apple pie from scratch, you must first invent the universe." -- Carl Sagan
Let me rephrase my question. If i want to add a texture override, do i make the folder in the /temp version of the minecraft folder?
You can, I'm not sure if it will do anything, usually what I would do is compile it and then using a archiving program like 7zip or WinRar open the jar and create new files right in the jar.
Ok, I have a question, I want to make a tool that does 0 damage, but pushes the block away from where the player is facing, like pushing a block. Hoever I have no idea how to first off:
get the face that was clicked
or how to:
Set the velocity/gravity or position of an individual block, or any property for that matter, when I try setting a property it happens for all of that type of block in the whole world.
Hey, i am having reobfuscate problems, when i reobfuscate i never get the mod_somethinghere type files, i only get the stuff like Blocksomethinghere or WorldGensomethinghere, can someone help me? cause i really need some help :/
Hey, i am having reobfuscate problems, when i reobfuscate i never get the mod_somethinghere type files, i only get the stuff like Blocksomethinghere or WorldGensomethinghere, can someone help me? cause i really need some help :/
I fixed it, my computer just wasnt making the files java files :tongue.gif:
Also, now when i recompile i get this error:
src\minecraft\net\minecraft\src\mod_crateWood.java:33: class, interface, or enum
expected
}→
And my code is:
package net.minecraft.src;
public class mod_crateWood extends BaseMod {
public static final Block crateWood = new BlockCrateWood(97, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("crateWood");
public mod_crateWood()
{
ModLoader.RegisterBlock(crateWood);
crateWood.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/crateart/cratewood.png");
ModLoader.AddName(crateWood, "Crate Wood");
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
if(rand.nextInt(2) == 0)
{
int j15 = k + rand.nextInt(16) + 8;
int j17 = rand.nextInt(128);
int j20 = l + rand.nextInt(16) + 8;
(new WorldGenCrateWood(Block.crateWood.blockID)).generate(worldObj, rand, j15, j17, j20);
}
}
public String Version()
{
return "1.7.2";
}
}
}
I figured out the whole texture thing... turns out, it works alot better when you have 16X16px. file if it only has one image on it :tongue.gif:... Anyway, just one more thing, I need to have the block look different on the bottom. I know how to do this without ModLoader, but I can't seem to get it to work with ModLoader. It gives me an error for the
public int getBlockTexture(int j)
... First, it was giving me an error for the blockIndexInTexture, so I put "lantern." in front of it. That fixed it, but broke the getBlockTexture... It says "This method must return a result type of 'int'" Here's the code:
If you are using eclipse, to solve errors, just right click the error in the errors panel and press Quick Fix =D
This fixed it so it doesn't give me an error, but it still doesn't work. When I make the Image 32X16px. so that it will have two 16x16 images on it, it just compresses the image so that both images are on the block.
So, since I cannot find a way around this, I just set the render type to 1, and it looks fine.
But, I have just one last problem... When you are holding the lantern in your hand, it looks like grey snow.... I have no clue what to do for this... Any help?
Rollback Post to RevisionRollBack
"If you wish make an apple pie from scratch, you must first invent the universe." -- Carl Sagan
I just started learning to make mods today, and I would like to know how to make slabs. I already can make block (: any help would be appreciated. Thanks
Is the image still 16x16?
Please tell me the filename of your texture, where in minecraft.jar it is located, and paste your mod_Lanterns.java (if thats what you called it).
Okay, well first off yes the image is still 16x16. The png is located in the minecraft.jar in the same place as terrain.png.
And here is my mod_lanterns.java:
package net.minecraft.src;
import java.util.Random;
public class mod_lantern extends BaseMod
{
public static final Block lantern = new BlockLantern(97,0).setHardness(0.0F).setResistance(0.0F).setLightValue(1.0F).setBlockName("lantern");
public static final Item casing = new Item(2000).setItemName("lanternCasing");
public static final Item chain = new Item(2001).setItemName("ItemChain");
public static final Item ItemLantern = new Item(2002).setItemName("ItemLantern");
public mod_lantern()
{
ModLoader.RegisterBlock(lantern);
lantern.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/lantern.png");
casing.iconIndex = ModLoader.addOverride("/gui/items.png", "/ItemLanternCasing.png");
chain.iconIndex = ModLoader.addOverride("/gui/items.png", "/ItemChain.png");
ItemLantern.iconIndex = ModLoader.addOverride("/gui/items.png", "/lantern.png");
ModLoader.AddName(chain, "Chain");
ModLoader.AddName(lantern, "Lantern");
ModLoader.AddName(casing, "Casing");
ModLoader.AddRecipe(new ItemStack(chain, 1), new Object[] {
" X", " X ", "X ", Character.valueOf('X'), Block.dirt
});
ModLoader.AddRecipe(new ItemStack(casing, 1), new Object[] {
"AAA", "BCB", "AAA", Character.valueOf('A'), Block.dirt, Character.valueOf('B'), Block.sand, Character.valueOf('C'), Block.torchWood
});
ModLoader.AddRecipe(new ItemStack(lantern, 8), new Object[] {
" X ", " X ", " Y ", Character.valueOf('X'), chain, Character.valueOf('Y'), casing
});
}
public String Version()
{
return "1.7.2";
}
}
EDIT: I just made the lantern drop itself as an item. Now I am faced with just how the hell I am supposed to make the ItemLantern place the BlockLantern in the world. I am really confused and if anyone can just solve the previous issue that would be GREAT!
Rollback Post to RevisionRollBack
"If you wish make an apple pie from scratch, you must first invent the universe." -- Carl Sagan
Hey guys, sorry to bother you again, i am sorta rushing this mod cause i want to get it out tonight cause i have like 5 people pushing me to get it done, but i keep getting a really odd error :/ its like it isnt recognizing the block for some reason :/
error:
== ERRORS FOUND ==
src/minecraft/net/minecraft/src/mod_crateWood.java:26: cannot find symbol
symbol : variable crateWood
location: class net.minecraft.src.Block
(new WorldGenCrateWood(Block.crateWood.blockID)).generate(worldObj, rand, j15, j17, j20);
^
and my code is:
package net.minecraft.src;
import java.util.Random;
public class mod_crateWood extends BaseMod {
public static final Block crateWood = new BlockCrateWood(120, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("crateWood");
public mod_crateWood()
{
ModLoader.RegisterBlock(crateWood);
crateWood.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/crateart/cratewood.png");
ModLoader.AddName(crateWood, "Crate Wood");
}
public void GenerateSurface(World world, Random rand, int k, int j, int l, World worldObj)
{
if(rand.nextInt(2) == 0)
{
int j15 = k + rand.nextInt(16) + 8;
int j17 = rand.nextInt(128);
int j20 = l + rand.nextInt(16) + 8;
(new WorldGenCrateWood(Block.crateWood.blockID)).generate(worldObj, rand, j15, j17, j20);
}
}
public String Version()
{
return "1.7.2";
}
}
Thanks again if you help me, after that i wont need any help :biggrin.gif:
Try putting your image in a subfolder, for example, I did this:
-code snip-
Tried it, and it didn't work. Well, I mean it correctly loaded the textures form the subfolder, but when your holding the lantern it still looks like greyscale snow :\
Rollback Post to RevisionRollBack
"If you wish make an apple pie from scratch, you must first invent the universe." -- Carl Sagan
I don't know if I can fully explain this to you, as I myself am still figuring it out, but I think I did (I don't know because I haven't tried it yet). In the conf folder in the MCP folder (Minecraft Coder Pack/conf/) you will find some text files. Open the files called "classes.csv".
Then go all the way to the bottom and add your mod_Big.java file and the ModLoader.java file to the list that is there, following the format of the other classes. I have absolutely no idea if this will work, but it can't hurt, right?
Rollback Post to RevisionRollBack
"If you wish make an apple pie from scratch, you must first invent the universe." -- Carl Sagan
[ ][Chain][ ]
[ ][Chain][ ]
[ ][Casing][ ]
...
Now, here's the weird part:
When I'm testing it out, I can craft the chain and casing, and they are both using the custom .png's that I made, but when I craft the lantern, It's acting like I didn't even add the recipe. And the lantern block itself is still trying to draw from the terrain.png, even though I told it to draw form the custom .png which is located the the same place as the chain and case....
--EDIT--
Fixed it! I accidentally told it that in the recipe for the lantern to make the player put a lantern in the bottom instead of the casing! lol :tongue.gif:
I've created Titanium Ore with your tutorials, and made Titanium Bar smelting at furnace, made the ores spawn in the world. Everything works fine
Then i started to make tool set with Titanium Bars
Added
And
To the stated lines on "mod_FrankMods.java" file.
Then i opened "EnumToolMaterial.java" and added to the stated line again
When i try to Recompile it gives me error
"invalid method declaration; return type required"
at this line
and 6x "illegal start of type" error at the same line.
What should i do ? What is wrong with my "EnumToolMaterial.java" file
Here is my EnumToolMaterial.java file
You've made the most common mistake of all:
After GOLD you have a semicolon, it should be a comma. After TITANIUM should be a semicolon, though.
OMG thank you !
Recompile worked without errors. But i feel dizy, i'm gonna make the other things tomorrow.
Thank you so much again :smile.gif:
You can, I'm not sure if it will do anything, usually what I would do is compile it and then using a archiving program like 7zip or WinRar open the jar and create new files right in the jar.
get the face that was clicked
or how to:
Set the velocity/gravity or position of an individual block, or any property for that matter, when I try setting a property it happens for all of that type of block in the whole world.
Thanks in advanced.
I fixed it, my computer just wasnt making the files java files :tongue.gif:
Also, now when i recompile i get this error:
And my code is:
Please help :/
... First, it was giving me an error for the blockIndexInTexture, so I put "lantern." in front of it. That fixed it, but broke the getBlockTexture... It says "This method must return a result type of 'int'" Here's the code:
You have an extra brace at the end, just take off the last one.
This fixed it so it doesn't give me an error, but it still doesn't work. When I make the Image 32X16px. so that it will have two 16x16 images on it, it just compresses the image so that both images are on the block.
So, since I cannot find a way around this, I just set the render type to 1, and it looks fine.
But, I have just one last problem... When you are holding the lantern in your hand, it looks like grey snow.... I have no clue what to do for this... Any help?
Okay, well first off yes the image is still 16x16. The png is located in the minecraft.jar in the same place as terrain.png.
And here is my mod_lanterns.java:
EDIT: I just made the lantern drop itself as an item. Now I am faced with just how the hell I am supposed to make the ItemLantern place the BlockLantern in the world. I am really confused and if anyone can just solve the previous issue that would be GREAT!
error:
and my code is:
Thanks again if you help me, after that i wont need any help :biggrin.gif:
Tried it, and it didn't work. Well, I mean it correctly loaded the textures form the subfolder, but when your holding the lantern it still looks like greyscale snow :\
Errors:
TileEntityMacerator:
mod_Big
BlockMacerator
Did you add the mod_Big.java and ModLoader.java files to your reobfuscation list?
Hasn't understood, explain on more detailed.
I don't know if I can fully explain this to you, as I myself am still figuring it out, but I think I did (I don't know because I haven't tried it yet). In the conf folder in the MCP folder (Minecraft Coder Pack/conf/) you will find some text files. Open the files called "classes.csv".
Then go all the way to the bottom and add your mod_Big.java file and the ModLoader.java file to the list that is there, following the format of the other classes. I have absolutely no idea if this will work, but it can't hurt, right?