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
  • Glass Rendering
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
Ron_Parker

Glass Rendering

By Ron_Parker, November 25, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Ron_Parker    0

Ron_Parker

Ron_Parker    0

  • Tree Puncher
  • Ron_Parker
  • Members
  • 0
  • 29 posts
Posted November 25, 2020

I am making a Glass Block and when you look at the block you can see through the world and through blocks around it. Does anyone know how to fix this?

 

Here's my Block class:

public class CoolGlass extends GlassBlock {
    public CoolGlass(Properties properties) {
        super(properties);
    }

    @Override
    public boolean isSideInvisible(BlockState state, BlockState adjacentBlockState, Direction side) {
        if (adjacentBlockState.getBlock() instanceof CoolGlass) {
            if (adjacentBlockState.getRenderType() == state.getRenderType()) {
                return true;
            }
        }

        return super.isSideInvisible(state, adjacentBlockState, side);
    }

    @Override
    public int getOpacity(BlockState state, IBlockReader world, BlockPos pos) {
        return world.getMaxLightLevel();
    }
}

Thanks in advance!

  • Quote

Share this post


Link to post
Share on other sites

Luis_ST    6

Luis_ST

Luis_ST    6

  • Diamond Finder
  • Luis_ST
  • Members
  • 6
  • 360 posts
Posted November 25, 2020 (edited)

I had the same problem you have to add to the block properties

.notSolid()

i Think this will fix the problem 

Edited November 25, 2020 by Luis_ST
  • Quote

Share this post


Link to post
Share on other sites

Ron_Parker    0

Ron_Parker

Ron_Parker    0

  • Tree Puncher
  • Ron_Parker
  • Members
  • 0
  • 29 posts
Posted November 25, 2020

Thank you so much!!! You are a saint!

  • Quote

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

    • Eksity
      Another freaking "error in currently selected datapacks prevented world from loading"

      By Eksity · Posted 2 minutes ago

      great. Is there anything I can do other than go mod-by-mod and test everything?
    • diesieben07
      Another freaking "error in currently selected datapacks prevented world from loading"

      By diesieben07 · Posted 3 minutes ago

      Well, it looks like some of the mods you have installed are breaking your world. I can't tell from the logs which one it is though.
    • Eksity
      Another freaking "error in currently selected datapacks prevented world from loading"

      By Eksity · Posted 5 minutes ago

      also if I save and quit and try to rejoin it doesn't work
    • Eksity
      Another freaking "error in currently selected datapacks prevented world from loading"

      By Eksity · Posted 7 minutes ago

      I can create a new world, and for some reason there's a survival world that works if I remove all the armor mods I was using for my video. however, all other worlds seem to be broken. I tried re-creating it as well as duplicating the file in minecraft/saves, although I'm not sure if either of those have any effect.
    • diesieben07
      Another freaking "error in currently selected datapacks prevented world from loading"

      By diesieben07 · Posted 12 minutes ago

      Does the same occur with a fresh world?
  • Topics

    • Eksity
      12
      Another freaking "error in currently selected datapacks prevented world from loading"

      By Eksity
      Started 19 hours ago

    • Ariel David
      1
      Do i need minecraft installed

      By Ariel David
      Started 28 minutes ago

    • Skyriis
      12
      [1.16.5] Adding a Button to KeyBindings

      By Skyriis
      Started Wednesday at 11:07 PM

    • Deadlocked47
      1
      Can't get into forge discord

      By Deadlocked47
      Started 21 hours ago

    • IntentScarab
      6
      (SOLVED)[1.16.4] Block entity invalid

      By IntentScarab
      Started 1 hour ago

  • Who's Online (See full list)

    • vemerion
    • Eksity
    • diesieben07
    • Beethoven92
    • gottsch
    • IntentScarab
    • Aviator737
    • KatiePandaEx
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Glass Rendering
  • Theme

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