force_push: type: task debug: true definitions: target|multiplier script: - if <[target].location.if_null[null]> == null: # it's a block - narrate "pushing in <[target].direction.vector>" - define material <[target].material> - define block_display block_display[material=<[material]>;translation=-0.5,0,-0.5] - define offset 0.5,0,0.5 - spawn <[block_display]> <[target].center.round_down.add[<[offset]>]> save:s - define ent - define shulker shulker[has_ai=false;invulnerable=true;persistent=true;shulker_peek=0;silent=true;visible=false] - mount <[shulker]>|<[ent]> <[target].round_up> - teleport <[ent]> <[target].center.round_down.add[<[offset]>]> - modifyblock <[target]> air - define stop false - define max_distance <[target].ray_trace[range=7;return=block].sub[]||<[target].above[7]>> - narrate <[max_distance]> - playsound <[target]> sound:entity_warden_emerge volume: pitch: - push <[ent]> origin:<[ent].location> destination:<[ent].location.forward[10]> speed:0.3 no_rotate duration:5s