Jump to content

How to make a custom Arrow ?


KhrBasil

Recommended Posts

Hello ,

I have been working on a Bow lately and the Final thing missing is an Arrow but there is a few problems...

1. I dont have any idea how to do that ...

2. I´d like to make it use a custom Render

3. I need help ....

 

So yeah.... If anyone can tell me how to make an Arrow with custom Rendering Id be more then Happy :D

Thanks in Advance ^^

( P.S if you could please explain it so that a noob like ...me... could understand it ^^" Thanks )

Link to comment
Share on other sites

Have you started at all?

I assume not, so first try to create a new item and get it into the game.

Then check the ItemArrow code and the original bow's code. Try to see if you can understand how it works.

Then write some code trying out things and come back here with it, if it's not working out and we will help you further :)

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Have you started at all?

I assume not, so first try to create a new item and get it into the game.

Then check the ItemArrow code and the original bow's code. Try to see if you can understand how it works.

Then write some code trying out things and come back here with it, if it's not working out and we will help you further :)

 

Thanks...do you know where the ItemArrow is ? because either Im Blind or its not in net.minecraft.item....

Link to comment
Share on other sites

Inside the Item.java it's located on Line 46, as you see it's not much to the arrow inn it self :)

Which is fine since it's only an item and has no special code. Since you have the bow I assumed you had looked at the original bow's code. There you will find all the logic of shooting including the creation of the entity for the arrow :)

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Let´s say that you want to make a staff that shoots i dont know balls of thunder then you first make a staff which you get from making an item and then make a custom look of the staff.

Then you write for example public class ItemStaff extends ItemBow then you´ll get an error or warning under ItemStaff if you just hover your´e mouse over it it will say add constructor.

Then click on that. Then you made your own "bow" or shooting staff. The next thing you´ll need to do is to look for an command called something like arrow or shoot or ItemArrow which you can easily fin by pressing ctrl+f and then write arrow in the box that appears and hit find. If you find it great if not then just keep looking(thats what modding is all about trial and error).

If you/ when you find it then you´ll need to make a new class or item. When your´e done making that item and you have set an image on how the ThunderBall will look then go back to your ItemStaff and change the shoot or Ammo or whatever i was called from arrow to Item.ThunderBall then you gotta write something like Item.ID i think then it should work and if you get any errors than just look at your console and see what it says or look up the error. Feel free to ask me for help.

 

Ps. I wrote something wrong don you also have to copy paste the code from ItemBow to ItemStaff and then change the shoot or ammo to Item.ThunderBall

Link to comment
Share on other sites

Or just take a look at the original bow's code, as I said above -_-'

It's easy to understand and it shows him how it's been done. Should make his learning easier and his progress to get it working faster :)

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

i had this really awesome method before.

 

I copy pasted the entire bow and EntityArrow code into new classes, chnaged names (offcourse)

 

copy the arrow renderer code too

 

register your new arrow entity in your client proxy

 

edit bow code, so it shoots your arrows

start minecraft, play around with code from arrow and bow

 

find final result after a few days, be very happy, and continue ;D

Link to comment
Share on other sites

  • 1 year later...

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.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I've been having a huge lag issue and discovered my server has a tendency to climb in ram usage, as pictured here. I've tested all mods individually on a copy of the server, with the world reset and at 1GB of ram for testing, and it happens regardless of the mod used. Here is a zip file of mods I'm using if you need it. I can provide any other info needed. I'm not doing anything special to recreate it but it does get worse when people connect to the server.
    • The Risks of Online Crypto Investment: A Cautionary Tale EMAIL: rap iddigitalreco ve ry @ exe cs. com. WHAT SAPP: + 1 41 4 80 7 14 85 Online crypto investment can seem like a promising opportunity, but it’s crucial to recognize that there are no guarantees. My own experience serves as a stark reminder of this reality. I was drawn in by the allure of high returns and the persuasive marketing tactics employed by various brokers on platforms like Instagram. Their polished presentations and testimonials made it seem easy to profit from cryptocurrency trading. Everything appeared to be legitimate. I received enticing messages about the potential for substantial gains, and the brokers seemed knowledgeable and professional. Driven by excitement and the fear of missing out, I invested a significant amount of my savings. The promise of quick profits overshadowed the red flags I should have noticed. I trusted these brokers without conducting proper research, which was a major mistake. As time went on, I realized that the promised returns were nothing but illusions. My attempts to withdraw funds were met with endless excuses and delays. It became painfully clear that I had fallen victim to a scam. The reality hit hard: my hard-earned money was gone, and I was left feeling foolish and defeated. In my desperation, I sought help from a company called Rapid Digital Recovery. They specialize in helping individuals recover funds lost to online scams. Their expertise and guidance have been invaluable during this difficult time. While I remain cautious and skeptical, I’m hopeful that they can assist me in retrieving my funds. This has taught me an important lesson: if something seems too good to be true, it probably is. I urge anyone considering online crypto investments to be extremely cautious. Do your research, scrutinize the brokers, and avoid rushing into decisions driven by hype or pressure. The world of cryptocurrency can be volatile and unregulated, making it a breeding ground for scams. while online investments can be appealing, they come with significant risks. Protect yourself by staying informed and skeptical. Learn from my experience and prioritize due diligence over quick gains. Stay away from unverified platforms and be wary of offers that sound too good to be true. Your financial security is worth the effort to ensure you’re making safe and informed decisions.
    • This is the log for Prism launcher after I added it https://mclo.gs/uXywaR5 As for AT launcher i'm not sure where to change the JVM arguments.  
    • Please help me out! Here is the report: pastebin.com/uiJMSG5Y
    • Hello,   I am playing the Modified Cobblemon modpack and I am able to join the server, the server is also hosted on my pc, but yet no one else is able to join the server, they get an error code of fieldSize is too long yet I have triple checked to be sure that all of the mods are the same outside of the client side mods. The specific code is Internal Exception: io.netty.handler.codec.DecoderException: io.netty.handler.codec.EncoderException: Java.io.EOFException: fieldSize is too long! Length is 1638, but maximum is 38. The first number changes at random but it is always a fairly large number and I have tried looking and logs and it says that there are mismatched mods between the server and client yet they are both present so I am not sure what is creating an issue for players joining. Client Log https://pastebin.com/UxpcCXr6 https://pastebin.com/aWuHaN57 I had to split the client log because it was too large for a single pastebin, I have had all three friends try to join the server and they all get this message but the client logs provided are from the person joining from LAN. Forge version is 47.3.11. Any help or insight on what is causing the issue would be greatly appreciated.
  • Topics

×
×
  • Create New...

Important Information

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