Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • RenderWorldEvent in new versions
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
hohserg

RenderWorldEvent in new versions

By hohserg, March 30, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

hohserg    3

hohserg

hohserg    3

  • Tree Puncher
  • hohserg
  • Members
  • 3
  • 39 posts
Posted March 30, 2020

In version 1.7.10 exists RenderWorldEvent: https://github.com/MinecraftForge/MinecraftForge/blob/1.7.10/src/main/java/net/minecraftforge/client/event/RenderWorldEvent.java

Event handling of this can be used for bake some world chunks render

Any ways for analogue in new versions?

 

Something about my task:

I have RenderWorldLastEvent handler with some world rendering which do not change until next chunk rebuild(like until blocks change). And I think that may be good idea that bake it render in chunk like block render

 

Thx for answers in advance)

  • Quote

Share this post


Link to post
Share on other sites

hohserg    3

hohserg

hohserg    3

  • Tree Puncher
  • hohserg
  • Members
  • 3
  • 39 posts
Posted March 31, 2020

Up

  • Quote

Share this post


Link to post
Share on other sites

Animefan8888    741

Animefan8888

Animefan8888    741

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 741
  • 6157 posts
Posted March 31, 2020
7 hours ago, hohserg said:

Up

There doesn't seem to be an appropriate event for what you are wanting to do on 1.15.2. I'm not sure what you want to do, but there is RenderWorldLastEvent in 1.14.4

  • Like 1
  • Quote

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.

Share this post


Link to post
Share on other sites

hohserg    3

hohserg

hohserg    3

  • Tree Puncher
  • hohserg
  • Members
  • 3
  • 39 posts
Posted March 31, 2020
2 minutes ago, Animefan8888 said:

RenderWorldLastEvent

Yes, but it are not provide way to bake custom render to chunk

  • Quote

Share this post


Link to post
Share on other sites

Animefan8888    741

Animefan8888

Animefan8888    741

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 741
  • 6157 posts
Posted March 31, 2020
1 minute ago, hohserg said:

Yes, but it are not provide way to bake custom render to chunk

There is no way for me to know what you want to do if you don't explain it. Please explain what exactly you want to do.

  • Quote

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.

Share this post


Link to post
Share on other sites

hohserg    3

hohserg

hohserg    3

  • Tree Puncher
  • hohserg
  • Members
  • 3
  • 39 posts
Posted March 31, 2020 (edited)

Ok, step by step. Abstractly, ok?

I have some render code in RenderWorldLastEvent handler.

It render dependent on some my state(mutable variable, as example).

It state can change only with changing blocks in chunk.

So render can change only with changing blocks in chunk too.

 

Therefore I want to bake it render in chunk like baked blocks models.

In version 1.7.10 it may be implement by using RenderWorldEvent, because it event fire before and after chunks render and baked with him

 

Plz, tell me moment with which it is not clear

Edited March 31, 2020 by hohserg
  • Quote

Share this post


Link to post
Share on other sites

Animefan8888    741

Animefan8888

Animefan8888    741

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 741
  • 6157 posts
Posted March 31, 2020
24 minutes ago, hohserg said:

Therefore I want to bake it render in chunk like baked blocks models.

This part is where I lose you. You want to bake your rendering data into the chunks rendering data?

  • Quote

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.

Share this post


Link to post
Share on other sites

hohserg    3

hohserg

hohserg    3

  • Tree Puncher
  • hohserg
  • Members
  • 3
  • 39 posts
Posted March 31, 2020
Just now, Animefan8888 said:

You want to bake your rendering data into the chunks rendering data?

Yes, I want it!

  • Quote

Share this post


Link to post
Share on other sites

Animefan8888    741

Animefan8888

Animefan8888    741

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 741
  • 6157 posts
Posted March 31, 2020
4 minutes ago, hohserg said:

Yes, I want it!

There is no event for that. You will need to bake your data somewhere else.

  • Like 1
  • Quote

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.

Share this post


Link to post
Share on other sites

hohserg    3

hohserg

hohserg    3

  • Tree Puncher
  • hohserg
  • Members
  • 3
  • 39 posts
Posted March 31, 2020 (edited)
2 minutes ago, Animefan8888 said:

