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=['\"%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 minecraft: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:custom_data\":{loredata:'\"%item_lore_line_1%\"'},\"minecraft:profile\":{properties:[{name:\"textures\",value:\"%item_lore_line_1%\"}]}}}}"
- # 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 minecraft: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% if entity @e[distance=..6,type=item_display,tag=customblock] unless block ~ ~ ~ glass positioned ~ ~1.001 ~ run minecraft:data merge entity @e[distance=..2,type=item,sort=nearest,limit=1] {Item:{components:{\"minecraft:enchantments\": {show_in_tooltip: 0b, levels: {\"minecraft:unbreaking\": 1}}, \"minecraft:custom_name\": '{\"color\":\"yellow\",\"italic\":false,\"text\":\"Custom Block\"}',\"minecraft:lore\":['\"\"']}}}"
- - 'wait_ticks: 1'
- - 'console_command: minecraft:execute at %player% positioned %block_x% %block_y% %block_z% if entity @e[distance=..6,type=item_display,tag=customblock] unless block ~ ~ ~ glass positioned ~ ~1.001 ~ run minecraft:data modify entity @e[distance=..2,type=item,sort=nearest,limit=1] Item.components."minecraft:lore"[0] set from entity @e[distance=..2,type=item_display,sort=nearest,limit=1] item.components."minecraft:custom_data".loredata'
- - 'console_command: minecraft:execute at %player% positioned %block_x% %block_y% %block_z% if entity @e[distance=..6,type=item_display,tag=customblock] unless block ~ ~ ~ glass positioned ~ ~1.001 ~ run minecraft:kill @e[distance=...002,type=item_display,sort=nearest,limit=1,tag=customblock]'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement