444: Bear trap. [Minecraft Map Making]

Subscribers:
3,860
Published on ● Video Link: https://www.youtube.com/watch?v=NpEF2UKX6G8



Minecraft
Game:
Minecraft (2011)
Duration: 0:00
323 views
16


Membership:

I have no idea why the sound is so bad on this video, sorry. :(

Ep444: Trapping the player in a bear trap that they have to punch to get free from.

00:00 Intro
00:40 Setup
02:00 Give item
02:50 Controller - throw
12:10 Controller - trap player
22:40 Controller - escape and reset
34:20 Controller - escape and remove

Requested by: luvkyax

Version: 1.21.4

Commands, builds, hacks and ideas for people making their own Minecraft maps.

Check out my collabs on Coppit's channel:

The Discord server I am usually on: https://discord.gg/amU84KykEu

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:

Setup:
IUN: team add innocent
CUA: scoreboard objectives add cooldown dummy
CUA: scoreboard objectives add trap_life dummy
CUA: scoreboard players set #default cooldown 40
CUA: scoreboard players set #default trap_life 10

Give:IUN: give @p gray_dye[item_name='"Bear Trap"', custom_data={bear_trap:true}] 64

Controller - Throw:
RUA: execute as @e[type=item] if items entity @s contents gray_dye[custom_data~{bear_trap:true}] at @s if predicate
{"condition":"minecraft:entity_properties","entity":"this","predicate":{"flags":{"is_on_ground":true}}} run tag @s add set_trap

CUA: execute at @e[type=item, tag=set_trap] run summon block_display ~ ~ ~ {Tags:["bear_trap"], block_state:{Name:"polished_blackstone_pressure_plate"},
transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f], scale:[1f,1f,1f], translation:[-0.5f,0f,-0.5f]}, Passengers:[{id:"minecraft:interaction", Tags:["bear_trap"]}]}

CUA: execute at @e[type=item, tag=set_trap] run scoreboard players set @n[type=minecraft:block_display, tag=bear_trap] cooldown 0
CUA: kill @e[type=item, tag=set_trap]

Controller - Trap player:
RUA: execute as @e[type=block_display, tag=bear_trap, scores={cooldown=0}] at @s as @a[distance=..0.5, team=innocent] run tag @s add trapped
CUA: execute as @a[tag=trapped] run attribute @s minecraft:movement_speed modifier add 1 -10 add_value
CUA: execute as @a[tag=trapped] run attribute @s minecraft:jump_strength modifier add 1 -10 add_value
CUA: execute as @a[tag=trapped, tag=!dev] at @s rotated as @s at @n[type=minecraft:block_display, tag=bear_trap] run tp @s ~ ~ ~
CUA: effect give @a[tag=trapped] minecraft:glowing 1 0 true
CUA: execute as @e[type=block_display, tag=bear_trap, tag=!closed] at @s if entity @a[distance=..0.2, team=innocent, tag=trapped] run tag @s add closed
CCA: execute as @e[type=block_display, tag=closed] run data merge entity @s {block_state:{Name:"minecraft:spawner"}}
CCA: scoreboard players operation @e[type=block_display, tag=closed] trap_life = #default trap_life
CCA: execute at @e[type=block_display, tag=closed] run playsound minecraft:block.anvil.place block @a ~ ~ ~ 0.5 0.5 0

Controller - Escape and reset:
RUA: execute as @e[type=interaction, tag=bear_trap] at @s on attacker run playsound minecraft:block.iron_door.open block @a ~ ~ ~ 1 1 0
CUA: execute as @e[type=minecraft:interaction, tag=bear_trap] store success entity @s attack.player[] int 0 on attacker at @s run scoreboard players remove @n[type=minecraft:block_display, tag=bear_trap] trap_life 1
CUA: tag @e[type=block_display, tag=bear_trap, scores={trap_life=0}] add open_me
CUA: execute at @e[type=block_display, tag=bear_trap, scores={trap_life=0}] as @a[tag=trapped, sort=nearest, limit=1] run tag @s add free_me
CUA: tag @a[tag=free_me] remove trapped
CUA: execute as @a[tag=free_me] run attribute @s minecraft:movement_speed modifier remove minecraft:1
CUA: execute as @a[tag=free_me] run attribute @s minecraft:jump_strength modifier remove minecraft:1
CUA: effect give @a[tag=free_me] minecraft:slowness 5 2 true
CUA: tag @a[tag=free_me] remove free_me
CUA: execute as @e[type=block_display, tag=open_me] run data merge entity @s {block_state:{Name:"minecraft:polished_blackstone_pressure_plate"}}
CUA: scoreboard players operation @e[type=block_display, tag=open_me] cooldown = #default cooldown
CUA: execute as @e[type=minecraft:block_display] if score @s cooldown = #default cooldown run tag @s remove open_me
CUA: execute as @e[type=minecraft:block_display] if score @s cooldown = #default cooldown run tag @s remove closed
CUA: scoreboard players reset @e[type=block_display, scores={cooldown=40}] trap_life
CUA: scoreboard players remove @e[type=block_display, scores={cooldown=1..}] cooldown 1

Controller - Escape and break:
The first 9 commands are the same as Controller - Escape and reset
CUA: execute as @e[type=block_display, tag=open_me] on passengers run kill @s
CUA: execute as @e[type=block_display, tag=open_me] run kill @s







Other Statistics

Minecraft Statistics For Infernal Device

At present, Infernal Device has 182,428 views spread across 865 videos for Minecraft, accounting for over 10 days of watchable video on his channel. This is 94.82% of the total watchable video for Minecraft on Infernal Device's YouTube channel.