Page 1 of 1

[WIP] packed_things mod: compress your blocks

Posted: Thu Jan 12, 2017 09:58
by scottvee
Hi. MineTest has really come of age, and I finally got a chance to start coding some mods. Basic stuff to begin with. This mod lets you pack your cobble, dirt and sand by a factor of 9 into Packed Cobble, Dirt and Sand, then again into 2x Packed Cobble, Dirt and Sand, and again ... up to Ultra Packed blocks containing 9^8 of your original blocks. Inspired by some old Minecraft mods. I was playing MineTest and my inventory ran out, and I wished this was in the game, so here it is.

Download link: https://github.com/scottvee/packed_thin ... master.zip
GitHub wiki: https://github.com/scottvee/packed_things/wiki

Some images:

Packed cobble through Ultra Packed cobble:
Image

Packed cobble as decorative blocks:
Image

Packed dirt series:
Image

Packed sand series:
Image

A few others are in the works, but these account for most of our inventory so I started here. The packed blocks all act as stone and get increasingly hard to break.

Just creating an Ultra Packed block is a personal challenge, since each one takes 9^8 = 43,046,721 blocks to make! Anyway, this was made to save chest space. Enjoy. ;-)

Re: [WIP] packed_things mod: compress your blocks

Posted: Thu Jan 12, 2017 19:37
by D00Med
These look interesting, nice work

Re: [WIP] packed_things mod: compress your blocks

Posted: Sun Jan 15, 2017 04:27
by scottvee
Thanks. I added a download link from the Github page, just click and unpack the zip file to your Minetest/mods folder.

Update: I added packed series for snow, ice, desert_sand, desert_cobble and gravel.

I also added a config file so you can enable just the ones you want to use, and after moving each series of blocks to its own include file, any of the packed items you don't want to use, their code is never included at all.

Packed gravel:
Image

Packed ice:
Image

Packed snow:
Image

This really helps compact your inventory when on a deep mining trip. With unified_inventory for example, you can select the Packed Gravel recipe, choose "Move to Crafting: All", then click the output slot to pack your gravel. Back home I have a few autocrafters that make compressed_cobblestone -> packed_cobble -> packed_cobble_x2 -> packed cobble_x3, so a whole chest full of gravel ends up fitting in less than a stack of blocks. ;-)

Re: [WIP] packed_things mod: compress your blocks

Posted: Thu Jan 04, 2018 21:40
by TechNolaByte
hi this is actually really good may I suggest a way to compact all that code into 1 nice and small function?
well I haven't even sent this yet sooo ima take that as a yes

you can use a for loop like this(this is a snippet of code from my skytest mod feel free to use this snippet)

Code: Select all


for name, data in pairs({
    dirt = {
        mat = "default:dirt",
        tex = "default_dirt.png",
    },
    obsidian = {
        mat = "default:obsidian",
        tex = "default_obsidian.png",
    },
}) do
    
    
    
minetest.register_node("packed_things:compressed_"..name.."_9c", {
    description = "compressed "..name.." 9c",
    tiles = {""..data.tex.."^[colorize:black:50"},
    groups = {cracky = 2}
})

minetest.register_node("packed_things:double_compressed_"..name.."_81c", {
    description = "double compressed "..name.." 81c",
    tiles = {""..data.tex.."^[colorize:black:70"},
    groups = {cracky = 2}
})


minetest.register_node("packed_things:triple_compressed_"..name.."_729c", {
    description = "triple compressed "..name.." 729c",
    tiles = {""..data.tex.."^[colorize:black:90"},
    groups = {cracky = 2}
})

