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
  • 556 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
  • 556 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

    • avbavey
      Can’t download forge on Mac?

      By avbavey · Posted 2 minutes ago

      I tried downloading the launcher from the website, then I go to Finder and locate it and double click it. Then it shows a pop up that says “the java JAR file (name of the file) could bot be launched.” How do I open it?? Also, this sounds weird but the Mac keyboard stopped working so I have to use a Windows keyboard with the Mac computer. Please help ASAP!
    • Shrayzz
      Forge 1.4.7 : Problèmes d'installation

      By Shrayzz · Posted 11 minutes ago

      Bonjour, j'aimerais me faire une partie en 1.4.7 moddé car certains mods ne sont disponibles que sur cette version. Récemment, j'ai acheté une nouvelle voiture pc l'ancien ne marchait plus. Le problème, c'est qu'étant donné que le fichier "minecraft.jar" du dossier "bin" de ".minecraft" n'existe plus. Le type d'installation de forge n'est plus le même qu'avant, je suis donc allé voir sur des forums pour savoir comment je pourrais faire mais tous sont obsolètes. Pourriez-vous m'aider à installer cette version, je voulais savoir si on pouvait toujours en faire des serveurs avec cette version? Merci de votre réponse.
    • PedreHenrry
      my minecraft crashed by "rendering overlay"

      By PedreHenrry · Posted 15 minutes ago

      tomorrow i do this  
    • ChampionAsh5357
      How to register WallOrFloorItem / Torch

      By ChampionAsh5357 · Posted 1 hour ago

      Nope, you're just registering the item twice. Your block calls this method which creates an item to which you then create another item under the same name.
    • StealthyNoodle
      How to register WallOrFloorItem / Torch

      By StealthyNoodle · Posted 1 hour ago

      Certainly! https://github.com/Fnkee/solidrocks I see that I'm running a copy method on the torch, under the ItemTagsProvider (ModItemTagsProvider). That should be transfering data from the block tag into an item tag. Maybe that's what's causing the duplicate registration.
  • Topics

    • avbavey
      0
      Can’t download forge on Mac?

      By avbavey
      Started 2 minutes ago

    • Shrayzz
      0
      Forge 1.4.7 : Problèmes d'installation

      By Shrayzz
      Started 11 minutes ago

    • PedreHenrry
      4
      my minecraft crashed by "rendering overlay"

      By PedreHenrry
      Started 4 hours ago

    • StealthyNoodle
      5
      How to register WallOrFloorItem / Torch

      By StealthyNoodle
      Started 13 hours ago

    • Sr_endi
      0
      [1.16.4]How to set the light value of an block

      By Sr_endi
      Started 1 hour ago

  • Who's Online (See full list)

    • Shrayzz
    • avbavey
    • MadSkillMaster
    • larsgerrits
    • ChampionAsh5357
    • Draco18s
    • Nuparu00
    • Choonster
    • gottsch
    • Fnaf_zodiac
  • 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