How to make a PORTAL GUN in Minecraft(JAVA)
Today i will make a portal gun from the game "Portal".
COMMANDS:
/scoreboard objectives add Portal_Count dummy
/scoreboard objectives add Portal_Cooldown dummy
/execute if entity @a[nbt={SelectedItem:{id:"minecraft:bow",tag:{display:{Name:'{"text":"Portal Gun"}'}}}}] at @e[type=minecraft:arrow,nbt={inGround:1b}] as @a if score @s Portal_Count matches 0 run scoreboard players set @s Portal_Count 1
/execute at @e[type=minecraft:arrow,nbt={inGround:1b}] run summon minecraft:armor_stand ~ ~ ~ {ShowArms:1b,CustomName:'[{"text":"Portal_1"}]',Invulnerable:1b,NoGravity:1b,Tags:["Portal1"],Invisible:1b}
/kill @e[type=minecraft:arrow]
execute if score @p Portal_Count matches 1 run setblock ~ ~1 ~ minecraft:redstone_block
/execute if score @p Portal_Count matches 0 run setblock ~ ~-1 ~ air
/execute if entity @a[nbt={SelectedItem:{id:"minecraft:bow",tag:{display:{Name:'{"text":"Portal Gun"}'}}}}] at @e[type=minecraft:arrow,nbt={inGround:1b}] as @a if score @s Portal_Count matches 1 run scoreboard players set @s Portal_Count 2
/execute at @e[type=minecraft:arrow,nbt={inGround:1b}] run summon minecraft:armor_stand ~ ~ ~ {ShowArms:1b,CustomName:'[{"text":"Portal_1"}]',Invulnerable:1b,NoGravity:1b,Tags:["Portal2"],Invisible:1b}
/kill @e[type=minecraft:arrow]
/execute if entity @a[nbt={SelectedItem:{id:"minecraft:bow",tag:{display:{Name:'{"text":"Portal Gun"}'}}}}] at @e[type=minecraft:arrow,nbt={inGround:1b}] as @a if score @s Portal_Count matches 2 run scoreboard players set @s Portal_Count 0
/execute at @e[type=minecraft:arrow,nbt={inGround:1b}] run kill @e[type=minecraft:armor_stand]
/kill @e[type=minecraft:arrow]
/execute at @e[tag=Portal1] run particle minecraft:dust 0 0 1 0.8 ~ ~ ~ 0.3 1 0.3 0.02 100
/execute at @e[tag=Portal2] run particle minecraft:dust 1 0 0 0.8 ~ ~ ~ 0.3 1 0.3 0.1 100
/execute at @e[tag=Portal1] if entity @p[distance=..2] run effect give @p minecraft:regeneration 1 1 true
/execute at @e[tag=Portal2] run tp @p ~ ~ ~
Other Videos By shadowwalker
Other Statistics
Minecraft Statistics For shadowwalker
shadowwalker presently has 93,965 views for Minecraft across 80 videos, with his channel uploading 6 hours worth of Minecraft videos. This makes up 27.34% of the content that shadowwalker has uploaded to YouTube.