Posted May 15, 201213 yr I have several questions about how to use Forge: 1. How do I acess the Ore Dictionary to add my ores to it? 2. I need to make a tool somewhat like the RedPower handsaw in that it takes damage when used in the crafting of various items. 3. How do I make a block have a thin profile like the EE trans tablet? 4. How do I make said block above have an inventory (like a chest)? Thanks in advance to anyone who helps! So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.
May 15, 201213 yr I have several questions about how to use Forge: 1. How do I acess the Ore Dictionary to add my ores to it? Look in ForgeHooks.java (I think it was called). And considering all the requests lately, a tutorial might pop up soon. 2. I need to make a tool somewhat like the RedPower handsaw in that it takes damage when used in the crafting of various items. Unsure about this, wait for another to answer, I have not yet made an item that needs this. 3. How do I make a block have a thin profile like the EE trans tablet? That is vanilla Block stuff. Look at the methods about the collision size and so forth. For the visible part, look at shorter Block rendering, like the half-slab. 4. How do I make said block above have an inventory (like a chest)? Look at the chest java files, it is the de-facto example for that, basically a copy and change.
May 16, 201213 yr Author They are very, very, confusing. Can you explain it? So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.
May 16, 201213 yr Not being rude, but you need to learn Java before attempting to write a mod. The files are fairly self-explanatory...
May 16, 201213 yr Author I do know... Guess I just have to spend another hour in front of the tube... I also don't really get what file does what: GuiChest: Does the GUI (duh) TileEntityChest: ? BlockChest: Textures and stuff InventoryChest: The stuff in the inventory Please correct me if I'm wrong. So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.
May 16, 201213 yr To be honest you don't really need java experience to make mods but it helps a lot. Also be best if you go to minecraft forum's modding section and read some of the tutorials. but i'll answer some questions really quick. TileEntity is an entity that acts in the same space as a block, its mainly used to do simple tasks and save data to the block location. as for you question #2 what you need to do is make a crafting recipe that will get the items current damage, outputs the item with 1 less use, and leave it in the crafting window. I actual don't have or know the code for this but if you search the minecraft code, parts of it will be there. If you need code for something else just think what already does this and go find it's code. http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
May 16, 201213 yr Author To be honest you don't really need java experience to make mods but it helps a lot. Also be best if you go to minecraft forum's modding section and read some of the tutorials. but i'll answer some questions really quick. TileEntity is an entity that acts in the same space as a block, its mainly used to do simple tasks and save data to the block location. as for you question #2 what you need to do is make a crafting recipe that will get the items current damage, outputs the item with 1 less use, and leave it in the crafting window. I actual don't have or know the code for this but if you search the minecraft code, parts of it will be there. If you need code for something else just think what already does this and go find it's code. Thanks! Do you know of any open source mods that do these kinds of things? So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.
May 16, 201213 yr I don't know any open src mods that do what you want but minecraft src has what you need most of the time. If not Google what your looking for or search minecraft forum. It may take time but by reading threw the minecraft code you can learn alot. http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
May 17, 201213 yr Author Thanks for your help! So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.
May 24, 201213 yr For your item that gets damaged when using it in a crafting recipe, you could use this in your item file: public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { mod_****.ItemBeingDamaged.damageItem(how many uses, par3EntityPlayer); } Not 100% sure if it will work since I didn't test the code before giving it to you but it seems like it would work. Edit: Nevermind, this won't work since the item will be used up in the recipe. Doh! But, still using the onCreate method, you COULD instantiate a private variable that keeps track of the ItemBeingDamaged current damage, and when the new item is created, give the player a 'new' ItemBeingDamaged, then call damageItem(current damage + amount, par3EntityPlayer); on the 'new' ItemBeingDamaged ItemStack
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.