1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom Biome IDs

Discussion in 'Skript' started by AFRICA1155, Mar 13, 2022.

Thread Status:
Not open for further replies.
  1. AFRICA1155

    AFRICA1155 New Member

    Joined:
    Mar 13, 2022
    Messages:
    9
    Likes Received:
    3
    Hey guys, I'm can't find a way atm to extract custom non-villa biome IDs out of skript.
    Every time I try to do it, it just returns something along the lines of 'biomes.custom'.
    I'd like to be able to do this, because it allows a bit of interaction between certain kits I made on my server and the environment they're in.

    I have searched the docs and can't seem to find a way to extract the custom biome names from datapacks (the ones you see when you press F3). I've also tried Skript-reflect, but have only been able to make basic things with it and don't really know how to do advanced stuff with it yet. Would you guys be able to help me with this? I'm open to installing any additional addon if it's necessary. I'm running skript 2.6 with the latest paper spigot version of 1.17.1 btw.

    Thanks for the help guys.

    Also it's my first time making a post, so I hope I posted this in the right place.
     
  2. ryanrox333

    ryanrox333 Member

    Joined:
    Jul 6, 2019
    Messages:
    17
    Likes Received:
    0
    Using Skript-Reflect, you can use this technically:

    Code (Text):
    1. import:
    2.     org.bukkit.event.player.PlayerMoveEvent
    3.  
    4.  
    5. on PlayerMoveEvent:
    6.     set {_p} to event.getPlayer()
    7.     set {_biome} to {_p}.getLocation().getBlock().getBiome()
    8.     {_p}.sendMessage("%{_biome}%")
     
  3. AFRICA1155

    AFRICA1155 New Member

    Joined:
    Mar 13, 2022
    Messages:
    9
    Likes Received:
    3
    Thanks for suggesting this. And although I don't know much about Skript Reflect, this is one the methods I had already tried and it just prints 'biomes.custom'.

    I'm currently trying to find a method to be able to differentiate between custom biomes and get the value that gets shown when you press F3 in-game. Would you have any idea on how to do this, 'biomes.custom', is as far as I've been getting to reading the names of custom biomes of datapacks and I currently don't know and can't find any other way to aquire that value with skript. Thanks for your suggestion, though.
     
  4. ryanrox333

    ryanrox333 Member

    Joined:
    Jul 6, 2019
    Messages:
    17
    Likes Received:
    0
    I think at this current time Spigot-API 1.18.2 doesn't support datapack biomes. The only way to create custom biomes and get it's biome id is if the biome was created using spigot. https://www.spigotmc.org/threads/how-to-create-custom-biomes.512105/
     
    • Friendly Friendly x 1
  5. AFRICA1155

    AFRICA1155 New Member

    Joined:
    Mar 13, 2022
    Messages:
    9
    Likes Received:
    3
    Ah, alright, I see. No problem! Thanks a lot anyways, I wasn't sure if this was possible yet and never saw this discussed here, so at least I have some closure now.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...