Jump to content

Recommended Posts

Posted

I have created a block that has transparency in its texture. When it loads the texture in game, the texture works as intended when the block is being held in the player's hand but when placed, the transparent parts are rendered as opaque white as if 'isOpaqueCube()' is set to true, though it is definitely set to false.

 

Block code

 

  Reveal hidden contents

 

 

models/block .json file

 

  Reveal hidden contents

 

 

models/item .json file

 

  Reveal hidden contents

 

 

blockstates .json file

 

  Reveal hidden contents

 

 

Console Log

 

  Reveal hidden contents

 

 

Thanks for the help.

Posted

I have created a block that has transparency in its texture. When it loads the texture in game, the texture works as intended when the block is being held in the player's hand but when placed, the transparent parts are rendered as opaque white as if 'isOpaqueCube()' is set to true, though it is definitely set to false.

 

Block code

 

  Reveal hidden contents

 

 

models/block .json file

 

  Reveal hidden contents

 

 

models/item .json file

 

  Reveal hidden contents

 

 

blockstates .json file

 

  Reveal hidden contents

 

 

Console Log

 

  Reveal hidden contents

 

 

Thanks for the help.

Posted

You need to set the block model in the JSON file to CUTOUT or TRANSPARENT.

Look at (colored) glass.

 

isOpaqueCube() has nothing to do with rendering.

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

You need to set the block model in the JSON file to CUTOUT or TRANSPARENT.

Look at (colored) glass.

 

isOpaqueCube() has nothing to do with rendering.

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 5/27/2016 at 9:09 PM, Draco18s said:

You need to set the block model in the JSON file to CUTOUT or TRANSPARENT.

Look at (colored) glass.

 

isOpaqueCube() has nothing to do with rendering.

 

Sorry, new to the JSON rendering system, long time gone from modding. Which json file do I need to put this in and where, for me all the glass JSON files are identical to my file except for texture name.

Posted
  On 5/27/2016 at 9:09 PM, Draco18s said:

You need to set the block model in the JSON file to CUTOUT or TRANSPARENT.

Look at (colored) glass.

 

isOpaqueCube() has nothing to do with rendering.

 

Sorry, new to the JSON rendering system, long time gone from modding. Which json file do I need to put this in and where, for me all the glass JSON files are identical to my file except for texture name.

Posted

Override

Block#getBlockLayer

to return

CUTOUT

or

TRANSPARENT

. The Grey Ghost explains each layer here.

 

Block#isOpaqueCube

is used by

Block#doesSideBlockRendering

/

Block#shouldSideBeRendered

to determine whether the faces of adjacent blocks should be rendered (opaque blocks block rendering, transparent blocks don't).

  • Like 2

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.