Jump to content

Recommended Posts

Posted

I am trying to add glass slabs to my mod but for the life of me I can not find anywhere on the internet that can explain to me how to not have the bottom of my block allow you to see through the world, how would I prevent this from happening?

2018-08-04_08.06.07.png

Posted
4 hours ago, trolio said:

I am trying to add glass slabs to my mod but for the life of me I can not find anywhere on the internet that can explain to me how to not have the bottom of my block allow you to see through the world, how would I prevent this from happening?

Post your code. Also override Block#isOpaqueCube(IBlockState).

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

Ok that might of happened while trying to fix my issue I was having what do I need to change in my class files to get this to work correctly going off the code I already have.

Posted
11 minutes ago, trolio said:

Ok that might of happened while trying to fix my issue I was having what do I need to change in my class files to get this to work correctly going off the code I already have.

Just return false instead of true. Opaque means is it see through. Sorry about long response time, got my own problems with forge lol.

Posted

Straight out of BlockGlass.java:

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

public boolean isFullCube(IBlockState state)
    {
        return false;
    }

looking at the forge code is really helpful.

Posted

ok so I am still at a loss for getting everything to work correctly if upload my entire project to github if one of you could take a look at it and comment back where and what I need to change that would help me out alot as when it comes to glass related blocks I have never used them before.

Posted
1 minute ago, Big_Bad_E said:

Is it? I think it is Forge's code cause it is open sourced and MC code is licensed.

The package is net.minecraft.block not net.minecraftforge.block It is Minecraft code, Mojang allows modding, but the only way to mod something is to interact with there code. In this case Forge provides code that you can look at, but not edit. And applies some changes though asm, and patches so you can view them.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
2 minutes ago, trolio said:

ok so I am still at a loss for getting everything to work correctly if upload my entire project to github if one of you could take a look at it and comment back where and what I need to change that would help me out alot as when it comes to glass related blocks I have never used them before.

Posting to github will help a lot at debugging.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
1 minute ago, trolio said:

ok so I am still at a loss for getting everything to work correctly if upload my entire project to github if one of you could take a look at it and comment back where and what I need to change that would help me out alot as when it comes to glass related blocks I have never used them before.

Sure.

1 minute ago, Animefan8888 said:

The package is net.minecraft.block not net.minecraftforge.block It is Minecraft code, Mojang allows modding, but the only way to mod something is to interact with there code. In this case Forge provides code that you can look at, but not edit. And applies some changes though asm, and patches so you can view them.

Forge's code in the git with patches is in the package org.minecraft, and I think the Block class is forge code, and BlockGlass extends Block, so unless Block is not modified by forge, then BLockGlass has to be forge code.

Posted
3 minutes ago, Big_Bad_E said:

Forge's code in the git with patches is in the package org.minecraft, and I think the Block class is forge code, and BlockGlass extends Block, so unless Block is not modified by forge, then BLockGlass has to be forge code.

Not exactly sure what you are trying to say, but if you look in your minecraft jar file you will see the package is net.minecraft...

Forge does patch the Block class, but that doesn't mean it isn't Minecraft code. The only thing forge did was add a few fields and methods and made it implement IForgeRegistry.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
6 minutes ago, Animefan8888 said:

Not exactly sure what you are trying to say, but if you look in your minecraft jar file you will see the package is net.minecraft...

Forge does patch the Block class, but that doesn't mean it isn't Minecraft code. The only thing forge did was add a few fields and methods and made it implement IForgeRegistry.

What I mean by it's forge code is that the class was edited by forge, not the class is completely made by forge.

I'm assuming Minecraft BlockGlass code isn't a copy of the Forge BlockGlass code.

Posted
2 minutes ago, Big_Bad_E said:

What I mean by it's forge code is that the class was edited by forge, not the class is completely made by forge.

I'm assuming Minecraft BlockGlass code isn't a copy of the Forge BlockGlass code.

Forge didn't change the BlockGlass code at all. All of the code that we are looking at in the net.minecraft package is decompiled minecraft code that has been edited to be readable by the MCP team.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.