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

Hello,

 

We are creating a custom village by just replacing the blocks with other blocks styled to fit the biome. We do this by listening to the BiomeEvent.GetVillageBlockID event, like this:

 

 

@SubscribeEvent
public void event(BiomeEvent.GetVillageBlockID event){
    if (WorldChunkManagerNorthrend.allowedBiomes.indexOf(event.biome) != -1){
        event.setResult(Event.Result.DENY);
        event.replacement = ...;
}

 

What we has found is that there are two reasons why the biome can be null:

  • The structure is a well, in which case mojang sets startPiece to null, for understandable reasons since the well is the origin of the village. Even though we would like to get the biome here as well, I can understand and accept this.
  • For some strange reason, whole villages sometimes has a null biome. Sadly enough, we've not been able to find the cause of this.

 

The only way out seems to be making a custom version of all the biome gen things, which is several really fat files. As you probably can understand, we would love to avoid that.

 

What would you suggest we should do?

Maybe this solution is to simple, but I think(I don't know exactly what you mean) but if you get a numm pinter Exception, you could try it with a !null statement :D

Creator of Extra Shoes

 

Watch out, I'm total jerk, and I'll troll anybody if it feels like its necessary. Pls report me then

  • Author

Maybe this solution is to simple, but I think(I don't know exactly what you mean) but if you get a numm pinter Exception, you could try it with a !null statement :D

The problem with it being null is that we don't know if it's a vanilla village or one of our own villages, so that would not work :(

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.