Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello,
 

I was creating a variant of the slime block in my mod and my code and files looks like this

 

Forge Version : Latest/1.12.2-14.23.4.2703

Block code : https://pastebin.com/gcw1rJ7F

(Block Material is Clay)

Blockstate :

{
    "variants": {
        "normal":{"model":"slimemod:bloody_slime_block"}
    }
}

Model : https://pastebin.com/6Cw7u8Zj

Texture in attachment.

 

And when im placing the block on my world this happen :

http://prntscr.com/jq2no1

http://prntscr.com/jq2nu9

 

In all directions of the block (Top, Bottom, N, S,E,W) it shows air.
It want to show the texture of the block behind but find nothing to show maybe ?

Thank you for reading and have a nice day/night (Sorry if my english sucks :c ).

bloody_slime_block.png

Edited by Riss_Crew

Your pastbin links aren't working so I can't see your code. But you should make sure you have the following method in your block class:

 

    @Override
    @SideOnly(Side.CLIENT)
    public BlockRenderLayer getBlockLayer()
    {
        return BlockRenderLayer.TRANSLUCENT;
    }

 

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

  • Author

Hi @jabelar thank you for your reply.
I've updated the links they works correctly now.
I've tried to override the @SideOnly but it change nothing :/

Look into BlockBreakable class (BlockSlime extends it)... you have to override isOpaqueCube to not see the air

  • Author

@Terrails Thanks you a lot :D !

 

I added this to my ClientSide

@Override
    public boolean isOpaqueCube(IBlockState state)
    {
        return false;
    }

And now it works correctly

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...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.