Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Calling an inline process inside another inline process causes the compiler to freeze #68

Closed
BrainStone opened this issue Sep 18, 2017 · 1 comment

Comments

@BrainStone
Copy link
Contributor

I've tried to reproduce it with a minimal example but didn't manage to get that working.

When trying to compile the following script the compiler always freezes.

String genericTags = "Marker:1b,NoGravity:1b,Invulnerable:1b,Invisible:1b"

install {
  /gamerule commandBlockOutput false
  /gamerule logAdminCommands false
  /gamerule doDaylightCycle false
  /gamerule doWeatherCycle false
  /gamerule keepInventory true
  /gamerule randomTickSpeed 0
  /gamerule announceAdvancements true
  /gamerule doFireTick false
  /gamerule doMobSpawning false
  /gamerule doMobLoot false
  /gamerule doEntityDrops false
  /gamerule spawnRadius 0
  
  clean_up()
  
  /difficulty easy
  /time set 6000
  /weather clear
  /worldborder center 0 0
  /worldborder damage buffer 0
  /worldborder damage amount 100
  /worldborder warning time 0
  /worldborder warning distance 0
  /worldborder set 501
  
  /scoreboard objectives add BM_Variables dummy
  /scoreboard objectives add BM_Constants dummy
  
  start generate
}

uninstall {
  clean_up()
}

process clean_up {
  /kill @e[tag=BM]

  /scoreboard players tag @e[tag=Seeder] remove Seeder
  /scoreboard players tag @e[tag=Generator] remove Generator
}

impulse process generate {
  /summon armor_stand -9 21 -9 {${genericTags},Tags:["BM","Seeder"]}
  
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  generate_populate()
  
  create_seed()
  create_seed()
  create_seed()
  create_seed()
  create_seed()
}

process generate_populate {
  /scoreboard players tag @e[tag=Seeder] add Seeder_Old
  
  /execute @e[tag=Seeder_Old] ~ ~ ~ detect ~ ~ ~ air 0 /summon armor_stand ~ ~ ~ {${genericTags},Tags:["BM","Generator"]}
  /execute @e[tag=Seeder_Old] ~1 ~ ~ detect ~ ~ ~ air 0 /summon armor_stand ~ ~ ~ {${genericTags},Tags:["BM","Generator"]}
  /execute @e[tag=Seeder_Old] ~ ~ ~1 detect ~ ~ ~ air 0 /summon armor_stand ~ ~ ~ {${genericTags},Tags:["BM","Generator"]}
  
  /execute @e[tag=Seeder_Old] ~2 ~ ~ detect ~-1 ~ ~ air 0 /summon armor_stand ~ ~ ~ {${genericTags},Tags:["BM","Seeder"]}
  /execute @e[tag=Seeder_Old] ~ ~ ~2 detect ~ ~ ~-1 air 0 /summon armor_stand ~ ~ ~ {${genericTags},Tags:["BM","Secondary"]}
  
  /kill @e[tag=Seeder_Old]
  /execute @e[tag=Seeder] ~ ~ ~ /kill @e[tag=Secondary,r=1]
  /scoreboard players tag @e[tag=Secondary] add Seeder
  /scoreboard players tag @e[tag=Secondary] remove Secondary
  
  create_seed()
}

process create_seed {
  //execute @e[tag=Generator] ~ ~ ~ /scoreboard players operation
}
@Adrodoc
Copy link
Owner

Adrodoc commented Sep 18, 2017

Fixed in 4e91972

@Adrodoc Adrodoc closed this as completed Sep 18, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

2 participants