Posted April 7, 20223 yr 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 April 9, 20223 yr by BLT solution was given
April 7, 20223 yr Author 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.
April 7, 20223 yr Author 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?
April 7, 20223 yr Author 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?
April 7, 20223 yr 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
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.