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 havent been able to find a good resource for this and all the vanilla code here is obfuscated. I want to create a generic projectile entity i can use for my mod. most likely one that i will make sub classes of for more specific things. what I need to know about the entity is where its coming from (who or what shot it) and what direction its going, and when it hits something. Im not asking for someone to do the work for me, im just having trouble wrapping my mind around how it works and am looking for any good resources/tutorials/tips.

I would look at the vanilla SnowballEntity code.

If there are lots of srg names in there, update your mappings, and you should be able to get something halfway readable. I see this in the SnowballEntity in mine from 20200604:

Quote

   /**
    * Called when this EntityThrowable hits a block or entity.
    */
   protected void onImpact(RayTraceResult result) {

Which looks promising for what you're describing. Also of course look at the parent class.

1 hour ago, Mekelaina said:

what do you mean by update mappings?

in your build.gradle, find the mappings line like so:

Quote

mappings channel: 'snapshot', version: '20200604-1.15.1'

And change the date part to today. They don't often break, so using the current should be fine.

Then refresh your project in your IDE, and it should update the mappings used.

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.