Jump to content

2 short questions


Tavi007

Recommended Posts

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.

Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

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