Started by
offplay_
on
Topic category: Help with Minecraft modding (Java Edition)
Title says it all. I have a custom made 7 pixel high block. Works as intended except it doesn't suffocate grass or convert path to dirt when placed on them. any tips for this? The block is not "solid" that being not a full block, yet not transparent. any tips?
Edited by offplay_ on Wed, 07/19/2023 - 05:38
I think I found a solution, albeit a messy one. Yes, it involves code but only a single word.
Grass, dirt paths, farmland, etc. seem to be looking for a "solid" block above them. It took forever but I finally figured out what "solid" means. Apparently, "solid" means it doesn't have the material property "noOcclusion". Btw, material properties are basically what you are editing on the third MCreator page of a custom block. For some reason, I think, blocks that have a non full block shape get permanently stuck with the "noOcclusion" property. You can see it around line 7 when you click on generated code viewer in the top left of a custom block tab.
MCreator is lying to you and the generated code viewer is not the same as the block's actual code. The code from the generated code viewer will automatically override the code in the files UNLESS the custom block is locked.
So here's what to do:
1. Right click on the custom block and click "Lock/unlock mod element".
2. Double click the locked block and open the file that has the name of your block and ends in ".java" (It should be green).
3. Delete ".noOcclusion()" (it's around the first indented line).
4. Close the tab and click "close and save".
And that's it (hopefully). Btw, you can unlock the custom block to make any changes to it but it will revert back to before you edited the code. Make sure you repeat this again if you unlock the block.