PK NBT-31X X pack.mcmeta{ "pack": { "pack_format": 8, "description": "A Gamemode 4 Module" }, "module_name": "Block Compressors", "module_id": "block_compressors", "site_description": "Compress stacks of blocks down for compact storage, or decompress them again.", "site_categories": [ "Custom Crafting" ], "video_link": "https://www.youtube.com/watch?v=sdrTJYjL8C0", "wiki_link": "https://wiki.gm4.co/wiki/Block_Compressors", "required_modules": [ "custom_crafters" ], "recommended_modules": [], "credits": { "Creator": [ { "name": "Sparks", "links": [ "https://twitter.com/SparksTheGamer" ] } ], "Updated by": [ { "name": "SunderB" }, { "name": "Misode", "links": [ "https://twitter.com/misode_" ] } ] } } 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 GBTO , data/gm4/advancements/block_compressors.json{ "display": { "icon": { "item": "piston", "nbt": "{CustomModelData:1}" }, "title": { "translate": "%1$s%3427655$s", "with": [ "Clever Crushing", {"translate": "advancement.gm4.block_compressors.title"} ] }, "description": { "translate": "%1$s%3427655$s", "with": [ "Make yourself a Block Compressor", {"translate": "advancement.gm4.block_compressors.description"} ], "color": "gray" } }, "parent": "gm4:custom_crafters", "criteria": { "create_block_compressor": { "trigger": "minecraft:impossible" } } } PK GBT:< 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 GBT@ @ ' data/gm4/tags/functions/init_check.json{ "values":[ "block_compressors:init_check" ] } PK GBT-oA A ( data/gm4/tags/functions/pulse_check.json{ "values":[ "block_compressors: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 GBT ;! ! 7 data/block_compressors/functions/compress/16.mcfunction#@s = item entity to be compressed #run from block_compressors:item #copy existing data for restoration at decompression data modify entity @s Item.tag.gm4_precompression_tag set from entity @s Item.tag #if no tag data to save, make a note execute unless data entity @s Item.tag run data modify entity @s Item.tag.gm4_precompression_tag set value "no_tag_data_to_preserve" #add new data to indicate store compression state data merge entity @s {Item:{Count:1b,tag:{CustomModelData:16,gm4_compressed:{value:16},HideFlags:1,Enchantments:[{id:"minecraft:protection",lvl:0}]}}} data modify entity @s Item.tag.display.Lore append value '{"translate":"%1$s%3427655$s","with":["Compressed *16",{"translate":"text.gm4.block_compressors.compressed","with":["16"]}]}' playsound block.piston.extend block @a PK GBTck! ! 7 data/block_compressors/functions/compress/64.mcfunction#@s = item entity to be compressed #run from block_compressors:item #copy existing data for restoration at decompression data modify entity @s Item.tag.gm4_precompression_tag set from entity @s Item.tag #if no tag data to save, make a note execute unless data entity @s Item.tag run data modify entity @s Item.tag.gm4_precompression_tag set value "no_tag_data_to_preserve" #add new data to indicate store compression state data merge entity @s {Item:{Count:1b,tag:{CustomModelData:64,gm4_compressed:{value:64},HideFlags:1,Enchantments:[{id:"minecraft:protection",lvl:0}]}}} data modify entity @s Item.tag.display.Lore append value '{"translate":"%1$s%3427655$s","with":["Compressed *64",{"translate":"text.gm4.block_compressors.compressed","with":["64"]}]}' playsound block.piston.extend block @a PK GBTB 2 data/block_compressors/functions/create.mcfunctiondata merge block ~ ~ ~ {Items:[],CustomName:'{"translate":"%1$s%3427655$s","with":["Compressor",{"translate":"block.gm4.block_compressor"}]}'} data merge entity @s {CustomName:'"gm4_block_compressor"',ArmorItems:[{},{},{},{id:player_head,Count:1b,tag:{CustomModelData:1,SkullOwner:{Id:"91a0efa2-3d18-49cf-b3bd-0a177cf37789",Properties:{textures:[{Value:"eyJ0aW1lc3RhbXAiOjE0NTMzMjYwNjc3NzksInByb2ZpbGVJZCI6IjkxYTBlZmEyM2QxODQ5Y2ZiM2JkMGExNzdjZjM3Nzg4IiwicHJvZmlsZU5hbWUiOiJEdWNrSnIiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzFkNmNkYTQwYjViODEyODVhZmRiY2RlOWQ2M2M3OGUxNzZkMzFiNTk0YjFhNmQ5Nzc5OWQ0OTBkN2VmMjkyIn19fQ=="}]}}}}]} playsound minecraft:block.piston.contract block @a[distance=..5] tag @s add gm4_block_compressor tag @s remove gm4_custom_crafter advancement grant @a[distance=..3,gamemode=!spectator] only gm4:block_compressors PK GBT# 3 data/block_compressors/functions/destroy.mcfunctionloot spawn ~ ~.6 ~ loot block_compressors:destroy_block_compressor particle block piston ~ ~1 ~ .1 .25 .1 .05 30 normal @a kill @s PK NBTc8, 8, 0 data/block_compressors/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 Block Compressors...",{"translate":"text.gm4.modules.update.installing","with":[{"translate":"module.gm4.block_compressors"}]}]}] execute unless entity @a[limit=1] run say GM4: Installing Block Compressors... #declare and initialise scoreboards and settings scoreboard players set update_happened gm4_up_check 1 scoreboard players set block_compressors gm4_modules 14001 scoreboard players set block_compressors gm4_clock_tick 0 #announce success tellraw @a[gamemode=creative] [{"translate":"%1$s%3427655$s","with":["[GM4]: ",{"translate":"text.gm4.prefix"}]},{"translate":"%1$s%3427655$s","with":["Block Compressors Installed!",{"translate":"text.gm4.modules.update.installed","with":[{"translate":"module.gm4.block_compressors"}]}]}] execute unless entity @a[limit=1] run say GM4: Block Compressors 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 NBTJ@ 6 data/block_compressors/functions/init_check.mcfunction#unless the module is already initialized execute unless score block_compressors gm4_modules matches 14001.. run function block_compressors:init scoreboard players add installed_modules gm4_up_check 1 PK GBT7 0 data/block_compressors/functions/item.mcfunction# @s = item above block compressor # run from process execute if block ~ ~ ~ dropper{Items:[{Count:64b}]} if entity @s[nbt={Item:{Count:64b}},nbt=!{Item:{tag:{gm4_compressed:{}}}}] run function block_compressors:compress/64 execute if block ~ ~ ~ dropper{Items:[{Count:16b}]} if entity @s[nbt={Item:{Count:16b}},nbt=!{Item:{tag:{gm4_compressed:{}}}}] run function block_compressors:compress/16 execute if block ~ ~ ~ dropper{Items:[{Count:1b}]} if entity @s[nbt={Item:{Count:1b,tag:{gm4_compressed:{value:64}}}}] run function block_compressors:decompress/64 execute if block ~ ~ ~ dropper{Items:[{Count:1b}]} if entity @s[nbt={Item:{Count:1b,tag:{gm4_compressed:{value:16}}}}] run function block_compressors:decompress/16 PK GBTFVPf f 0 data/block_compressors/functions/main.mcfunctionexecute as @e[type=armor_stand,tag=gm4_block_compressor] at @s run function block_compressors:process PK GBT{m4 4 3 data/block_compressors/functions/process.mcfunction# @s = block compressor # run from main execute positioned ~ ~1 ~ align xyz as @e[type=item,dx=0] positioned ~0.5 ~-0.9 ~0.5 run function block_compressors:item particle portal ~ ~1.1 ~ 0 0 0 0.1 20 data merge entity @s {Fire:2000} execute unless block ~ ~ ~ dropper run function block_compressors:destroy PK GBTQOY{ 7 data/block_compressors/functions/pulse_check.mcfunction#compares assigned run tick to current tick and calls main execute if score current_tick gm4_clock_tick = block_compressors gm4_clock_tick run function block_compressors:main PK GBTu 8 data/block_compressors/functions/recipe_check.mcfunctionexecute if score @s gm4_stack_size matches 1 if block ~ ~ ~ dropper{Items:[{Slot:0b,id:"minecraft:iron_ingot"},{Slot:1b,id:"minecraft:obsidian"},{Slot:2b,id:"minecraft:iron_ingot"},{Slot:3b,id:"minecraft:piston"},{Slot:4b,id:"minecraft:purpur_block"},{Slot:5b,id:"minecraft:piston"},{Slot:6b,id:"minecraft:iron_ingot"},{Slot:7b,id:"minecraft:obsidian"},{Slot:8b,id:"minecraft:iron_ingot"}]} run function block_compressors:create PK GBT,I 9 data/block_compressors/functions/decompress/16.mcfunction#@s = item entity to be decompressed #run from block_compressors:item #set item count data merge entity @s {Item:{Count:16b}} #grandfather previously compressed items in older formats without gm4_precompression_tag execute unless data entity @s Item.tag.gm4_precompression_tag run data remove entity @s Item.tag #if original had no data, remove tag entirely execute if entity @s[nbt={Item:{tag:{gm4_precompression_tag:"no_tag_data_to_preserve"}}}] run data remove entity @s Item.tag #restore original item tag, overwriting tags from compression data modify entity @s Item.tag set from entity @s Item.tag.gm4_precompression_tag playsound entity.firework_rocket.blast block @a ~ ~ ~ 1 .1 PK GBTv> 9 data/block_compressors/functions/decompress/64.mcfunction#@s = item entity to be decompressed #run from block_compressors:item #set item count data merge entity @s {Item:{Count:64b}} #grandfather previously compressed items in older formats without gm4_precompression_tag execute unless data entity @s Item.tag.gm4_precompression_tag run data remove entity @s Item.tag #if original had no data, remove tag entirely execute if entity @s[nbt={Item:{tag:{gm4_precompression_tag:"no_tag_data_to_preserve"}}}] run data remove entity @s Item.tag #restore original item tag, overwriting tags from compression data modify entity @s Item.tag set from entity @s Item.tag.gm4_precompression_tag playsound entity.firework_rocket.blast block @a ~ ~ ~ 1 .1 PK GBTDŽ @ data/block_compressors/loot_tables/destroy_block_compressor.json{ "type": "minecraft:block", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:iron_ingot", "functions": [ { "function": "minecraft:set_count", "count": 4 } ] } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:piston", "functions":[ { "function": "minecraft:set_count", "count": 2 } ] } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:obsidian", "functions": [ { "function": "minecraft:set_count", "count": 2 } ] } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:purpur_block" } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:loot_table", "name": "custom_crafters:destroy_custom_crafter" } ] } ] } PK GBT* * <