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

Hello!

 

I've got 2 questions about to different things. The first is about filling a capability and the second about particles.

 

1. So I've got a working capabilities for projectile entities and I want to fill it with data from its source. I also got other capabilities, where I use the AttachCapabilitiesEvent to fill them (I use data, that I loaded from json). Now in the case for the projectile entity I wanted to use func_234616_v_(), which should return the shooter of my projectile. But this functions always returns null, mostly likely because the shooter hasn't be set yet. Should I use an other event or is there some other way to get the shooter, that I'm not aware of?

 

2. I have 4 particles, which are all working as intended. But I also have a lot of code duplication going on, because all 4 particles behave the same, except the texture and when they are supposed to be displayed. What would be the better solution, than copying the code 4 times like I did?

 

Just in case you want to look at my code, here is my repository. The code for the particles is here and they are getting generated here. Trying to get the shooter of a particle can be found here.

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.