Bug Closed · Resolved

Teleport spreadh and speradv do not work

#5194 opened by Unknown 2 years ago

Unknownreported this bug

Summary

When using the teleport mechanic, it fails to respect the spreadv and spreadh attributes.

Steps to reproduce

You can use this mobs config:

FlameWisp:
  Type: Phantom
  Display: '&fFlame Wisp &8| &6<mob.level>'
  Health: 4
  Damage: 1.5
  MovementSpeed: 0.1
  Disguise: BAT setInvisible true
  Equipment:
  - AIR HAND
  DamageModifiers:
  - FIRE 0
  - FIRE_TICK 0
  - HOT_FLOOR 0
  - LAVA 0
  LevelModifiers:
    Health: .02
    Damage: .05
    KnockbackResistance: 0.01
    MovementSpeed: 0.001
  Options:
    Despawn: true
    AlwaysShowName: false
    DigOutOfGround: true
    PreventRenaming: false
    PreventOtherDrops: true
    Silent: true
  Skills:
  - effect:particles{p=flame;yOffset=1} @self ~onTimer:2
  - ignite{ticks=60} @trigger ~onAttack
  - teleport{spreadh=5;spreadv=5} @self ~onAttack
  - sound{s=block.fire.extinguish;p=random(1.0, 2.0)} @self ~onDeath
  Drops:
  - mmoitems{type=CONSUMABLE;id=FIRE_ESSENCE} 1 .01
  - blaze_powder 0-1 1
  - exp 3 1

Current behavior

Currently, it will teleport the mob directly onto the player, ignoring spread.

Intended correct behavior

The intended behavior is that it would teleport the mob within 5 blocks vertically and horizontally of the player. https://git.mythiccraft.io/mythiccraft/MythicMobs/-/wikis/skills/mechanics/teleport

Server log file

https://pastebin.com/2M540i98

Debug log snippet

I created TestWisp which is identical to my provided above except with using onTimer instead of onAttack.

https://pastebin.com/SF4pvnsx

Proposed fixes

The proposed fix would be for spreadh and spreadv to be respected attributes. It seems as if the unsafe attribute is possibly always defaulting to true, even when set to false, but I am not sure.

Unknowncommented

I ran into the same teleport issue—it keeps dropping mobs right on the player instead of respecting the spread. While trying to test different configs, it reminded me how much smoother things can get when you have a good system in place. For video editing, I feel the same way using CapCut templates; for example, the iCal CapCut template saves so much time while keeping content polished. Having presets that work reliably makes a huge difference, whether it’s managing mob behavior in a game or structuring a clean, professional video quickly.

Sign in to join the discussion.