minetest.register_node("packed_things:quadruple_compressed_"..name.."_6561c", {
    description = "quadruple compressed "..name.." 6561c",
    tiles = {""..data.tex.."^[colorize:black:130"},
    groups = {cracky = 2}
})
minetest.register_node("packed_things:quintuple_compressed_"..name.."_59049c", {
    description = "quintuple compressed "..name.." 59,049c",
    tiles       = {""..data.tex.."^[colorize:black:150"},
    groups      = {cracky = 2}
})
minetest.register_node("packed_things:sextuple_compressed_"..name.."_531441c", {
    description = "sextuple compressed "..name.." 531,441c",
    tiles = {""..data.tex.."^[colorize:black:170"},
    groups = {cracky = 2}
})
minetest.register_node("packed_things:septuple_compressed_"..name.."_4782969c", {
    description = "septuple compressed "..name.." 4,782,969c",
    tiles = {""..data.tex.."^[colorize:black:190"},
    groups = {cracky = 2}
})
minetest.register_node("packed_things:octuple_compressed_"..name.."_43046721c", {
    description = "octuple compressed "..name.." 43,046,721c",
    tiles = {""..data.tex.."^[colorize:black:210"},
    drawtype = "nodebox",
	paramtype = "light",
	sunlight_propagates = true,
	is_ground_content = false,
	groups = {cracky = 3},
	node_box = {
		type = "fixed",
		fixed = {
			-- top (Y+)
			{-0.0625, 0, -0.0625, 0.0625, 0.0625, 0.0625},
			{-0.125, 0.0625, -0.125, 0.125, 0.125, -0.0625},
			{-0.125, 0.0625, 0.0625, 0.125, 0.125, 0.125},
			{0.0625, 0.0625, -0.0625, 0.125, 0.125, 0.0625},
			{-0.125, 0.0625, -0.0625, -0.0625, 0.125, 0.0625},
			{0.125, 0.125, -0.1875, 0.1875, 0.1875, 0.1875},
			{-0.1875, 0.125, -0.1875, -0.125, 0.1875, 0.1875},
			{-0.125, 0.125, 0.125, 0.125, 0.1875, 0.1875},
			{-0.125, 0.125, -0.1875, 0.125, 0.1875, -0.125},
			{-0.25, 0.1875, 0.1875, 0.25, 0.25, 0.25},
			{-0.25, 0.1875, -0.25, 0.25, 0.25, -0.1875},
			{0.1875, 0.1875, -0.1875, 0.25, 0.25, 0.1875},
			{-0.25, 0.1875, -0.1875, -0.1875, 0.25, 0.1875},
			{-0.3125, 0.25, -0.3125, -0.25, 0.3125, 0.3125},
			{0.25, 0.25, -0.3125, 0.3125, 0.3125, 0.3125},
			{-0.25, 0.25, -0.3125, 0.25, 0.3125, -0.25},
			{-0.25, 0.25, 0.25, 0.25, 0.3125, 0.3125},
			{-0.375, 0.3125, 0.3125, 0.375, 0.375, 0.375},
			{-0.375, 0.3125, -0.375, 0.375, 0.375, -0.3125},
			{0.3125, 0.3125, -0.3125, 0.375, 0.375, 0.3125},
			{-0.375, 0.3125, -0.3125, -0.3125, 0.375, 0.3125},
			{-0.4375, 0.375, -0.4375, -0.375, 0.4375, 0.4375},
			{0.375, 0.375, -0.4375, 0.4375, 0.4375, 0.4375},
			{-0.4375, 0.375, 0.375, 0.4375, 0.4375, 0.4375},
			{-0.375, 0.375, -0.4375, 0.375, 0.4375, -0.375},
			-- bottom (Y-)
			{-0.0625, -0.0625, -0.0625, 0.0625, -0, 0.0625},
			{0.0625, -0.125, -0.125, 0.125, -0.0625, 0.125},
			{-0.125, -0.125, -0.125, -0.0625, -0.0625, 0.125},
			{-0.0625, -0.125, -0.125, 0.0625, -0.0625, -0.0625},
			{-0.0625, -0.125, 0.0625, 0.0625, -0.0625, 0.125},
			{-0.1875, -0.1875, -0.1875, 0.1875, -0.125, -0.125},
			{-0.1875, -0.1875, 0.125, 0.1875, -0.125, 0.1875},
			{-0.1875, -0.1875, -0.125, -0.125, -0.125, 0.125},
			{0.125, -0.1875, -0.125, 0.1875, -0.125, 0.125},
			{-0.25, -0.25, -0.25, -0.1875, -0.1875, 0.25},
			{0.1875, -0.25, -0.25, 0.25, -0.1875, 0.25},
			{-0.1875, -0.25, -0.25, 0.1875, -0.1875, -0.1875},
			{-0.1875, -0.25, 0.1875, 0.1875, -0.1875, 0.25},
			{-0.3125, -0.3125, 0.25, 0.3125, -0.25, 0.3125},
			{-0.3125, -0.3125, -0.3125, 0.3125, -0.25, -0.25},
			{0.25, -0.3125, -0.25, 0.3125, -0.25, 0.25},
			{-0.3125, -0.3125, -0.25, -0.25, -0.25, 0.25},
			{-0.375, -0.375, -0.375, -0.3125, -0.3125, 0.375},
			{0.3125, -0.375, -0.375, 0.375, -0.3125, 0.375},
			{-0.3125, -0.375, -0.375, 0.3125, -0.3125, -0.3125},
			{-0.3125, -0.375, 0.3125, 0.3125, -0.3125, 0.375},
			{-0.4375, -0.4375, 0.375, 0.4375, -0.375, 0.4375},
			{-0.4375, -0.4375, -0.4375, 0.4375, -0.375, -0.375},
			{-0.4375, -0.4375, -0.4375, -0.375, -0.375, 0.4375},
			{0.375, -0.4375, -0.375, 0.4375, -0.375, 0.375},
			-- right (X+)
			{0, -0.0625, -0.0625, 0.0625, 0.0625, 0.0625},
			{0.0625, -0.125, -0.125, 0.125, 0.125, -0.0625},
			{0.0625, -0.125, 0.0625, 0.125, 0.125, 0.125},
			{0.0625, -0.125, -0.0625, 0.125, -0.0625, 0.0625},
			{0.0625, 0.0625, -0.0625, 0.125, 0.125, 0.0625},
			{0.125, -0.1875, -0.1875, 0.1875, -0.125, 0.1875},
			{0.125, 0.125, -0.1875, 0.1875, 0.1875, 0.1875},
			{0.125, -0.125, 0.125, 0.1875, 0.125, 0.1875},
			{0.125, -0.125, -0.1875, 0.1875, 0.125, -0.125},
			{0.1875, -0.25, 0.1875, 0.25, 0.25, 0.25},
			{0.1875, -0.25, -0.25, 0.25, 0.25, -0.1875},
			{0.1875, -0.25, -0.1875, 0.25, -0.1875, 0.1875},
			{0.1875, 0.1875, -0.1875, 0.25, 0.25, 0.1875},
			{0.25, 0.25, -0.3125, 0.3125, 0.3125, 0.3125},
			{0.25, -0.3125, -0.3125, 0.3125, -0.25, 0.3125},
			{0.25, -0.25, -0.3125, 0.3125, 0.25, -0.25},
			{0.25, -0.25, 0.25, 0.3125, 0.25, 0.3125},
			{0.3125, -0.375, 0.3125, 0.375, 0.375, 0.375},
			{0.3125, -0.375, -0.375, 0.375, 0.375, -0.3125},
			{0.3125, -0.375, -0.3125, 0.375, -0.3125, 0.3125},
			{0.3125, 0.3125, -0.3125, 0.375, 0.375, 0.3125},
			{0.375, 0.375, -0.4375, 0.4375, 0.4375, 0.4375},
			{0.375, -0.4375, -0.4375, 0.4375, -0.375, 0.4375},
			{0.375, -0.4375, 0.375, 0.4375, 0.4375, 0.4375},
			{0.375, -0.375, -0.4375, 0.4375, 0.375, -0.375},
			-- left (X-)
			{-0.0625, -0.0625, -0.0625, -0, 0.0625, 0.0625},
			{-0.125, -0.125, 0.0625, -0.0625, 0.125, 0.125},
			{-0.125, -0.125, -0.125, -0.0625, 0.125, -0.0625},
			{-0.125, -0.125, -0.0625, -0.0625, -0.0625, 0.0625},
			{-0.125, 0.0625, -0.0625, -0.0625, 0.125, 0.0625},
			{-0.1875, -0.1875, -0.1875, -0.125, -0.125, 0.1875},
			{-0.1875, 0.125, -0.1875, -0.125, 0.1875, 0.1875},
			{-0.1875, -0.125, -0.1875, -0.125, 0.125, -0.125},
			{-0.1875, -0.125, 0.125, -0.125, 0.125, 0.1875},
			{-0.25, -0.25, -0.25, -0.1875, 0.25, -0.1875},
			{-0.25, -0.25, 0.1875, -0.1875, 0.25, 0.25},
			{-0.25, -0.25, -0.1875, -0.1875, -0.1875, 0.1875},
			{-0.25, 0.1875, -0.1875, -0.1875, 0.25, 0.1875},
			{-0.3125, 0.25, -0.3125, -0.25, 0.3125, 0.3125},
			{-0.3125, -0.3125, -0.3125, -0.25, -0.25, 0.3125},
			{-0.3125, -0.25, 0.25, -0.25, 0.25, 0.3125},
			{-0.3125, -0.25, -0.3125, -0.25, 0.25, -0.25},
			{-0.375, -0.375, -0.375, -0.3125, 0.375, -0.3125},
			{-0.375, -0.375, 0.3125, -0.3125, 0.375, 0.375},
			{-0.375, -0.375, -0.3125, -0.3125, -0.3125, 0.3125},
			{-0.375, 0.3125, -0.3125, -0.3125, 0.375, 0.3125},
			{-0.4375, 0.375, -0.4375, -0.375, 0.4375, 0.4375},
			{-0.4375, -0.4375, -0.4375, -0.375, -0.375, 0.4375},
			{-0.4375, -0.4375, -0.4375, -0.375, 0.4375, -0.375},
			{-0.4375, -0.375, 0.375, -0.375, 0.375, 0.4375},
			-- back (Z+)
			{-0.0625, -0.0625, 0, 0.0625, 0.0625, 0.0625},
			{0.0625, -0.125, 0.0625, 0.125, 0.125, 0.125},
			{-0.125, -0.125, 0.0625, -0.0625, 0.125, 0.125},
			{-0.0625, -0.125, 0.0625, 0.0625, -0.0625, 0.125},
			{-0.0625, 0.0625, 0.0625, 0.0625, 0.125, 0.125},
			{-0.1875, -0.1875, 0.125, 0.1875, -0.125, 0.1875},
			{-0.1875, 0.125, 0.125, 0.1875, 0.1875, 0.1875},
			{-0.1875, -0.125, 0.125, -0.125, 0.125, 0.1875},
			{0.125, -0.125, 0.125, 0.1875, 0.125, 0.1875},
			{-0.25, -0.25, 0.1875, -0.1875, 0.25, 0.25},
			{0.1875, -0.25, 0.1875, 0.25, 0.25, 0.25},
			{-0.1875, -0.25, 0.1875, 0.1875, -0.1875, 0.25},
			{-0.1875, 0.1875, 0.1875, 0.1875, 0.25, 0.25},
			{-0.3125, 0.25, 0.25, 0.3125, 0.3125, 0.3125},
			{-0.3125, -0.3125, 0.25, 0.3125, -0.25, 0.3125},
			{0.25, -0.25, 0.25, 0.3125, 0.25, 0.3125},
			{-0.3125, -0.25, 0.25, -0.25, 0.25, 0.3125},
			{-0.375, -0.375, 0.3125, -0.3125, 0.375, 0.375},
			{0.3125, -0.375, 0.3125, 0.375, 0.375, 0.375},
			{-0.3125, -0.375, 0.3125, 0.3125, -0.3125, 0.375},
			{-0.3125, 0.3125, 0.3125, 0.3125, 0.375, 0.375},
			{-0.4375, 0.375, 0.375, 0.4375, 0.4375, 0.4375},
			{-0.4375, -0.4375, 0.375, 0.4375, -0.375, 0.4375},
			{-0.4375, -0.4375, 0.375, -0.375, 0.4375, 0.4375},
			{0.375, -0.375, 0.375, 0.4375, 0.375, 0.4375},
			-- front (Z-)
			{-0.0625, -0.0625, -0.0625, 0.0625, 0.0625, -0},
			{-0.125, -0.125, -0.125, -0.0625, 0.125, -0.0625},
			{0.0625, -0.125, -0.125, 0.125, 0.125, -0.0625},
			{-0.0625, -0.125, -0.125, 0.0625, -0.0625, -0.0625},
			{-0.0625, 0.0625, -0.125, 0.0625, 0.125, -0.0625},
			{-0.1875, -0.1875, -0.1875, 0.1875, -0.125, -0.125},
			{-0.1875, 0.125, -0.1875, 0.1875, 0.1875, -0.125},
			{0.125, -0.125, -0.1875, 0.1875, 0.125, -0.125},
			{-0.1875, -0.125, -0.1875, -0.125, 0.125, -0.125},
			{0.1875, -0.25, -0.25, 0.25, 0.25, -0.1875},
			{-0.25, -0.25, -0.25, -0.1875, 0.25, -0.1875},
			{-0.1875, -0.25, -0.25, 0.1875, -0.1875, -0.1875},
			{-0.1875, 0.1875, -0.25, 0.1875, 0.25, -0.1875},
			{-0.3125, 0.25, -0.3125, 0.3125, 0.3125, -0.25},
			{-0.3125, -0.3125, -0.3125, 0.3125, -0.25, -0.25},
			{-0.3125, -0.25, -0.3125, -0.25, 0.25, -0.25},
			{0.25, -0.25, -0.3125, 0.3125, 0.25, -0.25},
			{0.3125, -0.375, -0.375, 0.375, 0.375, -0.3125},
			{-0.375, -0.375, -0.375, -0.3125, 0.375, -0.3125},
			{-0.3125, -0.375, -0.375, 0.3125, -0.3125, -0.3125},
			{-0.3125, 0.3125, -0.375, 0.3125, 0.375, -0.3125},
			{-0.4375, 0.375, -0.4375, 0.4375, 0.4375, -0.375},
			{-0.4375, -0.4375, -0.4375, 0.4375, -0.375, -0.375},
			{0.375, -0.4375, -0.4375, 0.4375, 0.4375, -0.375},
			{-0.4375, -0.375, -0.4375, -0.375, 0.375, -0.375},
			-- corner frame
			{-0.4375, 0.4375, 0.4375, 0.4375, 0.5, 0.5},
			{-0.4375, -0.5, 0.4375, 0.4375, -0.4375, 0.5},
			{-0.5, -0.5, 0.4375, -0.4375, 0.5, 0.5},
			{0.4375, -0.5, 0.4375, 0.5, 0.5, 0.5},
			{-0.5, 0.4375, -0.4375, -0.4375, 0.5, 0.4375},
			{-0.5, -0.5, -0.4375, -0.4375, -0.4375, 0.4375},
			{0.4375, 0.4375, -0.4375, 0.5, 0.5, 0.4375},
			{0.4375, -0.5, -0.4375, 0.5, -0.4375, 0.4375},
			{-0.5, 0.4375, -0.5, 0.5, 0.5, -0.4375},
			{-0.5, -0.5, -0.5, 0.5, -0.4375, -0.4375},
			{0.4375, -0.4375, -0.5, 0.5, 0.4375, -0.4375},
			{-0.5, -0.4375, -0.5, -0.4375, 0.4375, -0.4375},
		},
	},
	selection_box = {
		type = "fixed",
		fixed = {
			{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
		},
	},
})


minetest.register_craft({
    output = "packed_things:compressed_"..name.."_9c",
    recipe = {
        {data.mat,      data.mat,           data.mat    },
            {data.mat,      data.mat,    data.mat    },
            {data.mat, data.mat, data.mat },
}
})

minetest.register_craft({
    output = "packed_things:double_compressed_"..name.."_81c",
    recipe = {
        {"packed_things:compressed_"..name.."_9c","packed_things:compressed_"..name.."_9c","packed_things:compressed_"..name.."_9c"},
{"packed_things:compressed_"..name.."_9c","packed_things:compressed_"..name.."_9c","packed_things:compressed_"..name.."_9c"},
{"packed_things:compressed_"..name.."_9c","packed_things:compressed_"..name.."_9c","packed_things:compressed_"..name.."_9c"},
}
})

minetest.register_craft({
    output = "packed_things:triple_compressed_"..name.."_729c",
    recipe = {
        {"packed_things:double_compressed_"..name.."_81c","packed_things:double_compressed_"..name.."_81c","packed_things:double_compressed_"..name.."_81c"},
{"packed_things:double_compressed_"..name.."_81c","packed_things:double_compressed_"..name.."_81c","packed_things:double_compressed_"..name.."_81c"},
{"packed_things:double_compressed_"..name.."_81c","packed_things:double_compressed_"..name.."_81c","packed_things:double_compressed_"..name.."_81c"},
}
})

minetest.register_craft({
    output = "packed_things:quadruple_compressed_"..name.."_6561c",
    recipe = {
        {"packed_things:triple_compressed_"..name.."_729c", "packed_things:triple_compressed_"..name.."_729c", "packed_things:triple_compressed_"..name.."_729c"},
        {"packed_things:triple_compressed_"..name.."_729c", "packed_things:triple_compressed_"..name.."_729c", "packed_things:triple_compressed_"..name.."_729c"},
        {"packed_things:triple_compressed_"..name.."_729c", "packed_things:triple_compressed_"..name.."_729c", "packed_things:triple_compressed_"..name.."_729c"},
    }
})
minetest.register_craft({
    output = "packed_things:quintuple_compressed_"..name.."_59049c",
    recipe = {
        {"packed_things:quadruple_compressed_"..name.."_6561c","packed_things:quadruple_compressed_"..name.."_6561c","packed_things:quadruple_compressed_"..name.."_6561c"},
            {"packed_things:quadruple_compressed_"..name.."_6561c","packed_things:quadruple_compressed_"..name.."_6561c","packed_things:quadruple_compressed_"..name.."_6561c"},
            {"packed_things:quadruple_compressed_"..name.."_6561c","packed_things:quadruple_compressed_"..name.."_6561c","packed_things:quadruple_compressed_"..name.."_6561c"},
}
})
minetest.register_craft({
    output = "packed_things:sextuple_compressed_"..name.."_531441c",
    recipe = {
        {"packed_things:quintuple_compressed_"..name.."_59049c","packed_things:quintuple_compressed_"..name.."_59049c","packed_things:quintuple_compressed_"..name.."_59049c"},
            {"packed_things:quintuple_compressed_"..name.."_59049c","packed_things:quintuple_compressed_"..name.."_59049c","packed_things:quintuple_compressed_"..name.."_59049c"},
            {"packed_things:quintuple_compressed_"..name.."_59049c","packed_things:quintuple_compressed_"..name.."_59049c","packed_things:quintuple_compressed_"..name.."_59049c"},
}
})
minetest.register_craft({
    output = "packed_things:septuple_compressed_"..name.."_4782969c",
    recipe = {
        {"packed_things:sextuple_compressed_"..name.."_531441c","packed_things:sextuple_compressed_"..name.."_531441c","packed_things:sextuple_compressed_"..name.."_531441c"},
            {"packed_things:sextuple_compressed_"..name.."_531441c","packed_things:sextuple_compressed_"..name.."_531441c","packed_things:sextuple_compressed_"..name.."_531441c"},
            {"packed_things:sextuple_compressed_"..name.."_531441c","packed_things:sextuple_compressed_"..name.."_531441c","packed_things:sextuple_compressed_"..name.."_531441c"},
}
})
minetest.register_craft({
    output = "packed_things:octuple_compressed_"..name.."_43046721c",
    recipe = {
        {"packed_things:septuple_compressed_"..name.."_4782969c","packed_things:septuple_compressed_"..name.."_4782969c","packed_things:septuple_compressed_"..name.."_4782969c"},
            {"packed_things:septuple_compressed_"..name.."_4782969c","packed_things:septuple_compressed_"..name.."_4782969c","packed_things:septuple_compressed_"..name.."_4782969c"},
            {"packed_things:septuple_compressed_"..name.."_4782969c","packed_things:septuple_compressed_"..name.."_4782969c","packed_things:septuple_compressed_"..name.."_4782969c"},
}
})
--uncompressed "..name.."
minetest.register_craft({
    output = ""..data.mat.." 9",
    recipe = {
        {"packed_things:compressed_"..name.."_9c","",""},
            {"","",""},
            {"","",""},
}
})
minetest.register_craft({
    output = "packed_things:compressed_"..name.."_9c 9",
    recipe = {
        {"packed_things:double_compressed_"..name.."_81c","",""},
            {"","",""},
            {"","",""},
}
})
minetest.register_craft({
    output = "packed_things:double_compressed_"..name.."_81c 9",
    recipe = {
        {"packed_things:triple_compressed_"..name.."_729c","",""},
            {"","",""},
            {"","",""},
}
})
minetest.register_craft({
    output = "packed_things:triple_compressed_"..name.."_729c 9",
    recipe = {
        {"packed_things:quadruple_compressed_"..name.."_6561c","",""},
            {"","",""},
            {"","",""},
}
})
minetest.register_craft({
    output = "packed_things:quadruple_compressed_"..name.."_6561c 9",
    recipe = {
        {"packed_things:quintuple_compressed_"..name.."_59049c","",""},
            {"","",""},
            {"","",""},
}
})
minetest.register_craft({
    output = "packed_things:quintuple_compressed_"..name.."_59049c 9",
    recipe = {
        {"packed_things:sextuple_compressed_"..name.."_531441c","",""},
            {"","",""},
            {"","",""},
}
})
minetest.register_craft({
    output = "packed_things:sextuple_compressed_"..name.."_531441c 9",
    recipe = {
        {"packed_things:septuple_compressed_"..name.."_4782969c","",""},
            {"","",""},
            {"","",""},
}
})
minetest.register_craft({
    output = "packed_things:septuple_compressed_"..name.."_4782969c 9",
    recipe = {
        {"packed_things:octuple_compressed_"..name.."_43046721c","",""},
            {"","",""},
            {"","",""},
}
})





end

this loop takes care of
1. adding all the nodes
2. compressing crafts aka the 9=1 and so forth
3. uncrafts 1=9 and so forth
4. all the nodes have cool descriptions like "octuple compressed cobble 43,046,721c"
5. all the max tier blocks (the octuple compressed ones) have a really cool node box look
6.no need to create new textures for each node this loop will automatically make the more compressed ones look darker each compressed node looks darker than the last
7. I have already changed the mod id to packed_things for yay so its super easy for you to copy paste and use
8. its super compact code
9. its insanely easy to add a new block just go to the top and copy

Code: Select all

    dirt = {
        mat = "default:dirt",
        tex = "default_dirt.png",
    },
then paste it

Code: Select all

    dirt = {
        mat = "default:dirt",
        tex = "default_dirt.png",
    },
    dirt = {
        mat = "default:dirt",
        tex = "default_dirt.png",
    },

then replace the
dirt = {
with
name of node not id(cobble not defaut:cobble) = {
replace the "default:dirt" with the id of the new block to be compressed and replace the "default_dirt.png" with the texture for the compressed blocks and bada bing bada boom you have just added a whole new set of compressed blocks with only 4 new lines of code it should look like this(using snow as an example)

Code: Select all

    dirt = {
        mat = "default:dirt",
        tex = "default_dirt.png",
    },
    snow = {
        mat = "default:snowblock",
        tex = "default_snow.png",
    },

hope this helps
;)