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

Hi

 

There is no ambient occlusion on the ore block, which are rendered with a custom model.

Here one image to understand the problem :

1449055312-capture-du-2015-12-02-10-29-49.png

 

And some code :

Block class :

https://gist.github.com/Spooky4672/92d49f456b063e2fecdb

 

Model class :

https://gist.github.com/Spooky4672/6adc83c99b7593e4ab98

 

That's weird because in the model class ambient occlusion is set to true ...

  • Author

I have just updated to 1.8 - 11.14.4.1563 and there are some changes :

 

1449065886-capture-du-2015-12-02-15-16-55.png

 

Ambient occlusion seems to work but not always, the block on the grass are too dark and the items are all black

I'll have fry take a look at the issue, but also, why is this a custom model.. you're rendering a normal model... just with two layers... JSON should allow you to do that just fine.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

1) lighting system needs correct normals to be specified to generate the correct AO shadowing data; you're using very old hard-coded code to generate the vertex data, which doesn't do that - if you want to generate the model like this, look at custom model loaders that are in forge.

2) retexturing like this can be accomplished more easily - get cube model from the registry (ModelLoaderRegistry.getModel(new ResourceLocation("block/cube_all"), or something similar), or make a json model with 2 layers, which would be more appropriate for this; cast to IRetexturableModel (with checking), and call retexture. Look at uses of IRetexturableModel in forge for examples.

  • Author

I have tested a lot of things, nothings works. When you say "cast to IRetexturableModel (with checking)" can you show me an example. Because in every cases, I end up with a exception

Do I have to implement an IRetexturableModel ? Or can I use the class Wrapper in B3DLoader ?

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.