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.

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

Featured Replies

Posted

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:

https://github.com/Exo594/TutorialWork/blob/master/src/src/main/java/com/exo594/tutorial/block/BlockTutoriumSolution.java

 

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

https://github.com/Exo594/TutorialWork/blob/master/src/src/main/java/com/exo594/tutorial/block/BasicBlock.java

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.

  • Author

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.

  • 1 month later...
  • Author

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.

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.