Jump to content

Recommended Posts

Posted

so basically i wanna render an aura around the player when the player activates his aura, i created a capability for the player which stores all the information about the aura (how much he has left, has activated his aura and stuff)

now im wondering what would be the best approach to do this? i thought you could either just render it on every client when the player has his aura activated based on the value stored in the capability but for that i think you need to inform every other player via packets that the player activated his aura to render it properly on every client player, but wouldnt that be much data traffic to send it every time a player activates/deactives his aura e.g. when you have a server with alot of players? another possibility could be just to spawn an entity which moves with the player that would automatically sync with every client when done properly and i would spawn the entity based on the value stored in the player capability for that player and kill it when the player deactivates it (server side). so any ideas what would be the best approach?

 

but NOW to my main question as i never rly did much with rendering and stuff how would i render it are there any render tutorials or stuff i could read for that? i never rendered stuff in minecraft besides like custom guis so how does it work?

cuz i will have to write my own render(er) code for this.

im tryin to recreate this in minecraft:

 

232324831_HunterXHunter-89-Large02.thumb.jpg.dac50fe17d51a03b064ccb89a5f5c7fe.jpg

 

i know the dragon block c mod does this somewhat close to what im trying to do:

screen-2.thumb.jpg.ccb659812e95f62575a1ea4f04b46f2d.jpg

 

but how do you render stuff like this in minecraft do you use a custom model and render it like an entity or how do you do it?

would be glad if someone can help me out to how to LEARN to do this as i want to understand what im doing 

 

i know basic to advanced java coding so i think that should be no problem as long as i have something where i actually understand what everything does.

thanks for any help

-eatthenight <33

 

Posted

Subscribe toRenderPlayerEvent.Post and do your render there.

You might want to look up on OpenGL basics in order to do the rendering, then check out Minecraft’s Tessellator and BufferBuilder.

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Posted
2 hours ago, DavidM said:

Subscribe toRenderPlayerEvent.Post and do your render there.

You might want to look up on OpenGL basics in order to do the rendering, then check out Minecraft’s Tessellator and BufferBuilder.

hi thanks first of all!

now the thing is when i do it in renderplayerevent would it automatically sync with every other client or how would that work? i was wondering because later on i want every player to be able to change the color of the aura too i was also thinkin about adding like tails n stuff based on the players race.. so when you add new render stuff to that specific player it will be visible for every other player too or would i have to send packets to all clients to let them know when to render and what..? i will try to look up some opengl basics :))

Posted (edited)

RenderPlayerEvent is fired when a player is rendered. This includes the rendering of other players in multiplayer. You will have fetch data from the player in the event and determine the color of the aura.

Edited by DavidM

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Posted

thanks that sounds perfect! i will try it out after learning the opengl stuff. still one question i dont want to change the player model due to compatibility with other mods but is it also possible to add models to the player like a tail, hats and so on based on the capability data? what would be the best approach there?

  • 1 year later...
Posted

😃 Man, this topic is exactly what I need! I'm trying to create an aura for my mod (It would look exactly like the one from Dragon Block C... Yet, I'm still very confused... is there any way someone could relate this to me in baby language? 😅 

Quote
On 8/20/2019 at 8:56 AM, eatthenight said:

thanks man thats exactly what i needed! ill update later if i have any problems understanding.

 

Did you ever get what you needed? If so, can you tell me how to make this for my mod? (I use Mcreator, but you can still make stuff by custom code) Thanks so much! It's greatly appreciated!

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • When I first heard about Bitcoin back in 2018, I was skeptical. The idea of a decentralized, digital currency seemed too good to be true. But I was intrigued as I learned more about the technology behind it and its potential. I started small, investing just a few hundred dollars, dipping my toes into the cryptocurrency waters. At first, it was exhilarating to watch the value of my investment grow exponentially. I felt like I was part of the future, an early adopter of this revolutionary new asset. But that euphoria was short-lived. One day, I logged into my digital wallet only to find it empty - my Bitcoin had vanished without a trace. It turned out that the online exchange I had trusted had been hacked, and my funds were stolen. I was devastated, both financially and emotionally. All the potential I had seen in Bitcoin was tainted by the harsh reality that with decentralization came a lack of regulation and oversight. My hard-earned money was gone, lost to the ether of the digital world. This experience taught me a painful lesson about the price of trust in the uncharted territory of cryptocurrency. While the technology holds incredible promise, the risks can be catastrophic if you don't approach it with extreme caution. My Bitcoin investment gamble had failed, and I was left to pick up the pieces, wiser but poorer for having placed my faith in the wrong hands. My sincere appreciation goes to MUYERN TRUST HACKER. You are my hero in recovering my lost funds. Send a direct m a i l ( muyerntrusted ( @ ) mail-me ( . )c o m ) or message on whats app : + 1 ( 4-4-0 ) ( 3 -3 -5 ) ( 0-2-0-5 )
    • You could try posting a log (if there is no log at all, it may be the launcher you are using, the FAQ may have info on how to enable the log) as described in the FAQ, however this will probably need to be reported to/remedied by the mod author.
    • So me and a couple of friends are playing with a shitpost mod pack and one of the mods in the pack is corail tombstone and for some reason there is a problem with it, where on death to fire the player will get kicked out of the server and the tombstone will not spawn basically deleting an entire inventory, it doesn't matter what type of fire it is, whether it's from vanilla fire/lava, or from modded fire like ice&fire/lycanites and it's common enough to where everyone on the server has experienced at least once or twice and it doesn't give any crash log. a solution to this would be much appreciated thank you!
    • It is 1.12.2 - I have no idea if there is a 1.12 pack
  • Topics

×
×
  • Create New...

Important Information

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