Advertisement
ElTodoFull

Conditional Events Customblocks

Feb 4th, 2025
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.11 KB | Gaming | 0 0
  1. Events:
  2.   customblock_lore:
  3.     type: player_command
  4.     conditions:
  5.    - '%main_command% == /customblock'
  6.     - '%checkitem_getinfo:mainhand_mat:% != GLASS execute errormat'
  7.     - '%vault_eco_balance_fixed% < %math_{checkitem_amount_inhand:main}*500% execute errormoney'
  8.     - '%luckperms_check_permission_customblock.create% equals yes and %string_length_{command}% >= 76 execute success'
  9.     - '%luckperms_check_permission_customblock.create% equals yes execute error'
  10.     actions:
  11.       default:
  12.       - 'cancel_event: true'
  13.       - 'message: &l[CustomBlocks]&c ¡No tienes permiso para hacer eso!'
  14.       errormat:
  15.       - 'cancel_event: true'
  16.       - 'message: &l[CustomBlocks]&c ¡Necesitas al menos un bloque de vidrio normal en la mano!'
  17.       errormoney:
  18.       - 'cancel_event: true'
  19.       - 'message: &l[CustomBlocks]&c ¡No tienes dinero suficiente! Cada bloque cuesta $500.'
  20.       error:
  21.       - 'cancel_event: true'
  22.       - 'message: &l[CustomBlocks]&c ¡Debes colocar un value correcto de minecraft-heads.com!'
  23.       success:
  24.       - 'cancel_event: true'
  25.       - 'message: &l[CustomBlocks]&e ¡Haz generado bloque custom de 8x8!'
  26.       - "console_command: minecraft:item replace entity %player% weapon.mainhand with glass[custom_name='{\"color\":\"yellow\",\"italic\":false,\"text\":\"Custom Block\"}',lore=['\"%string_substring_0,64_{arg_1}%\"','\"%string_substring_64,128_{arg_1}%\"','\"%string_substring_128_{arg_1}%\"'],enchantments={levels:{\"minecraft:unbreaking\":1},show_in_tooltip:false}] %checkitem_amount_inhand:main%"
  27.       - 'console_command: money take %player% %math_{checkitem_amount_inhand:main}*500%'
  28.   customblock_place:
  29.     type: block_place
  30.     conditions:
  31.    - '%block% == GLASS'
  32.     - '%item_lore% startsWith eyJ'
  33.     - '%luckperms_check_permission_customblock.create% equals no execute permission'
  34.     actions:
  35.       default:
  36.       - 'console_command: minecraft:execute at %player% positioned %block_x% %block_y% %block_z% run summon item_display ~ ~1.001 ~ {Tags:["customblock"],transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[2.004f,2.004f,2.004f]},item:{id:"minecraft:player_head",count:1,components:{"minecraft:profile":{properties:[{name:"textures",value:"%item_lore_line_1%%item_lore_line_2%%item_lore_line_3%"}]}}}}'
  37.       # En caso de que bloques hayan sido destruidos por otros eventos como explosiones o worldedit, poner otro bloque verificará que todas las entidades de bloques custom tengan su bloque de vidrio correspondiente, o lo mata.
  38.       - 'wait_ticks: 1'
  39.       - 'console_command: minecraft:execute at %player% as @e[tag=customblock] at @s if block ~ ~-.003 ~ air run kill @s'
  40.       permission:
  41.       - 'message: &l[CustomBlocks]&c ¡No tienes permiso para colocar eso!'
  42.   custom_block_destroy:
  43.     type: block_break
  44.     conditions:
  45.    - '%block% == GLASS'
  46.     actions:
  47.       default:
  48.       - 'wait_ticks: 1'
  49.       - 'console_command: minecraft:execute at %player% positioned %block_x% %block_y% %block_z% unless block ~ ~ ~ glass positioned ~ ~1.001 ~ run kill @e[distance=...002,type=item_display,sort=nearest,limit=1]'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement