Jump to content

[1.7.10] Custom Fluid causes block side rendering issues. [SOLVED]


Recommended Posts

I've attempted to create a custom fluid following the tutorial given at the wiki for 1.7.2: http://www.minecraftforge.net/wiki/Create_a_Fluid


I'm having an issue where placing my fluid source block next to certain other of my blocks will cause the solid blocks to render with the sides touching the liquid invisible, causing an x-ray glitch. I've attempted to solve this problem by explicitly calling some of the rendering functions in my "BasicBlock" class, which didn't work.


Changing the extension on the fluid block from "BlockFluidClassic" to "BlockLiquid" fixes the rendering issue, but I want a flowing liquid, not a motionless goo.


Here's the code for my custom fluid:



And here's the code for my custom block, attempted overrides and all.


Link to comment
Share on other sites

Here's a question: Does your fluid also have this effect on vanilla blocks, or only your own blocks?


The usual cause for this problem is not overriding isOpaqueBlock, but I see you did do that.


If the issue were in not drawing all the sides of the fluid instead of another block I would have suggested looking at canRenderInPass(1), but I don't really think that would help here.


More information on specifics of the problem - maybe a screenshot or two or example cases? - could really help you help us help us all.

If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.

Link to comment
Share on other sites

It only does it to 3 of my own blocks: "BasicBlock", "Tutorium Furnace", and "Mining Charge". It doesn't appear to do it with vanilla blocks, at least not the ones I tested. Each has their own class, but the BasicBlock class was from a tutorial on making generic blocks without specific functions. I've only messed around with the specific overrides for the fluid and for the BasicBlock class, thinking resolving that case would make it a bit more obvious what to do.


And yes, that is the custom fluid, I'm just stealing the water texture for now. All of the fluid is source-blocks, the error disappears when the fluid is running, IE, a flowing fluid will not cause the same glitch, only faces of the particular blocks that are in contact with source-blocks will render invisibly.


width=800 height=418http://i1200.photobucket.com/albums/bb321/Exo594/2015-09-21_19.58.50_zpsypwmph2b.png[/img]


I've tested it with a lot of other random vanilla (and Thaumcraft) blocks, but none of them suffer the same glitch. I've got "my" two ores there, the Mining Charge block, the Tutorium Furnace block, "my" 2-input machine, the one block made from "my" Basic Block class, and a sampling of vanilla blocks. Those are all the blocks I've made for this "mod", too.


In this screenshot, I've got code in my Basic Block class for overriding the OpaqueCube, NormalBlock, RenderType, and even the shouldSideBeRendered and isBlockSolid functions. I believe my current GitHub push has those shown, but I've been fiddling around with those specifics without updating GitHub.


I hope this gives you enough to go on.

Link to comment
Share on other sites

  • 1 month later...

Update: I've managed to "solve" the problem. I figured out that it was only affecting blocks that had defined light values, so by removing those traits from my blocks, I've managed to fix the rendering problem in regards to my blocks. At that point, it was still bugging OTHER lit blocks like Glowstone and Redstone Lamps, so I eventually managed to figure it out by removing the luminosity trait from the liquid itself. This is a pretty annoying way to have to "fix" this problem, I'd really like for those values to NOT cause rendering issues.

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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.


  • Create New...

Important Information

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