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
  • [Solved] [1.16.3] Blocks adjacent to transparent block not showing
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
twcrime

[Solved] [1.16.3] Blocks adjacent to transparent block not showing

By twcrime, November 20, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

twcrime    0

twcrime

twcrime    0

  • Tree Puncher
  • twcrime
  • Members
  • 0
  • 3 posts
Posted November 20, 2020 (edited)

Hello, I am new to modding, somewhat new to programming and currently working on my first mod.

I managed to make one of my blocks translucent, however the adjacent blocks don't show.  It's a full cube and the only solutions I've found so far are for older versions which don't seem to work anymore. I'd be very grateful for help :)

 

public class Cloud extends Block {

    public Cloud() {
        super(AbstractBlock.Properties.create(Material.SNOW)
                .hardnessAndResistance(0.3f,0.3f)
                .sound(SoundType.SNOW)
                .harvestLevel(0)
        );
    }

}

 

public class Cloudcraft
{
    private static final Logger LOGGER = LogManager.getLogger();
    public static final String MOD_ID = "cloudcraft";
    public Cloudcraft() {

        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);
        RegistryHandler.init();

        MinecraftForge.EVENT_BUS.register(this);
    }

    private void setup(final FMLCommonSetupEvent event) {
        RenderTypeLookup.setRenderLayer(RegistryHandler.CLOUD.get(), RenderType.getTranslucent());
    }

    private void doClientStuff(final FMLClientSetupEvent event)  { }
}

 

If there's other parts of the code that could be relevant, please let me know

 

 

2020-11-20_11.27.13.png

Edited November 20, 2020 by twcrime
  • Quote

Share this post


Link to post
Share on other sites

Beethoven92    69

Beethoven92

Beethoven92    69

  • Dragon Slayer
  • Beethoven92
  • Members
  • 69
  • 560 posts
Posted November 20, 2020

You also need to chain setOpaque to your block properties. See the Blocks class and vanilla transparent blocks to get and idea how to use it

  • Quote

Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port

A little fun project: https://www.curseforge.com/minecraft/mc-mods/two-players-one-horse

Share this post


Link to post
Share on other sites

twcrime    0

twcrime

twcrime    0

  • Tree Puncher
  • twcrime
  • Members
  • 0
  • 3 posts
Posted November 20, 2020

Couldn't find setOpaque but added notSolid() instead (which I thought I tried earlier but apparently didn't). That fixed it! Thank you

  • Quote

Share this post


Link to post
Share on other sites

Beethoven92    69

Beethoven92

Beethoven92    69

  • Dragon Slayer
  • Beethoven92
  • Members
  • 69
  • 560 posts
Posted November 20, 2020

I apologize, it was my mistake, the method is of course notSolid. If you can't see setOpaque though that means you have outdated mappings

  • Quote

Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port

A little fun project: https://www.curseforge.com/minecraft/mc-mods/two-players-one-horse

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

    • MasterQuentus
      Minecraft says 200 mods installed 198 loaded

      By MasterQuentus · Posted 5 minutes ago

      OK will do when I get off work 
    • JoehnMama
      minecraft crashes as soon as I use shaders

      By JoehnMama · Posted 10 minutes ago

      And it's funny because I was able to run shaders before and now I can't
    • BBoi69
      My modpack takes years to load

      By BBoi69 · Posted 10 minutes ago

      well- i closed it with the task manager and gave you the log... what should i do now?
    • JoehnMama
      minecraft crashes as soon as I use shaders

      By JoehnMama · Posted 12 minutes ago

      Using either Oceano or chocopic  
    • diesieben07
      Minecraft says 200 mods installed 198 loaded

      By diesieben07 · Posted 16 minutes ago

      Post the debug.log.
  • Topics

    • MasterQuentus
      2
      Minecraft says 200 mods installed 198 loaded

      By MasterQuentus
      Started 20 minutes ago

    • JoehnMama
      12
      minecraft crashes as soon as I use shaders

      By JoehnMama
      Started 9 hours ago

    • BBoi69
      6
      My modpack takes years to load

      By BBoi69
      Started 6 hours ago

    • lulw
      1
      Optifine and forge not working

      By lulw
      Started 22 minutes ago

    • squidlex
      4
      How to run code every time a Potion effect is applied

      By squidlex
      Started 1 hour ago

  • Who's Online (See full list)

    • Draco18s
    • Klarks
    • domi0908
    • Bailym
    • MasterQuentus
    • vemerion
    • JoehnMama
    • BBoi69
    • diesieben07
    • Sterling00
    • lulw
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [Solved] [1.16.3] Blocks adjacent to transparent block not showing
  • Theme

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