Jump to content

[1.10.2] Rendering an EnchantmentTable book with diffrent texture


SHsuperCM

Recommended Posts

Soo.. Might sound really stupid but I need help with this...

 

I got 0 expirience with rendering, almost no expirience with TileEntities

and I dont know even where to start.....

 

I want to render the book from the enchantment table on my block,

I dont know if I need it to be a tile entity or that stuff so I came here

like any one who struggles with forge..

It should also be noted that I want the book to have a diffrent texture....

 

 

TNX for anyone willing to help!

Doing stuff n' things

Link to comment
Share on other sites

Sadly im not sure if this can be done with IBakedModels look into that, but before that look into how vanilla does that. I assume that it uses a TESR, if it can not be done using a IBakedModel or even a JSON model use a TESR.

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.

Link to comment
Share on other sites

Sadly im not sure if this can be done with IBakedModels look into that, but before that look into how vanilla does that. I assume that it uses a TESR, if it can not be done using a IBakedModel or even a JSON model use a TESR.

Its not a TESR, it uses the MODEL enum type..

Doing stuff n' things

Link to comment
Share on other sites

Im going to school now so i cant code :'(

(From phone)

But i started to copy stuff from the block and the tile entity...

Is that all i need? Do i need something else to register it?

If it doesn't use a TESR and it is not an inventory based block you are using no need to have a TE. If it uses the model system look into its JSONs that will be your source unless minecraft has a workaround or they use an entity to draw the book.

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.

Link to comment
Share on other sites

In minecraft it is a tile entity and i copied almost everything except i found there is a renderer class that i dont know how to register...

That renderer class is a TESR (TESR stands for TileEntitySpecialRenderer) if you look into that class you will see it extends TileEntitySpecialRenderer. This is registered via

ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer());

*Note Pseudo-code not sure what would happen if you tried to do this...I am actually kind of curious.

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.

Link to comment
Share on other sites

Nvm, im a bit stupid...

 

In class breaks i was coding on my laptop and figured it all..

 

Exactly what i needed! Apperently it was a text but the renderer type said enum model which is what confused me...

 

I uses the bind TE to renderer and it works! Thanks anyways!

 

Closed

 

Btw im typing from my phone and its really hard  ;D

Doing stuff n' things

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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