Bug Closed · Resolved

Double placeholders don't work

#4947 opened by Unknown 2 years ago

Unknownreported this bug

Summary

The placeholder in the placeholder (double placeholder) works only if you specify it inside of the mob file

MM v.5.6.2

Working code (Packs/packname/Mobs/DebugMob.yml):

DebugMob:
  Type: HUSK
  Skills:
  - setvar{var=caster.XpDropLv1;v=50} @self ~onSpawn
  - setvar{var=caster.XpDropLv2;v=100} @self ~onSpawn
  - m{m=Exp is <caster.var.XpDropLv<caster.level>>} @world ~onTimer:100

Double placeholders work in this case. Lv.1 mob writes to the chat "Exp is 50". But it does not work if you make a set of skills with variables in Packs/packname/skills

This code should work, but it doesn't:

(Packs/packname/Mobs/DebugMob.yml)

  DebugMob:
  Type: HUSK
  Skills:
  - skill{s=ExpVarSkil} @self ~onSpawn
  - m{m=Exp is <caster.var.XpDropLv<caster.level>>} @world ~onTimer:100

(Packs/packname/skills/DebugMobSkills.yml)

ExpVarSkill:
  Skills:
  - setvar{var=caster.XpDropLv1;v=50}
  - setvar{var=caster.XpDropLv2;v=100}

!!!But the most terrible thing is that it doesn't work with custom placeholders!!!

Packs/packname/DebugMob.yml:

DebugMob:
  Type: HUSK
  Skills:
  - m{m=Exp is <placeholder.XpDropLv<caster.level>>} @world ~onTimer:100

Packs/packname/placeholders.yml

XpDropLv1: '50'
XpDropLv2: '100'
Unknowncommented

Closing due to inactivity and major version changes since posting. If this issue is still present, re-open this issue with a modern-version server log, configs used to test and steps to reproduce.

Sign in to join the discussion.