Jump to content

Tools and Chests, among other things...


atrain99

Recommended Posts

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.

Link to comment
Share on other sites

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.  :)

Link to comment
Share on other sites

I do know... Guess I just have to spend another hour in front of the tube...  xD

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • i notice a change if i add the min and max ram in the line like this for example:    # Xmx and Xms set the maximum and minimum RAM usage, respectively. # They can take any number, followed by an M or a G. # M means Megabyte, G means Gigabyte. # For example, to set the maximum to 3GB: -Xmx3G # To set the minimum to 2.5GB: -Xms2500M # A good default for a modded server is 4GB. # Uncomment the next line to set it. -Xmx10240M -Xms8192M    i need to make more experiments but for now this apparently works.
    • Selamat datang di OLXTOTO, situs slot gacor terpanas yang sedang booming di industri perjudian online. Jika Anda mencari pengalaman bermain yang luar biasa, maka OLXTOTO adalah tempat yang tepat untuk Anda. Dapatkan sensasi tidak biasa dengan variasi slot online terlengkap dan peluang memenangkan jackpot slot maxwin yang sering. Di sini, Anda akan merasakan keseruan yang luar biasa dalam bermain judi slot. DAFTAR OLXTOTO DISINI LOGIN OLXTOTO DISINI AKUN PRO OLXTOTO DISINI   Slot Gacor untuk Sensasi Bermain Maksimal Olahraga cepat dan seru dengan slot gacor di OLXTOTO. Rasakan sensasi bermain maksimal dengan mesin slot yang memberikan kemenangan beruntun. Temukan keberuntungan Anda di antara berbagai pilihan slot gacor yang tersedia dan rasakan kegembiraan bermain judi slot yang tak terlupakan. Situs Slot Terpercaya dengan Pilihan Terlengkap OLXTOTO adalah situs slot terpercaya yang menawarkan pilihan terlengkap dalam perjudian online. Nikmati berbagai genre dan tema slot online yang menarik, dari slot klasik hingga slot video yang inovatif. Dipercaya oleh jutaan pemain, OLXTOTO memberikan pengalaman bermain yang aman dan terjamin.   Jackpot Slot Maxwin Sering Untuk Peluang Besar Di OLXTOTO, kami tidak hanya memberikan hadiah slot biasa, tapi juga memberikan kesempatan kepada pemain untuk memenangkan jackpot slot maxwin yang sering. Dengan demikian, Anda dapat meraih keberuntungan besar dan memenangkan ribuan rupiah sebagai hadiah jackpot slot maxwin kami. Jackpot slot maxwin merupakan peluang besar bagi para pemain judi slot untuk meraih keuntungan yang lebih besar. Dalam permainan kami, Anda tidak harus terpaku pada kemenangan biasa saja. Kami hadir dengan jackpot slot maxwin yang sering, sehingga Anda memiliki peluang yang lebih besar untuk meraih kemenangan besar dengan hadiah yang menggiurkan. Dalam permainan judi slot, pengalaman bermain bukan hanya tentang keseruan dan hiburan semata. Kami memahami bahwa para pemain juga menginginkan kesempatan untuk meraih keberuntungan besar. Oleh karena itu, OLXTOTO hadir dengan jackpot slot maxwin yang sering untuk memberikan peluang besar kepada para pemain kami. Peluang Besar Menang Jackpot Slot Maxwin Peluang menang jackpot slot maxwin di OLXTOTO sangatlah besar. Anda tidak perlu khawatir tentang batasan atau pembatasan dalam meraih jackpot tersebut. Kami ingin memberikan kesempatan kepada semua pemain kami untuk merasakan sensasi menang dalam jumlah yang luar biasa. Jackpot slot maxwin kami dibuka untuk semua pemain judi slot di OLXTOTO. Anda memiliki peluang yang sama dengan pemain lainnya untuk memenangkan hadiah jackpot yang besar. Kami percaya bahwa semua orang memiliki kesempatan untuk meraih keberuntungan besar, dan itulah mengapa kami menyediakan jackpot slot maxwin yang sering untuk memenuhi harapan dan keinginan Anda.  
    • LOGIN DAN DAFTAR DISINI SEKARANG !!!! Blacktogel adalah situs judi slot online yang menjadi pilihan banyak penggemar judi slot gacor di Indonesia. Dengan platform yang sangat user-friendly dan berbagai macam permainan slot yang tersedia, Blacktogel menjadi tempat yang tepat untuk penggemar judi slot online. Dalam artikel ini, kami akan membahas tentang Blacktogel dan keunggulan situs slot gacor online yang disediakan.  
    • Situs bandar slot online Gacor dengan bonus terbesar saat ini sedang menjadi sorotan para pemain judi online. Dengan persaingan yang semakin ketat dalam industri perjudian online, pemain mencari situs yang tidak hanya menawarkan permainan slot yang gacor (sering memberikan kemenangan), tetapi juga bonus terbesar yang bisa meningkatkan peluang menang. Daftar disini : https://gesit.io/googlegopek
    • Situs bandar slot online Gacor dengan bonus terbesar saat ini sedang menjadi sorotan para pemain judi online. Dengan persaingan yang semakin ketat dalam industri perjudian online, pemain mencari situs yang tidak hanya menawarkan permainan slot yang gacor (sering memberikan kemenangan), tetapi juga bonus terbesar yang bisa meningkatkan peluang menang. Daftar disini : https://gesit.io/googlegopek
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.