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.

Featured Replies

Posted

So I've made a multiblock structure (and basically followed this video: https://www.youtube.com/watch?v=GQRxeJSoUI4) and everything works fine but there are some lighting problems because the model of the controller is bigger than one block (it is 2x2 blocks):

image.png.845b4d8b99aa2b8d8c02816d4d50f29d.png

I know that you used to fix this by overriding isFullBlock and later getRenderLayer but both of these methods don't exist anymore. Using

RenderTypeLookup.setRenderLayer(block, RenderType.getCutout())

 didn't work either.

Edited by Boy132

The darkness is associated with ambient occlusion, in your block class you can modify this with:

@Override
public float getAmbientOcclusionLightValue(BlockState state, IBlockReader worldIn, BlockPos pos) {
	return (some float);
}

I've found that small values (usually around 0.1F) reduce the dark. Alternatively in your block model json you can disable or enable occlusion with:

"ambientocclusion": true/false

 

Edited by urbanxx001

  • Author
5 hours ago, urbanxx001 said:

The darkness is associated with ambient occlusion, in your block class you can modify this with:


@Override
public float getAmbientOcclusionLightValue(BlockState state, IBlockReader worldIn, BlockPos pos) {
	return (some float);
}

I've found that small values (usually around 0.1F) reduce the dark. Alternatively in your block model json you can disable or enable occlusion with:


"ambientocclusion": true/false

 

Thank you for your answer! Sadly none of that worked for me, I tried it with 0f, 0.05f, 0.1f and 0.2f (and editing the model json) and the result were the same as before.

2 hours ago, Boy132 said:

Thank you for your answer! Sadly none of that worked for me, I tried it with 0f, 0.05f, 0.1f and 0.2f (and editing the model json) and the result were the same as before.

Ah ok I'm sorry to hear that. I dug a little and it appears if occlusion doesn't solve it, then it might be an issue with Forge's lighting engine and/or model loading, according to this issue thread. To summarize, the engine is particular about vertex ordering in the model, which means certain sides are incorrectly taking the lighting values that should be applied to other sides. The only thing I can suggest is enabling an experimental feature in Forge's config called experimentalForgeLightingPipelineEnabled.

 

Edited by urbanxx001

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.