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

So, I have a .obj file, which I'd like to have the player sit in the center of. Not override the player's model, but have it rendered on top of them.

I know it's possible, as I've seen it done before, however, I'm unsure how to go about doing it. I know I'll need a TESR but that's about it.

 

I assume I'll have to get the player's coords then render it to that, however I've never done anything with a TESR before, which will make this difficult for me.

 

Any form of help or advice on how to go about doing this is appreciated.

  • Author

To clarify, I'm looking for general pointers on how to use a TESR as the documentation for it isn't the greatest.

10 minutes ago, NolValue said:

To clarify, I'm looking for general pointers on how to use a TESR as the documentation for it isn't the greatest.

You don't need a TESR for this. Use the RenderPlayerEvent.Post and render your object model there.

 

A TESR stands for TileEntitySpecialRenderer IE for Block Entities/TileEntities not the player.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author

Ah, alright then. I was thinking by using that I'd be overriding the player's model though.

2 minutes ago, NolValue said:

Ah, alright then. I was thinking by using that I'd be overriding the player's model though.

Do you want to draw something like a hat on the player or do you want to change the way the player looks entirely?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author

I want to draw something on top of the player, or rather around the player.

 

Not replace the model.

 

Sorry for the late response, forgot that I had made this post.

Edited by NolValue

1 hour ago, NolValue said:

I want to draw something on top of the player, or rather around the player.

 

Not replace the model.

 

Sorry for the late response, forgot that I had made this post.

Then the correct thing to do is what I originally said.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author

As it turns out, RenderPlayerEvent.post is not the proper way to do this, as I'm going to render something to a player when a button is pressed. It's going to take a lot more work than originally expected, as I need to write a custom .obj parser and renderer now using OpenGL, haha.

Edited by NolValue

3 hours ago, NolValue said:

as I need to write a custom .obj parser and renderer now using OpenGL

Which isnt that hard, forge has one for block models if you need to you can take a look at that. However if it renders on a button push it requires a little more code. Assuming on button push it needs to render for all players on the player who pushed the button this will require a capability and custom packets to sync the capability. However if not you could simply have a boolean accessible from your proxies. And render off of that.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author

Yeah, thankfully my code already has Capabilities and a packet sync setup that I can just add to, haha. 

 

Just need to figure out how to get the player who's using the keybind, which I should be able to by looking through MC's code.

8 minutes ago, NolValue said:

Just need to figure out how to get the player who's using the keybind, which I should be able to by looking through MC's code.

Minecraft#player since keybinds happen on the client.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

On 10/7/2018 at 9:19 PM, NolValue said:

Ah, alright then. I was thinking by using that I'd be overriding the player's model though.

With most events you have a choice, you can add to the the vanilla behavior or you can fully replace it. It depends on the event but some have the ability to "cancel" the vanilla behavior (and execute the code you put in the event handler), some events allow you to directly replace the contents of a field passed in the event, and some events use the Results return value (like Result.DENY). It is usually described a bit in the comments for the event, and you also trace the call hierarchy to see how the result is used.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.