Ep119: A fireball turret that we can easily choose an origin point, a target and how often it fires.
Java Version: 1.19
Commands, builds and ideas for people making their own Minecraft maps.
Check out my collabs on Coppit's channel: / coppitj
Join the server I play on and the Discord where I hang out.
Server IP: 51.81.246.145:25588
Discord: / discord
The following commands are prefixed with three letters which represent the settings of the command block. E.g IUN: = Impulse Unconditional Needs_Redstone. These prefixes need to be removed if copying the commands.
Commands used: YouTube formatting may make some of these wrong. :)
Create objective:
scoreboard objectives add pos dummy "Position"
Fireball controller:
[4 Repeater Delay]IUN: kill @e[tag=fireballEntity]
IUN: execute as @e[tag=fireballOrigin,sort=nearest] at @s run tp @s ~ ~ ~ facing entity @e[tag=fireballTarget,sort=nearest,limit=1]
CUA: execute as @e[tag=fireballOrigin] at @s run summon area_effect_cloud ^ ^ ^2 {Tags:["dirMarker"]}
CUA: execute store result score #originX pos run data get entity @e[tag=fireballOrigin,limit=1] Pos[0] 1000
CUA: execute store result score #originY pos run data get entity @e[tag=fireballOrigin,limit=1] Pos[1] 1000
CUA: execute store result score #originZ pos run data get entity @e[tag=fireballOrigin,limit=1] Pos[2] 1000
CUA: execute store result score #targetX pos run data get entity @e[tag=dirMarker, limit=1] Pos[0] 1000
CUA: execute store result score #targetY pos run data get entity @e[tag=dirMarker, limit=1] Pos[1] 1000
CUA: execute store result score #targetZ pos run data get entity @e[tag=dirMarker, limit=1] Pos[2] 1000
CUA: scoreboard players operation #targetX pos -= #originX pos
CUA: scoreboard players operation #targetY pos -= #originY pos
CUA: scoreboard players operation #targetZ pos -= #originZ pos
CUA: execute at @e[tag=fireballOrigin,limit=1] as @e[tag=fireballOrigin,limit=1] run summon fireball ^ ^1 ^1.5 {Tags:["fireballEntity"]}
CUA: execute store result entity @e[tag=fireballEntity,limit=1] Motion[0] double 0.001 run scoreboard players get #targetX pos
CUA: execute store result entity @e[tag=fireballEntity,limit=1] Motion[1] double 0.001 run scoreboard players get #targetY pos
CUA: execute store result entity @e[tag=fireballEntity,limit=1] Motion[2] double 0.001 run scoreboard players get #targetZ pos
CUA: kill @e[tag=dirMarker]
Summon armour stand origin:
summon armor_stand ~ ~ ~2 {Tags:["fireballOrigin"],Invulnerable:1b}
Summon zombie origin [The button is to stop him burning in the day.]:
IUN: summon zombie ~ ~ ~2 {Tags:["fireballOrigin"],ArmorItems:[{},{},{},{id:"minecraft:polished_blackstone_button",Count:1b}]}
Summon invisible origin:
IUN: summon area_effect_cloud ~ ~ ~2 {Tags:["fireballOrigin"],Duration:2147483647}
Kill all origins:
IUN: kill @e[tag=fireballOrigin]