Jump to content

Recommended Posts

Posted (edited)

I'm trying to define a block use vanilla cube model to render with 7 variant,but got some problem that block not be right render.

No error show in log(here).(block registry name is "energy_block")
Item renders well, but block got wrong.

block state in the following picture are correct.
no error "Exception loading model for variant" about this block(energy_block).

I'm sorry, I don't understand how json to model and connect with block state.


I'm not sure if I've done the wrong thing that use a wrong register Block State Mapper(here)
source code:

block(here)

  Reveal hidden contents

blockstate json(here)

  Reveal hidden contents

 

error_render.png

Edited by bxzsj
solved
Posted

You should always check the log.

And then scroll down the log some more until you see something helpful.

If you still don't, then post here, and include the log.

 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Sorry, I missed that. It was a little buried.

Nothing in the log...
https://github.com/bxz2311196368/someusefulthings/blob/1.10.2/src/main/java/com/bxzmod/someusefulthings/blocks/BlockRenderLoader.java#L18

Why are you registering state mappers at all? You're using the default state mapper, you shouldn't need to do this.

 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
  On 6/4/2018 at 2:11 PM, Draco18s said:

Sorry, I missed that. It was a little buried.

Nothing in the log...
https://github.com/bxz2311196368/someusefulthings/blob/1.10.2/src/main/java/com/bxzmod/someusefulthings/blocks/BlockRenderLoader.java#L18

Why are you registering state mappers at all? You're using the default state mapper, you shouldn't need to do this.

 

Expand  

Sorry, I don't know what is a right way to register block state mapper,can you give me some document or tutorials about it?

This is the only way I learned from a tutorial. I still haven't figured out how this part works.

Posted (edited)
  On 6/4/2018 at 2:26 PM, bxzsj said:

Sorry, I don't know what is a right way to register block state mapper,can you give me some document or tutorials about it?

This is the only way I learned from a tutorial. I still haven't figured out how this part works.

Expand  

Its not about the proper way to register a block state mapper, my point is YOU DO NOT NEED TO DO THIS AT ALL EVER unless you are doing something like "I want to split my blockstate file into two files based on X property."1

 

How did I register my blocks in 1.10?

Like this:

https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L33-L42

https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L80-L83

Do you see anything about a custom block state mapper?

 

1 This being a thing I actually did.

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

I understand, if I don't need to load blockstate json from separated files, it's no need to register block state mapper.

Now I removed register block state mapper, but it still don't work.

new log

error_render.png

Posted
  On 6/4/2018 at 3:03 PM, bxzsj said:

I understand, if I don't need to load blockstate json from separated files, it's no need to register block state mapper.

Now I removed register block state mapper, but it still don't work.

new log

Expand  
3

You do not have any models/block folder and therefore none of your blocks will have a texture.

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.

Posted
  On 6/5/2018 at 9:40 AM, bxzsj said:

what you mean, I'm using vanilla "cube" model

Expand  

Never mind I did not look into your blockstate json. Have you tried anything else since then?

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.

Posted

I made a stupid mistake.

this.setDefaultState(this.createBlockState().getBaseState().withProperty(FACING, EnumFacing.NORTH));


That makes the state in game never equal state in 

BlockModelShapes.blockStateMapper


Sorry to waste your time.

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.