Jump to content

Recommended Posts

Posted (edited)

I am trying to make a custom arrow entity that extends from the normal arrow entity class, overriding the functions that handle when a block is hit and when an entity is hit. However, I cannot find a class to extend from that has those functions. Can someone tell me what class I need to extend from to override those functions?

Edited by BLT
solution was given
Posted
14 minutes ago, Luis_ST said:

it's the Arrow class for normale Arrows and SpectralArrow class for Tipped Arrows

I checked the Arrow class, however I didn't find a function called onHit/onEntityHit or the like.

Posted
8 minutes ago, Luis_ST said:

the method exists it's Projectile#onHitEntity

So if i'm extending from Arrow, how do I override that function?

Posted
20 minutes ago, Luis_ST said:

do you know basic java?

I know the basics of object oriented langauges like C#, I am not completely familiar with Java, I dont know everything. I know how to override, using the "@Override" keyword. However, you said that this method is in a class called Projectile, which is not Arrow, how do I access Projectile from Arrow?

Posted

Projectile is the super class of AbstractArrow which is the super class of Arrow,
you can use your IDE to override the method in your Arrow class

i would also recommend you to learn the basics concept of java object orientation programming

  • Thanks 1
  • BLT changed the title to [Solved] Creating custom Arrow Entity

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



×
×
  • Create New...

Important Information

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