Zrips / CMI

116 stars 98 forks source link

Random Teleporation does not work #8981

Closed Proemmis closed 2 months ago

Proemmis commented 2 months ago

Description of Issue

Hello, I wanted to know if there is a bug with random teleportation,

I have a problem with blacklisted biomes in the normal world, I still teleport to oceans and deep oceans. how to do? thanks in advance ! image

image

image

the same for the nether, the delay is very long even at 300 tries maximum, it's not sure to find a safe place, and what's more, it teleports me into blocks, so I suffocate if I'm in survival mode .

image

my config is wrong?

Version Information

cmi version
[16:50:13] [Server thread/INFO]: --------------------------------------------------
[16:50:13] [Server thread/INFO]: CMI: 9.7.4.7 SqLite
[16:50:13] [Server thread/INFO]: CMILib: 1.5.0.9
[16:50:13] [Server thread/INFO]: Serveur: Spigot 1.12.2-R0.1-SNAPSHOT-
[16:50:13] [Server thread/INFO]: CMI economy: Activé Vault: 1.7.3-b131(CMIEInjector) CMI Chat: Activé
[16:50:13] [Server thread/INFO]: Modules -> 58 activés 8 désactivés: deathMessages, chatBubble, tablist, ranks, playerCombat, votifier, headDrop, jail
[16:50:13] [Server thread/INFO]: --------------------------------------------------

Errors

No response

Relevant Config Sections

RandomTeleportation:
  # How long force player to wait before using command again.
  Cooldown: 5
  # How many times to try find correct location for teleportation.
  # Keep it at low number, as player always can try again after delay
  MaxTries: 20
  # List of biomes to exclude from random teleportation
  ExcludedBiomes:
  - Ocean
  - Deep ocean
  # If this set to true we will generate random teleport default settings for all detected worlds
  # Setting to false will no longer generate world setups, but you can add them manually if needed
  AutoGenerateWorlds: true
  Worlds:
    # World name to use this feature. Add another one with appropriate name to enable random teleportation
    world:
      Enabled: true
      # Amount of times we should try to find valid location. This is mostly directly correlates with amount of chunks we will check
      # If set to 0 we will use default MaxTries set at the top of file
      MaxTries: 50
      Range:
        # Max coordinate to teleport, setting to 1000, player can be teleported between -1000 and 1000 blocks between defined center location
        # For example having centerX at 2000 and centerZ at 3000 while MaxRange is set to 1500 we will teleport player between x:500;z:1500 and x:3500;z:4500 coordinates
        Max: 9000
        # If maxcord set to 1000 and mincord to 500, then player can be teleported between -1000 to -500 and 1000 to 500 coordinates
        Min: 1000
      Center:
        X: 0
        Z: 0
      # Shape of area player can be teleported into. If yuor map is square shaped then keep this at false
      Circle: false
      # With this option we will only attempt to teleport player on highest block and ignore any cave teleportations
      # Exception when you have Ignore.Leaves set to true which will attempt to place player under the tree leaves if there is any empty space
      SurfaceOnly: false
      # When enabled player will be able to random teleport at specied world while being in another one
      FromAnotherWorld: true
      # When enabled player will be required to have (cmi.randomteleport.§f[worldname]§6) permission node to random teleport inside this world
      RequireWorldPermission: false
      YLimits:
        # Location detection limitations on Y axis. If you want to minimize teleportations underground then you can set this value to 63
        # Higher limitations might increase time needed to find valid one
        Min: 0
        Max: 256
      Ignore:
        Water: true
        Lava: true
        Leaves: true
        PowderSnow: false
        # List of floor materials we should ignore when random teleporting
        Materials:
        - water
        - lava
        # List of biomes we should ignore when random teleporting
        # Keeping it empty will include all of them
        # If this is empty and ExcludedBiomes contains set biomes then we will use it
        Biomes:
        - Ocean
        - Deep ocean
      # List of biomes we should look for when random teleporting
      # If this contains biome names then we will ignore Ignore.Biomes section
      PreferredBiomes: []
    DIM-1:
      Enabled: true
      MaxTries: 300
      Range:
        Max: 9000
        Min: 1000
      Center:
        X: 0
        Z: 0
      Circle: false
      SurfaceOnly: true
      FromAnotherWorld: true
      RequireWorldPermission: false
      YLimits:
        Min: 1
        Max: 128
      Ignore:
        Water: true
        Lava: true
        Leaves: false
        PowderSnow: false
        Materials:
        - bedrock
        Biomes: []
      PreferredBiomes: []
    DIM72:
      Enabled: true
      MaxTries: 0
      Range:
        Max: 1000
        Min: 500
      Center:
        X: 0
        Z: 0
      Circle: false
      SurfaceOnly: false
      FromAnotherWorld: true
      RequireWorldPermission: false
      YLimits:
        Min: 0
        Max: 256
      Ignore:
        Water: true
        Lava: true
        Leaves: true
        PowderSnow: false
        Materials: []
        Biomes: []
      PreferredBiomes: []
    DIM73:
      Enabled: true
      MaxTries: 0
      Range:
        Max: 1000
        Min: 500
      Center:
        X: 0
        Z: 0
      Circle: false
      SurfaceOnly: false
      FromAnotherWorld: true
      RequireWorldPermission: false
      YLimits:
        Min: 0
        Max: 256
      Ignore:
        Water: true
        Lava: true
        Leaves: true
        PowderSnow: false
        Materials: []
        Biomes: []
      PreferredBiomes: []

Relevant Plugins

No response

Agreements

mercurialmusic commented 2 months ago

Try using the internal biome names instead of the "friendly" names. The following works for me:

  ExcludedBiomes:
  - OCEAN
  - COLD_OCEAN
  - DEEP_COLD_OCEAN
  - DEEP_FROZEN_OCEAN
  - DEEP_LUKEWARM_OCEAN
  - DEEP_OCEAN
  - DEEP_WARM_OCEAN
  - FROZEN_OCEAN
  - FROZEN_RIVER
  - RIVER
  - WARM_OCEAN
  - LUKEWARM_OCEAN
Proemmis commented 2 months ago

That does not work :x

config : https://pastebin.com/d7JJy4rb

Rt on a coean image

Zrips commented 2 months ago

You can always double check actual biome you got teleported into with either /cmi pos command or clicking F3 and checking what minecraft debug reports it to be, in my testing case it was deep_cold_ocean where I got teleported too, will add this one into default list, tho you will need to include it manually.