Posted August 4, 20187 yr 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?
August 4, 20187 yr 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.
August 4, 20187 yr Author I put both the main class and the actual slab half class in here and this is my code https://pastebin.com/X2tw6Dtg (Half) https://pastebin.com/2Yd5j8qp (Main Slab)
August 4, 20187 yr 1 minute ago, trolio said: I put both the main class and the actual slab half class in here and this is my code https://pastebin.com/X2tw6Dtg (Half) https://pastebin.com/2Yd5j8qp (Main Slab) Override isOpaqueCube() to tell MC that it's opaque. Edited August 4, 20187 yr by Big_Bad_E
August 4, 20187 yr Author I just tried that and it is still giving me the same thing as in the screenshot I provided.
August 4, 20187 yr Author I posted everything minus the double slab class that relates to my blocks outside of the actual ModBlocks class where I initialize the instance of the blocks here that class is https://pastebin.com/qbJCvtzV
August 4, 20187 yr https://www.google.com/search?q=opaque&oq=Opaque&aqs=chrome.0.0l6.4339j1j7&sourceid=chrome&ie=UTF-8 You literally overrided it to set it to its default value.
August 4, 20187 yr Author 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.
August 4, 20187 yr 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.
August 4, 20187 yr Author ok that fixed my issue with the sides but it can still does it for the bottom of the block
August 4, 20187 yr 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.
August 4, 20187 yr 2 minutes ago, Big_Bad_E said: looking at the forge code is really helpful. Minecraft code 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.
August 4, 20187 yr Just now, Animefan8888 said: Minecraft code Is it? I think it is Forge's code cause it is open sourced and MC code is licensed.
August 4, 20187 yr Author 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.
August 4, 20187 yr 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.
August 4, 20187 yr 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.
August 4, 20187 yr 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.
August 4, 20187 yr 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.
August 4, 20187 yr 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.
August 4, 20187 yr 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.
August 4, 20187 yr Author Sorry it took so long to get back had some issues figuring out how to upload to github but here is what I got with a git link https://github.com/trolio/morethings1/tree/master/master
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.