PK NBT9L*k k pack.mcmeta{
"pack": {
"pack_format": 8,
"description": "A Gamemode 4 Module"
},
"module_name": "Custom Crafters",
"module_id": "custom_crafters",
"site_description": "A base module that adds a custom crafting table to the game.",
"site_categories": [
"Custom Crafting"
],
"video_link": "https://www.youtube.com/watch?v=_GekIoefncg",
"wiki_link": "https://wiki.gm4.co/wiki/Custom_Crafters",
"required_modules": [],
"recommended_modules": [
"standard_crafting",
"record_crafting",
"master_crafting",
"disassemblers",
"block_compressors"
],
"credits": {
"Creator": [
{
"name": "Sparks",
"links": [
"https://twitter.com/SparksTheGamer"
]
}
],
"Updated by": [
{
"name": "Bloo",
"links": [
"https://twitter.com/Bloo_dev"
]
},
{
"name": "Sparks",
"links": [
"https://twitter.com/SparksTheGamer"
]
},
{
"name": "SpecialBuilder32",
"links": [
"https://twitter.com/SpecialBuilder"
]
}
]
}
}
PK GBT[@ɺ " 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 [{"translate": "%1$s%3427655$s","with":["[GM4]: ",{"translate": "text.gm4.prefix"}],"color":"green"},{"translate": "%1$s%3427655$s","with":["Welcome to Gamemode 4. Initialising...",{"translate": "text.gm4.modules.init"}],"color":"green"}]
execute unless entity @a[limit=1] run say [GM4]: Welcome to Gamemode 4. Initialising...
#declare and initialise scoreboards and settings
scoreboard objectives add gm4_clock_tick dummy
scoreboard objectives add gm4_modules dummy
scoreboard players set gm4 gm4_up_check 1
scoreboard players set update_happened gm4_up_check 1
PK GBTB| " data/gm4/functions/load.mcfunction#This function runs every time a world/server is restarted or /reload is run.
#It waits for a player to be online before checking for updates.
execute if entity @a[limit=1] run function gm4:update
execute unless entity @a[limit=1] run schedule function gm4:load 1t
PK GBT~ ) data/gm4/functions/out_of_date.mcfunction#print out-of-date message
tellraw @a [{"translate":"%1$s%3427655$s","with":["[GM4]: ",{"translate":"text.gm4.prefix"}],"color":"aqua"},{"translate":"%1$s%3427655$s","with":[["Some of your modules are outdated: ",{"selector":"@e[type=area_effect_cloud,tag=gm4_update_message]","color":"gold"}],{"translate":"text.gm4.modules.outdated","with":[{"selector":"@e[type=area_effect_cloud,tag=gm4_update_message]","color":"gold"}]}]}]
tellraw @a [{"translate": "%1$s%3427655$s","with":["[GM4]: ",{"translate": "text.gm4.prefix"}],"color":"aqua"},{"translate": "%1$s%3427655$s","with":["Click to visit our site with the latest versions.",{"translate": "text.gm4.modules.outdated_link"}],"color":"white","underlined":true,"clickEvent":{"action":"open_url","value":"https://www.gm4.co/modules/"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"translate":"%1$s%3427655$s","with":["Click to visit gm4.co/modules/",{"translate":"text.gm4.modules.update.hover_text"}],"color":"aqua"}]}}}]
kill @e[type=area_effect_cloud,tag=gm4_update_message]
PK GBT0,Z " 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
PK GBTΦ $ data/gm4/functions/update.mcfunction#This function runs every time after world/server is restarted or /reload is run and a player is online.
#It checks for new modules, tells them to initialise and informs the player.
tellraw @a [{"translate": "%1$s%3427655$s","with":["[GM4]: ",{"translate": "text.gm4.prefix"}],"color":"aqua"},{"translate": "%1$s%3427655$s","with":["Checking for updates...",{"translate": "text.gm4.modules.update.check"}],"color":"aqua"}]
execute unless entity @a[limit=1] 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 [{"translate": "%1$s%3427655$s","with":["[GM4]: ",{"translate": "text.gm4.prefix"}],"color":"aqua"},{"translate": "%1$s%3427655$s","with":["No updates found.",{"translate": "text.gm4.modules.update.none_found"}],"color":"aqua"}]
execute unless entity @a[limit=1] 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 [{"translate": "%1$s%3427655$s","with":["[GM4]: ",{"translate": "text.gm4.prefix"}],"color":"aqua"},{"translate": "%1$s%3427655$s","with":["Updates completed.",{"translate": "text.gm4.modules.update.completed"}],"color":"aqua"}]
execute unless entity @a[limit=1] run execute if score update_happened gm4_up_check matches 1 run say [GM4]: Updates completed.
#prints scheduled out-of-date messages to chat
execute if score current_tick gm4_clock_tick matches 0 if entity @a[limit=1] if entity @e[type=area_effect_cloud,tag=gm4_update_message,limit=1] run function gm4:out_of_date
PK GBT ś' * data/gm4/advancements/custom_crafters.json{
"display": {
"icon": {
"item": "crafting_table",
"nbt": "{CustomModelData:3}"
},
"title": {
"translate": "%1$s%3427655$s",
"with": [
"Clever Crafting",
{"translate": "advancement.gm4.custom_crafters.title"}
]
},
"description": {
"translate": "%1$s%3427655$s",
"with": [
"Construct a Custom Crafter from a Dropper",
{"translate": "advancement.gm4.custom_crafters.description"}
],
"color": "gray"
}
},
"parent": "gm4:root",
"criteria": {
"build_crafter": {
"trigger": "minecraft:impossible"
}
}
}
PK GBTx data/gm4/advancements/root.json{
"display": {
"icon": {
"item": "command_block",
"nbt": "{CustomModelData:1}"
},
"title": {
"translate": "%1$s%3427655$s",
"with": [
"Gamemode 4",
{"translate": "advancement.gm4.root.title"}
]
},
"description": {
"translate": "%1$s%3427655$s",
"with": [
"Semi-funny blurb about GM4",
{"translate": "advancement.gm4.root.description"}
],
"color": "gray"
},
"background": "textures/block/light_blue_concrete_powder.png",
"announce_to_chat": false
},
"criteria": {
"automatic": {
"trigger": "minecraft:tick"
}
}
}
PK GBTY? ? ' data/gm4/tags/functions/init_check.json{
"values":[
"custom_crafters:init_check"
]
}
PK GBT6@ @ ( data/gm4/tags/functions/pulse_check.json{
"values":[
"custom_crafters:pulse_check"
]
}
PK GBT_, , ' data/minecraft/tags/functions/load.json{
"values":[
"gm4:load"
]
}
PK GBT"s, , ' data/minecraft/tags/functions/tick.json{
"values":[
"gm4:tick"
]
}
PK GBTs9 : data/custom_crafters/functions/apply_multiplier.mcfunction#@s = crafters containing a recipe results
#Run from recipe_validity_check
execute store result score stack_multiplier gm4_stack_size run data get block ~ ~ ~ Items[0].tag.gm4_custom_crafters.multiplier
scoreboard players operation @s gm4_stack_size *= stack_multiplier gm4_stack_size
execute store result block ~ ~ ~ Items[0].Count byte 1 run scoreboard players get @s gm4_stack_size
#data remove block
data remove block ~ ~ ~ Items[0].tag.gm4_custom_crafters
#remove tag
execute store result score tag_size gm4_stack_size run data get block ~ ~ ~ Items[0].tag
execute if score tag_size gm4_stack_size matches 0 run data remove block ~ ~ ~ Items[0].tag
PK GBT3̞ 0 data/custom_crafters/functions/create.mcfunction#@s = @e[type=item,nbt=CRAFTING_TABLE] at @s if block ~ ~-1 ~ dropper{CC RECIPE} align xyz positioned ~.5 ~-1 ~.5
#Run from main
execute unless block ~ ~ ~ dropper{Items:[]} run summon armor_stand ~ ~.1 ~ {Small:1,NoGravity:1,Marker:1,Invulnerable:1,Invisible:1,DisabledSlots:2039552,Tags:["gm4_no_edit","gm4_custom_crafter"],Fire:200000,CustomName:'"gm4_custom_crafter"',ArmorItems:[{},{},{},{id:"crafting_table",Count:1,tag:{CustomModelData:1}}]}
data merge block ~ ~ ~ {Items:[],CustomName:'{"translate":"%1$s%3427655$s","with":["Custom Crafter",{"translate":"block.gm4.custom_crafter"}]}'}
advancement grant @a[distance=..4] only gm4:custom_crafters
kill @s
PK GBT>= 1 data/custom_crafters/functions/destroy.mcfunction#@s = @e[type=armor_stand,tag=gm4_custom_crafter] at @s unless block ~ ~ ~ dropper
#Run from main
function #custom_crafters:destroy
loot spawn ~ ~.6 ~ loot custom_crafters:destroy_custom_crafter
particle block crafting_table ~ ~1 ~ .1 .25 .1 .05 30 normal @a
kill @s
PK NBTx=, , . data/custom_crafters/functions/init.mcfunction#announce module installation
tellraw @a[gamemode=creative] [{"translate":"%1$s%3427655$s","with":["[GM4]: ",{"translate":"text.gm4.prefix"}]},{"translate":"%1$s%3427655$s","with":["Installing Custom Crafters...",{"translate":"text.gm4.modules.update.installing","with":[{"translate":"module.gm4.custom_crafters"}]}]}]
execute unless entity @a[limit=1] run say GM4: Installing Custom Crafters...
#declare and initialise scoreboards and settings
scoreboard players set update_happened gm4_up_check 1
scoreboard players set custom_crafters gm4_modules 14001
scoreboard players set custom_crafters gm4_clock_tick 0
scoreboard objectives add gm4_slot_count dummy
scoreboard objectives add gm4_stack_size dummy
#announce success
tellraw @a[gamemode=creative] [{"translate":"%1$s%3427655$s","with":["[GM4]: ",{"translate":"text.gm4.prefix"}]},{"translate":"%1$s%3427655$s","with":["Custom Crafters Installed!",{"translate":"text.gm4.modules.update.installed","with":[{"translate":"module.gm4.custom_crafters"}]}]}]
execute unless entity @a[limit=1] run say GM4: Custom Crafters Installed!
#check other modules to make sure they're up to date.
# Module update list
kill @e[tag=gm4_update_message]
execute if score ambrosia gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Ambrosia"",Tags:["gm4_update_message"],Duration:2000}
execute if score bat_grenades gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Bat Grenades"",Tags:["gm4_update_message"],Duration:2000}
execute if score better_armour_stands gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Better Armour Stands"",Tags:["gm4_update_message"],Duration:2000}
execute if score better_fire gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Better Fire"",Tags:["gm4_update_message"],Duration:2000}
execute if score block_compressors gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Block Compressors"",Tags:["gm4_update_message"],Duration:2000}
execute if score boots_of_ostara gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Boots of Ostara"",Tags:["gm4_update_message"],Duration:2000}
execute if score cement_mixers gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Cement Mixers"",Tags:["gm4_update_message"],Duration:2000}
execute if score chairs gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Chairs"",Tags:["gm4_update_message"],Duration:2000}
execute if score cooler_caves gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Cooler Caves"",Tags:["gm4_update_message"],Duration:2000}
execute if score crossbow_cartridges gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Crossbow Cartridges"",Tags:["gm4_update_message"],Duration:2000}
execute if score custom_crafters gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Custom Crafters"",Tags:["gm4_update_message"],Duration:2000}
execute if score dangerous_dungeons gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Dangerous Dungeons"",Tags:["gm4_update_message"],Duration:2000}
execute if score desire_lines gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Desire Lines"",Tags:["gm4_update_message"],Duration:2000}
execute if score disassemblers gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Disassemblers"",Tags:["gm4_update_message"],Duration:2000}
execute if score enchantment_extractors gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Enchantment Extractors"",Tags:["gm4_update_message"],Duration:2000}
execute if score end_fishing gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""End Fishing"",Tags:["gm4_update_message"],Duration:2000}
execute if score ender_hoppers gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Ender Hoppers"",Tags:["gm4_update_message"],Duration:2000}
execute if score enderman_support_class gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Enderman Support Class"",Tags:["gm4_update_message"],Duration:2000}
execute if score heart_canisters gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Heart Canisters"",Tags:["gm4_update_message"],Duration:2000}
execute if score holographic_tags gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Holographic Tags"",Tags:["gm4_update_message"],Duration:2000}
execute if score ink_spitting_squid gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Ink Spitting Squid"",Tags:["gm4_update_message"],Duration:2000}
execute if score lightning_rods gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Lightning Rods"",Tags:["gm4_update_message"],Duration:2000}
execute if score liquid_minecarts gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Liquid Minecarts"",Tags:["gm4_update_message"],Duration:2000}
execute if score liquid_tanks gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Liquid Tanks"",Tags:["gm4_update_message"],Duration:2000}
execute if score master_crafting gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Master Crafting"",Tags:["gm4_update_message"],Duration:2000}
execute if score mending_tanks gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Mending Tanks"",Tags:["gm4_update_message"],Duration:2000}
execute if score metallurgy gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Metallurgy"",Tags:["gm4_update_message"],Duration:2000}
execute if score mob_conversion gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Mob Conversion"",Tags:["gm4_update_message"],Duration:2000}
execute if score moneo_shamir gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Moneo Shamir"",Tags:["gm4_update_message"],Duration:2000}
execute if score mysterious_midnights gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Mysterious Midnights"",Tags:["gm4_update_message"],Duration:2000}
execute if score note_block_interface gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Note Block Interface"",Tags:["gm4_update_message"],Duration:2000}
execute if score orbis gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Orbis"",Tags:["gm4_update_message"],Duration:2000}
execute if score orbis_pre_gen gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Orbis Pre-gen"",Tags:["gm4_update_message"],Duration:2000}
execute if score particles_pack gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Particles Pack"",Tags:["gm4_update_message"],Duration:2000}
execute if score phantom_scarecrows gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Phantom Scarecrows"",Tags:["gm4_update_message"],Duration:2000}
execute if score pig_tractors gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Pig Tractors"",Tags:["gm4_update_message"],Duration:2000}
execute if score poses_pack gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Poses Pack"",Tags:["gm4_update_message"],Duration:2000}
execute if score potion_liquids gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Potion Liquids"",Tags:["gm4_update_message"],Duration:2000}
execute if score potion_swords gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Potion Swords"",Tags:["gm4_update_message"],Duration:2000}
execute if score record_crafting gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Record Crafting"",Tags:["gm4_update_message"],Duration:2000}
execute if score relocators gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Relocators"",Tags:["gm4_update_message"],Duration:2000}
execute if score scuba_gear gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Scuba Gear"",Tags:["gm4_update_message"],Duration:2000}
execute if score shroomites gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Shroomites"",Tags:["gm4_update_message"],Duration:2000}
execute if score spawner_minecarts gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Spawner Minecarts"",Tags:["gm4_update_message"],Duration:2000}
execute if score speed_paths gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Speed Paths"",Tags:["gm4_update_message"],Duration:2000}
execute if score standard_crafting gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Standard Crafting"",Tags:["gm4_update_message"],Duration:2000}
execute if score sunken_treasure gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Sunken Treasure"",Tags:["gm4_update_message"],Duration:2000}
execute if score tinkering_compressors gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Tinkering Compressors"",Tags:["gm4_update_message"],Duration:2000}
execute if score tower_structures gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Tower Structures"",Tags:["gm4_update_message"],Duration:2000}
execute if score trapped_signs gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Trapped Signs"",Tags:["gm4_update_message"],Duration:2000}
execute if score undead_players gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Undead Players"",Tags:["gm4_update_message"],Duration:2000}
execute if score vertical_rails gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Vertical Rails"",Tags:["gm4_update_message"],Duration:2000}
execute if score weighted_armour gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Weighted Armour"",Tags:["gm4_update_message"],Duration:2000}
execute if score xp_storage gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""XP Storage"",Tags:["gm4_update_message"],Duration:2000}
execute if score zauber_cauldrons gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Zauber Cauldrons"",Tags:["gm4_update_message"],Duration:2000}
execute if score zauber_liquids gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Zauber Liquids"",Tags:["gm4_update_message"],Duration:2000}
execute if score ziprails gm4_modules matches ..14000 run summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:""Ziprails"",Tags:["gm4_update_message"],Duration:2000}
PK NBT̸ 4 data/custom_crafters/functions/init_check.mcfunction#unless the module is already initialized
execute unless score custom_crafters gm4_modules matches 14001.. run function custom_crafters:init
scoreboard players add installed_modules gm4_up_check 1
PK GBT