Minecraft Data Packs / Tool

Biome Detection Utility v1.6 for Minecraft 1.14

  • check_circle Functions
  • 7,655 views, 2 today
  • 226 downloads, 0 today
  • 15
  • 10
  • 10
Quacc Daddy's Avatar Quacc Daddy
Level 28 : Expert Architect
9
Biome Detection Utility v1.6
by QuaccDaddy

A utility datapack for other map-makers, so they can run functions to detect biomes in their mods/maps.

Before 1.14, biome detction was a much desired ability for datapacks, but it was never easy or 100% accurate.
Now, with the new loot table abilities, this datapack make it as simple as running a function and checking a scoreboard.

This could be used to make biome-specific mobs, biome-specific structures, just about anything you can think of.

When the scan_biome function is ran, it will detect what biome it was executed from and set the following scores:
  biomeID : The minecraft id of the biome Java Edition data values – Official Minecraft Wiki
  snowyBiome : 1 if snowy, 0 if not
  coldBiome : 1 if cold, 0 if not
  temperateBiome: 1 if temperate, 0 if not
  warmBiome: 1 if warm, 0 if not
  aquaticBiome: Currently contains all oceans and rivers, but can be edited easily in the code
  mountainousBiome: 1 if mountainous, 0 if not
  biomeRealm : 0 for overworld, -1 for nether, 1 for end

All of the scores listed above besides biomeID are regarded as groups, and there is a template for making your own group inside the files incase you have a set of biomes that is not listed.

How to use:
  When you first run it, type /function biome_det:install and all scoreboards should be ready.
  From there, you can type /function biome_det:scan_biome and the proper scores will be set for that entity.
  All data will be set to display as a default.
  You can disable displaying the biome with /function biome_det:display/biome_disable
  You can disable displaying the biome data with /function biome_det:display/biome_data_disable

It's that simple!
In the pictures here, you can see the functions being showcased in chat.

If you are using this in your own datapack or mod and wish to remove the chat message when installed, that can be removed from within biome_det:install and biome_det:uninstall.

Warning: If you decide to run this function every tick for many entities at once, you will likely experience lag. It is best to either run for a few entities at a time, or to delay the scan every 20 ticks or so.
CompatibilityMinecraft 1.14
Tags

2 Update Logs

Update #1.6 : by Quacc Daddy 06/07/2019 10:25:52 pmJun 7th, 2019

Added tellraw display thanks to suggestion from Mouleagauffre.
Directly zipped files, also thanks to Mouleagauffre.
Added function for displaying data and editing what is displayed.
Corrected Help function. (Now has links to each command)
Improved Custom Group Template.
Added full biome list with id's in folder.
LOAD MORE LOGS

Create an account or sign in to comment.

1
02/16/2020 3:07 am
Level 45 : Master Technomancer
Skyball
Skyball's Avatar
This is amazing!
I'll use this in one of my creations (while giving credit of cause :) )!

But I had one problem (tested in 1.15.2):
When scanning for a biome, I got no results at all. This was, as I found out later, because the bat that dropps the sea pickle (why did you choose a sea pickle? ;) ) was higher than 255 (at 355 or so). That means, the bat does not spawn inside of a biome, as the biome value only goes up to 255.

I fexed that by making the bat spawn at 254 instaed.

But still, an amazing creation! Thanks!
2
03/02/2020 1:24 pm
Level 28 : Expert Architect
Quacc Daddy
Quacc Daddy's Avatar
Thanks for the credit and feedback!



The problem you had is a good point that I overlooked.

Although, I will not update this datapack as 1.15 has introduced predicates to code which will change how this is done significantly and biomes are detectable with a simple command in the game using the predicates!



I picked sea pickles just to have some weird goofy things going on that only people who look into the code would notice lol.
2
10/19/2019 6:45 amhistory
Level 45 : Master Wizard
UncleThaodan
UncleThaodan's Avatar
Quick note on how to make it a bit more compact:

In addition to setting the nbt tag:{Biome:"Ocean"}, add tag:{BiomeID:0s} to the loot table, where 0s is the corresponding ID.

This way you don't have to check the nbt to set the biomeID score. You can just "/execute store" the value. That would cancel out about 200 lines in the scan_biome funcition and make it a bit easier to maintain.
1
12/20/2019 10:57 pm
Level 28 : Expert Architect
Quacc Daddy
Quacc Daddy's Avatar
Yeah, I've looked into predicates since the new 1.15 update. Previously, we could not access that data with /execute store, hence this datapack is extremely inefficient and unnecessary for 1.15+

Thank you for the suggestion, though!
2
06/16/2019 6:17 am
Level 50 : Grandmaster Nerd
KleinGrrmpf
KleinGrrmpf's Avatar
I recommended this to Tyruswoo who is making a custom biome-based structure generator. You can look him up on YT. Maybe he will include this in one of his new updates for the structure generator with crediting you of course. Just wanted to let you know ;)
2
06/18/2019 2:52 am
Level 28 : Expert Architect
Quacc Daddy
Quacc Daddy's Avatar
I'm already a monthly supporter for him! Small world
3
06/01/2019 1:05 pm
Level 38 : Artisan Engineer
Minaro_
Minaro_'s Avatar
Wow, I had no idea that you could make mobs drop different items based on what biome they are in!

Very clever :D
3
06/01/2019 4:09 am
Level 56 : Grandmaster Toast
Mouleagauffre
Mouleagauffre's Avatar
It's a great idea but I've two suggestions :

- First you should directly zip together your data folder and your pack.mcmeta file, so we will not have to extract the zip to use the datapack.

- secondly you should display the result of each scan in the chat using a tellraw, it will prevent user from display each scoreboard one by one.
  
  example:
  
  
3
06/07/2019 5:57 pm
Level 28 : Expert Architect
Quacc Daddy
Quacc Daddy's Avatar
Noted! Thanks for the your suggestions 👍
4
05/19/2019 3:20 am
Level 56 : Grandmaster Blockhead
Rasemotte
Rasemotte's Avatar
Oh my God yes !!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome