Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Events:
- customblock_lore:
- type: player_command
- conditions:
- - '%main_command% == /customblock'
- - '%checkitem_getinfo:mainhand_mat:% != GLASS execute errormat'
- - '%vault_eco_balance_fixed% < %math_{checkitem_amount_inhand:main}*500% execute errormoney'
- - '%luckperms_check_permission_customblock.create% equals yes and %string_length_{command}% >= 76 execute success'
- - '%luckperms_check_permission_customblock.create% equals yes execute error'
- actions:
- default:
- - 'cancel_event: true'
- - 'message: &l[CustomBlocks]&c ¡No tienes permiso para hacer eso!'
- errormat:
- - 'cancel_event: true'
- - 'message: &l[CustomBlocks]&c ¡Necesitas al menos un bloque de vidrio normal en la mano!'
- errormoney:
- - 'cancel_event: true'
- - 'message: &l[CustomBlocks]&c ¡No tienes dinero suficiente! Cada bloque cuesta $500.'
- error:
- - 'cancel_event: true'
- - 'message: &l[CustomBlocks]&c ¡Debes colocar un value correcto de minecraft-heads.com!'
- success:
- - 'cancel_event: true'
- - 'message: &l[CustomBlocks]&e ¡Haz generado bloque custom de 8x8!'
- - "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%"
- - 'console_command: money take %player% %math_{checkitem_amount_inhand:main}*500%'
- customblock_place:
- type: block_place
- conditions:
- - '%block% == GLASS'
- - '%item_lore% startsWith eyJ'
- - '%luckperms_check_permission_customblock.create% equals no execute permission'
- actions:
- default:
- - '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%"}]}}}}'
- # 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.
- - 'wait_ticks: 1'
- - 'console_command: minecraft:execute at %player% as @e[tag=customblock] at @s if block ~ ~-.003 ~ air run kill @s'
- permission:
- - 'message: &l[CustomBlocks]&c ¡No tienes permiso para colocar eso!'
- custom_block_destroy:
- type: block_break
- conditions:
- - '%block% == GLASS'
- actions:
- default:
- - 'wait_ticks: 1'
- - '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