Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- let mut a = String::from(r#"summon falling_block ~ ~.8 ~ {BlockState:{Name:redstone_block},Passengers:[{id:falling_block,BlockState:{Name:activator_rail}},{id:command_block_minecart,Command:"gamerule commandBlockOutput false"},{id:command_block_minecart,Command:"setblock ~ ~-2 ~ repeating_command_block{auto:1,Command:'fill ~ ~ ~ ~ ~2 ~ air'}"},{id:command_block_minecart,Command:""#);
- let mut b = String::from(r#"
- /summon iron_golem ~ ~ ~3 {Tags:["trfgdh2"],Passengers:[{id:"minecraft:text_display",billboard:"center",Tags:["death_detector","trfgdh"],transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.1f,0f],scale:[1f,1f,1f]},text:' ',background:-10944763},{id:"minecraft:text_display",billboard:"center",transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.03f,-0.01f],scale:[2f,1.6f,2f]},text:' ',background:-16777216}]}
- scoreboard objectives add health.mob dummy
- scoreboard objectives add health health
- /data merge storage 112 {left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.1f,0f],scale:[1f,1f,1f]}
- /setblock ~1 ~0 ~0 minecraft:repeating_command_block[conditional=false,facing=up]{Command:"execute as @e[tag=trfgdh2,type=minecraft:iron_golem] store result score @s health.mob run data get entity @s Health",LastExecution:4066789L,SuccessCount:0,TrackOutput:1b,UpdateLastExecution:1b,auto:1b,conditionMet:1b,powered:0b}
- /setblock ~1 ~1 ~0 minecraft:chain_command_block[conditional=false,facing=up]{Command:"execute unless entity @e[tag=trfgdh2,type=minecraft:iron_golem,scores={health.mob=..75}] run execute if entity @e[tag=trfgdh2,type=minecraft:iron_golem,scores={health.mob=..100}] run data modify entity @e[type=minecraft:text_display,limit=1,tag=trfgdh] background set value -8913152",LastExecution:4067027L,SuccessCount:0,TrackOutput:1b,UpdateLastExecution:1b,auto:1b,conditionMet:1b,powered:0b}
- /setblock ~1 ~2 ~0 minecraft:chain_command_block[conditional=false,facing=up]{Command:"execute unless entity @e[tag=trfgdh2,type=minecraft:iron_golem,scores={health.mob=..50}] run execute if entity @e[tag=trfgdh2,type=minecraft:iron_golem,scores={health.mob=..75}] run data modify entity @e[type=minecraft:text_display,limit=1,tag=trfgdh] background set value -15616",LastExecution:4067774L,SuccessCount:0,TrackOutput:1b,UpdateLastExecution:1b,auto:1b,conditionMet:1b,powered:0b}
- /setblock ~1 ~3 ~0 minecraft:chain_command_block[conditional=false,facing=up]{Command:"execute unless entity @e[tag=trfgdh2,type=minecraft:iron_golem,scores={health.mob=..25}] run execute if entity @e[tag=trfgdh2,type=minecraft:iron_golem,scores={health.mob=..50}] run data modify entity @e[type=minecraft:text_display,limit=1,tag=trfgdh] background set value -32768",LastExecution:4067953L,SuccessCount:0,TrackOutput:1b,UpdateLastExecution:1b,auto:1b,conditionMet:1b,powered:0b}
- /setblock ~1 ~4 ~0 minecraft:chain_command_block[conditional=false,facing=up]{Command:"execute unless entity @e[tag=trfgdh2,type=minecraft:iron_golem,scores={health.mob=..0}] run execute if entity @e[tag=trfgdh2,type=minecraft:iron_golem,scores={health.mob=..25}] run data modify entity @e[type=minecraft:text_display,limit=1,tag=trfgdh] background set value -65536",LastExecution:4068110L,SuccessCount:0,TrackOutput:1b,UpdateLastExecution:1b,auto:1b,conditionMet:1b,powered:0b}
- /setblock ~0 ~0 ~1 minecraft:repeating_command_block[conditional=false,facing=up]{Command:"/data modify storage 112 scale[0] set value 0.011",LastExecution:4068310L,LastOutput:{extra:[{translate:"commands.data.storage.modified",with:["minecraft:112"]}],text:"[20:55:14] "},SuccessCount:1,TrackOutput:1b,UpdateLastExecution:1b,auto:1b,conditionMet:1b,powered:0b}
- /setblock ~0 ~1 ~1 minecraft:chain_command_block[conditional=true,facing=up]{Command:"/execute store result storage 112 scale[0] float 0.011 run data get entity @e[type=minecraft:iron_golem,tag=trfgdh2,limit=1] Health",LastExecution:4068513L,LastOutput:{extra:[{color:"red",extra:[{translate:"argument.entity.notfound.entity"}],text:""}],text:"[20:55:24] "},SuccessCount:0,TrackOutput:1b,UpdateLastExecution:1b,auto:1b,conditionMet:1b,powered:0b}
- /setblock ~0 ~2 ~1 minecraft:chain_command_block[conditional=true,facing=up]{Command:"/data modify entity @n[type=minecraft:text_display,tag=trfgdh] transformation set from storage minecraft:112",LastExecution:4055084L,LastOutput:{extra:[{translate:"commands.data.entity.modified",with:[{hover_event:{action:"show_entity",id:"minecraft:text_display",name:{translate:"entity.minecraft.text_display"},uuid:[I;-1206304355,-115914881,-1534876406,1222150081]},insertion:"b819419d-f917-477f-a483-a50a48d887c1",translate:"entity.minecraft.text_display"}]}],text:"[20:43:26] "},SuccessCount:0,TrackOutput:1b,UpdateLastExecution:1b,auto:1b,conditionMet:0b,powered:0b}
- /setblock ~1 ~0 ~1 minecraft:repeating_command_block[conditional=false,facing=up]{Command:"execute as @e[tag=death_detector] on vehicle unless data entity @s {DeathTime:0s} run data merge entity @n[type=minecraft:text_display,tag=trfgdh] {transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.03f,-0.01f],scale:[0f,0f,0f]}}",LastExecution:4069634L,SuccessCount:0,TrackOutput:1b,UpdateLastExecution:1b,auto:1b,conditionMet:1b,powered:0b}
- /setblock ~1 ~1 ~1 minecraft:chain_command_block[conditional=true,facing=up]{Command:"execute as @e[tag=death_detector] on vehicle unless data entity @s {DeathTime:0s} on passengers run kill @s",LastExecution:4063662L,SuccessCount:0,TrackOutput:1b,UpdateLastExecution:1b,auto:1b,conditionMet:0b,powered:0b}
- "#);
- let mut b = b.replace(r#"""#, r#"\""#);
- let mut b = b.replace("\n", r#""},{id:command_block_minecart,Command:""#)
- ;
- let mut c = r#""},{id:command_block_minecart,Command:"execute align xz run kill @e[type=command_block_minecart,dy=0]"}]}"#;
- println!("{} {} {}",a,b,c);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement