PK kBT+ + pack.mcmeta{ "pack": { "pack_format": 8, "description": "A Gamemode 4 Module" }, "module_name": "Lightning Rods", "module_id": "lightning_rods", "site_description": "Summon lightning at your command!", "site_categories": [ "Custom Crafting" ], "video_link": "https://www.youtube.com/watch?v=cx9fVMpHKMI", "wiki_link": "https://wiki.gm4.co/wiki/Lightning_Rods", "required_modules": [ "custom_crafters" ], "recommended_modules": [], "credits": { "Creator": [ { "name": "Eease" } ], "Updated by": [ { "name": "SpecialBuilder32", "links": [ "https://twitter.com/SpecialBuilder" ] }, { "name": "Misode", "links": [ "https://twitter.com/misode_" ] } ] } } PK eBT`nk k " data/gm4/functions/init.mcfunction#This function runs if gamemode 4 has never been used before. #It adds global scoreboards and other gamemode 4 base code. tellraw @a {"text":"[GM4]: Welcome to Gamemode 4. Initialising...","color":"green"} execute unless entity @p run say [GM4]: Welcome to Gamemode 4. Initialising... # ============================ SCOREBOARDS ============================ scoreboard objectives add gm4_clock_tick dummy scoreboard objectives add gm4_modules dummy # =========================== FAKE ENTITIES =========================== scoreboard players set gm4 gm4_up_check 1 scoreboard players set update_happened gm4_up_check 1 PK eBT#(d d ) data/gm4/functions/out_of_date.mcfunctiontellraw @a [{"text":"[GM4]: ","color":"aqua"},{"text":"Some of your modules are outdated: ","color":"white"},{"selector":"@e[type=area_effect_cloud,tag=gm4_update_message]","color":"gold","insertion":"/tellraw @p %s"}] tellraw @a [{"text":"[GM4]: ","color":"aqua"},{"text":"Click to visit our site with the latest versions.","color":"white","underlined":true,"clickEvent":{"action":"open_url","value":"https://www.gm4.co/modules/"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to visit gm4.co/modules/","color":"aqua"}]}}}] kill @e[type=area_effect_cloud,tag=gm4_update_message] PK eBT " data/gm4/functions/tick.mcfunction#runs every tick scoreboard players add current_tick gm4_clock_tick 1 execute if score current_tick gm4_clock_tick matches 16.. run scoreboard players set current_tick gm4_clock_tick 0 function #gm4:pulse_check #prints scheduled out-of-date messages to chat execute if score current_tick gm4_clock_tick matches 0 if entity @e[limit=1,tag=gm4_update_message,type=area_effect_cloud] if entity @a[limit=1] run function gm4:out_of_date PK eBT/ $ data/gm4/functions/update.mcfunction#This function runs every time a world/server is restarted or /reload is run. #It checks for new modules, tells them to initialise and informs the player. tellraw @a {"text":"[GM4]: Checking for updates...","color":"aqua"} execute unless entity @p run say [GM4]: Checking for updates... #set update_happened to false until proven otherwise scoreboard objectives add gm4_up_check dummy scoreboard players set update_happened gm4_up_check 0 #check if GM4 has been used here before execute unless score gm4 gm4_up_check matches 1.. run function gm4:init #get all modules to check if they need installing scoreboard players set installed_modules gm4_up_check 0 function #gm4:init_check #announce success of update if one happened. execute if score update_happened gm4_up_check matches 0 run tellraw @a {"text":"[GM4]: No updates found.","color":"aqua"} execute unless entity @p run execute if score update_happened gm4_up_check matches 0 run say [GM4]: No updates found. execute if score update_happened gm4_up_check matches 1 run tellraw @a {"text":"[GM4]: Updates completed.","color":"aqua"} execute unless entity @p run execute if score update_happened gm4_up_check matches 1 run say [GM4]: Updates completed. PK eBTݓOH 1 data/gm4/advancements/lightning_rods_shulker.json{ "display":{ "icon":{ "item":"blaze_rod", "nbt":"{Enchantments:[{id:mending,lvl:1}],display:{Name:\"\\\"lightning_rods_shulker logo\\\"\"}}" }, "title":"Dr. Frankenstein", "description":{ "text":"It's alive! Create a Shulker", "color":"gray" } }, "parent":"gm4:custom_crafters", "criteria":{ "create_shulker":{ "trigger":"minecraft:impossible" } } } PK eBTdm data/gm4/advancements/root.json{ "display":{ "icon":{ "item":"command_block", "nbt":"{display:{Name:\"\\\"GM4 Logo\\\"\"}}" }, "title":"Gamemode 4", "description":{ "text":"Semi-funny blurb about gm4", "color":"gray" }, "background":"textures/block/light_blue_concrete_powder.png", "announce_to_chat": false }, "criteria":{ "automatic":{ "trigger":"minecraft:tick" } } } PK eBT^'> > ' data/gm4/tags/functions/init_check.json{ "values":[ "lightning_rods:init_check" ] } PK eBT? ? ( data/gm4/tags/functions/pulse_check.json{ "values":[ "lightning_rods:pulse_check" ] } PK eBTӮ' ' ' data/minecraft/tags/functions/load.json{ "values": [ "gm4:update" ] } PK eBT!b@% % ' data/minecraft/tags/functions/tick.json{ "values": [ "gm4:tick" ] } PK eBTB78 8 5 data/custom_crafters/tags/functions/recipe_check.json{ "values": [ "lightning_rods:recipe_check" ] } PK eBTԆ - data/lightning_rods/functions/boom.mcfunction# @s = lightning rod item on ground after the countdown execute if block ~ ~-1 ~ spawner{SpawnData:{id:"minecraft:creeper"}} run data merge block ~ ~-1 ~ {MaxSpawnDelay:801s,SpawnData:{id:"minecraft:creeper",powered:true},SpawnPotentials:[{Entity:{id:"minecraft:creeper",powered:true},Weight:1}]} execute if block ~ ~-1 ~ purpur_block run function lightning_rods:create_shulker summon lightning_bolt kill @s PK eBT 7 data/lightning_rods/functions/create_shulker.mcfunctionsetblock ~ ~-1 ~ air summon shulker ~ ~-1 ~ {ActiveEffects:[{Id:10b,Duration:20,Amplifier:10b,ShowParticles:0b}],Color:16,DeathLootTable:"lightning_rods:shulker"} advancement grant @a[distance=..5,gamemode=!spectator] only gm4:lightning_rods_shulker PK kBT\W