somewhere else

What are any ways to add custom vertex data into chunks rendering data?

Edited March 31, 2020 by hohserg
  • Quote

Share this post


Link to post
Share on other sites

Animefan8888    741

Animefan8888

Animefan8888    741

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 741
  • 6157 posts
Posted March 31, 2020
2 minutes ago, hohserg said:

What are some ways to add custom vertex data into chunks rendering data?

You could look at ChunkRenderDispatcher, RegionRenderCacheBuilder, and WorldRenderer to figure out where and how.

  • Thanks 1
  • Quote

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.

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Linky132
      [1.16.4] Block not rendering as transparent

      By Linky132 · Posted 4 minutes ago

      I actually figured it out just before you posted this, but thanks anyway!
    • e2rifia
      (1.16.2) How do I use onPlayerTick?

      By e2rifia · Posted 6 minutes ago

      One step ahead?   @SubscribeEvent     public void clientTickEnd(TickEvent.PlayerTickEvent event){         if (event.phase != Phase.START || event.player == null) return;         PlayerEntity player = event.player;         Vector3d v3 = player.getLook(1);         SmallFireballEntity fireball = new SmallFireballEntity(player.getEntityWorld(), player.getPosX(), player.getPosY() + player.getEyeHeight(), player.getPosZ(), v3.x, v3.y, v3.z);         fireball.setShooter(player);         player.getEntityWorld().addEntity(fireball); }   Should I move it out of @EventBusSubscriber to somewhere else?
    • kiou.23
      [1.16] Custom Sign won't render

      By kiou.23 · Posted 12 minutes ago

      Alright, where can I learn about the ObsfuscationReflectionHelper and SRG names? (and by register, you mean registering to the VALUES field from the WoodType class?) doesn't this do it? Atlases.SIGN_MATERIALS.put(ModWoodType.EFFETE, new RenderMaterial(Atlases.SIGN_ATLAS, new ResourceLocation("effetewood:entity/signs/effete"))); if it doesn't, can you point me towards how I would write my own renderer?
    • diesieben07
      [1.16] Custom Sign won't render

      By diesieben07 · Posted 25 minutes ago

      You still need reflection to register it.   I don't know. It might be better to just make your own renderer and not use this vanilla stuff.
    • kiou.23
      [1.16] Custom Sign won't render

      By kiou.23 · Posted 32 minutes ago

      I had asked on discord and someone suggested using reflection. but yeah, a subclass is way better This is correct? public class ModWoodType extends WoodType { public static final WoodType EFFETE = new ModWoodType("effete"); protected ModWoodType(String name) { super(name); } } Yeah, you told me that in another thread. But since I don't need to use reflection, I'm going to postpone studying error handling to another week And how should I go about doing that? I tried: @SubscribeEvent public static void modelRegistryEvent(ModelRegistryEvent e) { Atlases.SIGN_MATERIALS.put(ModWoodType.EFFETE, new RenderMaterial(Atlases.SIGN_ATLAS, new ResourceLocation("effetewood:entity/signs/effete"))); } It still doesn't work (The edit screen pops up for less than a second, and appear to have the missing pink/black texture), and the actual block just is invisible (dumb question: I don't need to specify "textures/entity/..." in the resouce location, right?)
  • Topics

    • Linky132
      2
      [1.16.4] Block not rendering as transparent

      By Linky132
      Started Thursday at 04:28 PM

    • e2rifia
      2
      (1.16.2) How do I use onPlayerTick?

      By e2rifia
      Started 2 hours ago

    • kiou.23
      4
      [1.16] Custom Sign won't render

      By kiou.23
      Started 7 hours ago

    • arkeN
      50
      Failure message: Missing License Information in file Mod File

      By arkeN
      Started October 11, 2020

    • Ronshark
      2
      Bug logs Minecraft Code sortie 0

      By Ronshark
      Started 17 hours ago

  • Who's Online (See full list)

    • Choonster
    • kiou.23
    • Linky132
    • e2rifia
    • SomeoneElse
    • GenElectrovise
    • Bailym
    • Terence O'Meally
    • kinno
    • Veo
    • Danebi
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • RenderWorldEvent in new versions
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community