• check_circle Advancements
  • check_circle Functions
  • 5,223 views, 3 today
  • 316 downloads, 0 today
  • 9
  • 10
  • 5
BVengo's Avatar BVengo
Level 38 : Artisan Engineer
8
Ore Compressor

This datapack will automatically compress ores and precious metals into their most condensed forms.

To enable compression, you must have a piece of paper in your inventory labelled compress. This requirement has been included in an attempt to guarantee that items will only be condensed when you need them to be, and to minimise unnecessary function calls. Additionally, there must be an incomplete stack of the compressed item *or* an empty slot in your inventory to guarantee space for the items.

Please note that it will only compress the metals that have a reversible recipe. This means that nether quartz and amethyst shards won't be compressed.


For a list of all the items that can be compressed, check out my GitHub repository.



Installation / Removal
To install the datapack, simply drag the downloaded zip file into the datapack folder of your world.

To uninstall, type /function ore_compressor:uninstall. This will remove all scoreboard values related to the datapack. Then remove the zip file from the datapacks folder and reload the world.
CompatibilityMinecraft 1.18
toMinecraft 1.19
Tags

2 Update Logs

1.19 v1.0 : by BVengo 06/06/2022 9:04:15 pmJun 6th, 2022

Updated to 1.19!
LOAD MORE LOGS

Create an account or sign in to comment.

1
07/04/2023 12:32 am
Level 1 : New Miner
User4666306G
User4666306G's Avatar
Any Chance of an update for this to add bamboo to be compressable? be a lot quicker to get bamboo into bamboo blocks. Love this datapack hope an update comes!
2
07/06/2023 10:20 pmhistory
Level 38 : Artisan Engineer
BVengo
BVengo's Avatar
Glad you love the datapack :) I'm afraid this feature won't be added, primarily because the goal is to only use reversible crafting recipes (e.g. 1 ingot -> 9 nuggets, and 9 nuggets -> 1 ingot). Bamboo to bamboo blocks is a one way recipe (although I'm not sure why!). However, I've outlined the steps to add this new compression below - you can do this for any other features you want too! Note that you'll need to expand my comment to see all of it.

Edit this file: ore-compressor/pack/data/ore_compressor/functions/check_compressible.mc_function
execute as @s run function ore_compressor:try_compress/bamboo

Create this file, and edit: ore-compressor/pack/data/ore_compressor/functions/try_compress/bamboo.mcfunction
execute store result score @s oc_item_count_1 run clear @s minecraft:bamboo 0
execute store result score @s oc_item_count_2 run clear @s minecraft:bamboo_block 0
execute if entity @s[​scores={oc_item_count_1=9..}] run function ore_compressor:check_space
execute if entity @s[​scores={oc_success=1}] run function ore_compressor:compress/bamboo

Create this file, and edit: ore-compressor/pack/data/ore_compressor/functions/compress/bamboo.mcfunction
execute run clear @s minecraft:bamboo 9
execute run give @s minecraft:bamboo_block 1
scoreboard players set @s oc_success 0
execute run function ore_compressor:try_compress/bamboo
1
07/11/2023 1:03 am
Level 1 : New Miner
User4666306G
User4666306G's Avatar
thank you so much for the reply!!! if i knew anything about how to add these things i would but i am a filthy casual who knows nothing about making data packs themselves you make it sound so easy :'(
1
07/29/2022 5:20 pm
Level 1 : New Miner
Ti0n42
Ti0n42's Avatar
Is it possible to modify the data, so that it starts to compress at 10 items so 1 is left over?
1
07/30/2022 4:05 am
Level 38 : Artisan Engineer
BVengo
BVengo's Avatar
It's certainly possible! I don't want to change the base version that I'm distributing, so I'll just let you know how to do it yourself.

Inside the datapack, go to the folder data/ore_compressor/functions/try_compress. There is a file for every item that can be compressed. For each of those files, change the following line:

execute if entity @s[scores={oc_item_count_1=9..}] run function ore_compressor:check_space

to

execute if entity @s[scores={oc_item_count_1=10..}] run function ore_compressor:check_space

Basically, change 9 to 10 :)
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome