Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (โ‹ฎ) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

  • 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.

  • 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?

  • 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?

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

  • 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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions โ†’ Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.