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

I'm working on a mod to perform an action to the player when a biome transition is detected. Example, I walk from a minecraft:plains biome to a minecraft:forest biome and then my action occurs. I have not been able to find an event to hook into that can listen for a biome edge transition. I'm coding in 1.12.2. Any suggestions?

  • Author

I had thought of something similar. Are there any concerns for overhead on a check like this?

  • Author

I'm stumped on how to get the string of the biome name. Could you lend a hand?

ย 

To elaborate. I am stuck here:

ย 

Capture.PNG

Edited by tyon2006

  • Author
11 hours ago, tyon2006 said:

I'm stumped on how to get the string of the biome name. Could you lend a hand?

ย 

To elaborate. I am stuck here:

ย 

Capture.PNG

I am no longer stumped. Here's how I got the biome. This example just prints it to console.ย 

ย 

ย ย  ย @SubscribeEvent
ย  ย  public void checkBiomeOnTick(PlayerTickEvent event) {
ย ย  ย ย ย  ย //get player's current position
ย ย  ย ย ย  ย BlockPos playerPosition = event.player.getPosition();
ย ย  ย ย ย  ย //get world biome from players current position
ย ย  ย ย ย  ย Biome currentBiome = event.player.getEntityWorld().getBiomeForCoordsBody(playerPosition);ย ย  ย ย ย  ย 
ย ย  ย ย ย  ย //get biome name data and convert to string
ย ย  ย ย ย  ย String biomeNameString = currentBiome.getBiomeName();
ย ย  ย ย ย  ย //print biome name to console
ย ย  ย ย ย  ย System.out.println(biomeNameString);
ย  ย  }

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.