a mod that uses entities as its marker for where it should spawn special mobs isn't working so i decided to write a script that does the spawning for it, unfortunately i need to set nbt flags for the spawned entities to tell them where the thing they were spawned from is. i have everything working but i am having problems when it comes to getting the nbt of more than one entity as here is the thngs i have found
debug card unclaimed - dosn't return required text
debug card claimed - works great as long as i'm OK with it stopping if i'm offline(which i'm not)
command_block - only returns text for last entity found
also im using while loops instead of for loops because for some reason they weren't executing more than once
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
a mod that uses entities as its marker for where it should spawn special mobs isn't working so i decided to write a script that does the spawning for it, unfortunately i need to set nbt flags for the spawned entities to tell them where the thing they were spawned from is. i have everything working but i am having problems when it comes to getting the nbt of more than one entity as here is the thngs i have found
debug card unclaimed - dosn't return required text
debug card claimed - works great as long as i'm OK with it stopping if i'm offline(which i'm not)
command_block - only returns text for last entity found
also im using while loops instead of for loops because for some reason they weren't executing more than once
command execution code:
entity counting and cord getting:
spawning code:
my last log file:
log start loaded object data: {{"test",true},{"test2",true}} 2 objects loaded clicked button: fairycircle executed command: /scoreboard players set @e[type=roots:fairy_circle] fairycount 0 2.0[09:10:38] Set score of fairycount for player b74ae6cb-3bc8-4f9c-8f70-3a32f9fdb4d4 to 0 fairycount zeroed executed command: /execute @e[type=roots:fairy] ~ ~ ~ /scoreboard players add @e[type=roots:fairy_circle,r=20] fairycount 1 0.0 counted fairy's executed command: /entitydata @e[type=roots:fairy_circle] {} 0.0[09:10:38] The data tag did not change: {Motion:[0:0.0d,1:0.0d,2:0.0d],ForgeData:{SpongeData:{Creator:{UUIDMost:3587601093716626784L,UUIDLeast:-5463341182647024187L}}},UUIDLeast:-8110918938277333804L,Invulnerable:0b,Air:0s,OnGround:0b,Dimension:0,idList:[],PortalCooldown:0,Rotation:[0:0.0f,1:0.0f],UpdateBlocked:0b,FallDistance:0.0f,UUIDMost:-5239121455936417892L,Pos:[0:-330.0d,1:60.0d,2:-954.0d],repList:[],Fire:0s,x:-330,ForgeCaps:{llibrary:extendedentitydatacapability:{}},y:60,z:-954,time:681414,initedPosition:1b} found entity at -330 60 -954 found 1 starting fairy spawn for pool: 1 at: -330 60 -954 summoning fairy with nbt: {variant:2.0,spawnX:-330,spawnY:60,spawnZ:-954} executed command: /execute @e[score_fairycount=50] ~ ~ ~ /summon roots:fairy ~ ~ ~ {variant:2.0,spawnX:-330,spawnY:60,spawnZ:-954} 2.0[09:10:39] Object successfully summoned
here is the full script if anybody needs it:
autorun.lua
Link to post
Share on other sites