Jump to content

Recommended Posts

Posted

So, I've made a procedure for activating an aura around the player when they hit a certain key. (R and X to be exact) They do certain things too, but as of now, they only release this buggy custom particle that I made which looks trashy in the long run and I wouldn't want that to be what the aura looks like when I upload the actual release of the mod. I've seen this exact topic before, but in 1.12.2, and when I asked if he'd figured it out, the topic was archived because of support no longer going to 1.12.2, which I don't use anyway, so it's fine. 

screen-2.jpg.bf358522f2dc748b04697e1191061864.thumb.jpg.03c90590e0d0aaaed018e30309c3f0f6.jpg

As said in that post, I too would love the aura to look like this. Also, they gave the link to an outdated resource at https://greyminecraftcoder.blogspot.com/2014/12/the-tessellator-and-worldrenderer-18.html. The author of the topic seemed to understand how to do it and said he'd update if he had any problems understanding. He never posted again, so I'm wondering if he figured it out. The topic that was used in the link was for making a block I believe, but I'm trying to make a particle that looks like that and comes off the player in all directions. Basically, the aura I have only comes out in the player's direction, which I can't seem to fix, and so when I make multiple particles spawn, it doesn't encompass the player like the aura in the picture and just looks like multiple auras side by side. If I could get any help, that would be amazing! I'm terrible at coding, so if there's a slow paced reply, that would be great, and also if you could tell me where to insert the code portion. Thanks again!

Posted (edited)

 

6 hours ago, CaiGuyCrafter said:

So, I've made a procedure for activating an aura around the player when they hit a certain key.

I'm only quoting so that you receive a notification, because normally replies don't notify for some reason.

Anyway Your best bet to create an aura would be a render overlay like how the player is on fire, and activate it from a RenderLivingEvent: 

@Mod.EventBusSubscriber(modid = Main.MOD_ID)
public class ForgeSubscribeEvents {

  @SubscribeEvent
  public void onRenderEntity(RenderLivingEvent.Post event) {
      //code here
  }
}

In the event you'll handle pushing and popping the render matrix stack, which is what the post on greyminecraftcoder is talking about, despite being a bit outdated. I've tried tackling it here in 1.16.X but with little success. 

It might be easier to go the particle route if you still want to do that though. This would be handled by a LivingUpdateEvent which you've probably already done:

@SubscribeEvent
public static void onLivingUpdate(final LivingEvent.LivingUpdateEvent event) {
	//code here
}

However bending which way the particles face as per the link so that they're concentric to the player would still likely involve the matrix stack. 

Edited by urbanxx001

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.

Announcements



×
×
  • Create New...

Important Information

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