Magic

Magic

190k Downloads

Placeholder issue in worlds file for mob spawning y offset

LadyHaley opened this issue ยท 3 comments

commented

end_mobs:
world: gaytopia2_the_end
entity_spawn:

replace_enderman:
  class: ReplaceRule
  y_offset: '%randomnumber_value_12_40%'
  target_type: enderman
  probability: 0.80
  replace_type: phantom

image

My goal is to have a range for the y offset so that phantoms are not all flying on the same offset until they see a player, but im not having much luck getting it going. I also tried putting 12-40 but i think it just read that as a math expression

commented

The placeholder expansion I am attempting to use is the following
https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#randomnumber

With my current set up there are no console errors relating to this config or the placeholder expansion

commented

I don't think placeholders work in world configs like that. Try rand(12, 40)

commented

Looks to be working, thanks