Minecraft Data Packs / Quality of Life

Racks - Expose your tools!

  • check_circle Functions
  • check_circle Recipes
  • 74,577 views, 117 today
  • 22,107 downloads, 33 today
  • 391
  • 448
  • 121
KawaMood's Avatar KawaMood
Level 74 : Legendary Programmer
650
Racks V.2.2.0
Expose your tools!

Your tools and weapons will no longer envy the armor stands.
From now on, they will also have their own exhibition space!

From MC 1.20 to 1.20.4 (See the Download section for older versions or snapshots)





Disclaimer: Recently, some malicious websites kept trying to steal my content without my consentement, without any credit, not even even sharing the original link. Please, avoid to download my data packs from those websites. They aren't fair and the version of my data packs they share may not be up to date.
I would highly recommend to always download them from planetminecraft.com or kawamood.com.

If you are a content creator / content aggregator and want to showcase or share this data pack elsewhere, please be sure to follow the "BY-NC-SA" rules mentioned in the "Licence" section below.





Features

What does the data pack brings?


  • Racks can be crafted using 2 Sticks and 3 planks.
  • Depending on the used planks, different looks of Racks can be created (no resource pack required).
  • This same block allows players to expose your tools and weapons by right clicking them.
  • Racks have two modes: they can be placed on the ground and hang up to 2 items, or on walls and hang a single item.
  • Sneaking while you right click them allow you to change the item rotation (or positioning, with some tools).

How to craft and use a Rack?


Racks can be crafted using 2 Sticks and 3 <planks>.
Planks to use depend on the desired look. You can use any planks.
The recipe is the following:

Racks - Expose your tools! Minecraft Data Pack

After you crafted it, you can then place down your Rack. You can either place it on the ground, allowing you to set up to two tool in it.
Or on a wall, allowing you to expose a single tool. In order to put a tool in it, you can simply right-click the Rack.
To retrieve the item, right-click it having your mainhand empty.

Racks placed on the ground can handle: axes, hoes, pickaxes, shovels, swords and fishing rod.
Racks placed on walls can handle: axes, hoes, pickaxes, shovels, swords, bow, crossbow, trident, fishing rod, shield, shears, brush, spyglass.

Right-clicking it while sneaking allow you to change items rotation. The ground mode has 6 different rotations, while the wall mode has 2 different orientation or item positioning.

I recommend you to see the tutorial video for better explanations and examples.

Misc. info about Racks:

  • In order to avoid to use many interaction entities, Racks interaction entities have a 1x1 block hitbox. It can be confusing when you try to click something that doesn't directly seem to be on the rack's hitbox. I recommend you to use F3+B to see the hitboxes when you try to manage things around them
  • Ground mode Racks have separated interaction entities for both tools, meaning you can focus the tool slot you want to update without the need of removing or adding a tool in the first slot.
  • If you wonder, of course, Racks support enchanted and custom items, and keep all their data. For tools modified with a resource pack, I can't guarantee the exhibition will show an adequate render. This depends on whether the creator of the resource pack changed the item's model or the texture's orientation, or kept them like the vanilla item.

Commands & General Settings


Give commands

If you want to directly get a Rack, you can give it to yourself with one of these commands.
/function pk_racks:cmd/give/oak
/function pk_racks:cmd/give/birch
/function pk_racks:cmd/give/spruce
/function pk_racks:cmd/give/dark_oak
/function pk_racks:cmd/give/acacia
/function pk_racks:cmd/give/jungle
/function pk_racks:cmd/give/mangrove
/function pk_racks:cmd/give/crimson
/function pk_racks:cmd/give/warped
/function pk_racks:cmd/give/bamboo
/function pk_racks:cmd/give/cherry

Blocks update (performances)

If you don't care about tracking blocks update, like for example, Racks on wall breaking automatically when there is no block support anymore behind them, you can chose to turn off the Racks blocks update with the following setting, where <value> can be 0 (disabled) or 1 (enabled):
/scoreboard players set $pk.racks.ignore_environment pk.value <value>

How to install & update?


If you are on a single player world, installing the data pack is enough.
Please refer to the Planet Minecraft tutorial to know how to install a data pack
: How to Install Minecraft Data Packs.

If you are on a server, please be sure to enable command blocks in the server.properties file.
Command blocks are actually used by this data pack to construct commands with dynamic arguments that can't be interpreted within a function.


Update from 1.19.4 (V.2.0.3) to 1.20 (>= V.2.1.0)

1. Since the process to detect custom dimension has been updated, Racks of custom dimensions need to be removed and placed back manually. This may also change again during other version, but this is unfortunately something I can't handle within an automatic process, since it would be risky.

2. if you are on a server, please be sure to enable command blocks in the server.properties file. Command blocks are actually used by this data pack to construct commands with dynamic arguments that can't be interpreted within a function.

3. Mojang updated the display rotation of display entities between both version, meaning some items in Racks may render wrongly.
In order to fix that, you can use this following command (note that it will only update Racks being in currently loaded area, you may use it several time):

/execute as @e[type=item_display,tag=pk.racks.rack.item] run data modify entity @s transformation merge value {right_rotation:[0f,1f,0f,0f]}

How to uninstall?


This data pack comes with an automatical uninstalation system.
Please use this command before removing the datapack from your datapacks folder:

/function pk_racks:base/uninstall/start
The uninstall process will:
  • Remove all Racks you or other players placed in your world, no matter the dimension (even custom ones).
  • Remove all relative scores and storage relative to the Racks Datapack.
  • Remove common scores and storage relative to all PauseKawa data packs, if the uninstall process detects that you don't have any PauseKawa data pack installed anymore.
When it's done, you can safely remove the data pack from your world's datapack folder.


F.A.Q.


Do I need to install a resources pack?
No, this data pack doesn't involve any resources pack.

When I place the block, it stays as a player head and doesn't place the actual Rack
Here are the potential reasons:
  • Please be sure you are on a version that supports the data pack. This data pack only work with 1.19.4 or greater versions, since this one introduced display entities. It won't work on 1.19.3 or lower version.
  • You are using an external tool like Spigot/Forge with a plugin/mod that may change the vanilla command, or the way data pack are executed. I would advice to create a fresh world with only this data pack, then progressively add other tools until it stops to work, you will then find the culprit.
  • If it used to work but suddenly stopped to work without anything having been changed on your server/client setup, you can try to run this command: /advancement revoke @s only pk_racks:interactions/placed_rack_placer

The texture of the item shows regular player heads, how can I fix that?

You need to be connected to the internet the first time you craft a new type of Rack. The textures of the player heads that are used to create their looks are indeed loaded and cached on the client-side, from (old or current) players skins that are stored on a Mojang server.

If you accidentally used a content that required to be online the first time you use it, and now see regular players heads instead of the expected texture, you can still go in the \AppData\Roaming\.minecraft\assets\skins folder, then sort the sub-folders by date, and delete some recent folders. Once that is done, if your game was already started, you will need to restart it to update the cached content.

Exceptional issue (1.20.2): Players heads can sometimes show default player skins (Steve & co.) rather than its actual texture although the whole cache folder are cleared. This is actually an issue from the game itself that struggle to load a texture depending on the Signature's value: https://bugs.mojang.com/browse/MC-264966. This issue will be fixed by itself on 1.21.

The data pack doesn't work correctly / I broke the block but still see it
You are probably either using plugins/mods that alter vanilla commands (like EssentialsX), or using a/some corrupted datapack(s) that block(s) the process of other datapacks according to the execution order of them.

Try to disable other suspicious datapacks or plugins that may affect the functioning of this one, then enable them back one by one until it stops to work, in order to find the guilty.

In a more general way, I really discourage to mix datapacks with mods or plugins. Datapacks aren't really compatible with externally modified versions of Minecraft, and unfortunately, some of plugins/mods author don't care about datapacks functioning. Paper/Forge itself might prevent some features to work correctly. Datapacks are usually dedicated to pure vanilla versions.

Uninstalling process seems unreliable, especially in custom dimensions
Unfortunately, this is due to a bug from Minecraft itself (MC-170764 / MC-143952)
I'm still trying to experiment new ways of implementing cross-dimension processes, but fact is it is impossible to directly and dynamically target custom dimensions from commands. So for the moment, we use forceloaded chunks with a single marker entity in each custom dimension to keep them reachable. Next tests may be based on chain concatenation implementing to work with them.

In order to remove the remaining entities in loaded areas, you can run this command:
/kill @e[tag=pk.racks.rack.component]


Download (for other versions)


V.2.2.0 For MC 1.20+: Download
(Old version) V.2.0.3 For MC 1.19.4: Download


Report an issue


Please read the F.A.Q. of the section above before asking.

Racks - Expose your tools! Minecraft Data Pack Preferably join our Discord Server and create a thread in the dedicated channel for data pack issues.
Otherwise, you can do it directly in the comments section.


License


This data packs is protected by the CC BY-NC-SA 4.0 license.

You're free to share and adapt this content under the following terms:
  • Attribution (BY) — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • NonCommercial (NC) — You may not use the material for commercial purposes.
  • ShareAlike (SA) — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.

Credits

CompatibilityMinecraft 1.19
toMinecraft 1.20
Tags

7 Update Logs

V.2.2.0 - 26 June 2023 : by KawaMood 06/26/2023 11:52:58 amJun 26th, 2023

Changes:
  • Added acacia, jungle, mangrove, crimson, warped, bamboo and cherry variants of Racks
  • Fishing Rod can now be placed on ground and wall racks, and Brush and Spyglass on wall Racks
LOAD MORE LOGS

Create an account or sign in to comment.

1
04/21/2024 3:35 am
Level 1 : New Miner
AMATSUMAGATSUCHI
AMATSUMAGATSUCHI's Avatar
Is it compatible with Ver.1.19.2?
If not, please respond.
1
04/22/2024 12:42 pmhistory
Level 74 : Legendary Programmer
KawaMood
KawaMood's Avatar
Hi, nope. Only from 1.19.4 (V.2.0.2) to 1.20.4 (current version).
It won't be compatible on 1.20.5 either since the whole system managing items data changed in the game. I would need to update it.
1
03/18/2024 1:28 pm
Level 1 : New Miner
CampSkee
CampSkee's Avatar
Any idea as to way the "New crafting recipe" in the top right keeps appearing with this?
1
03/18/2024 8:08 pm
Level 1 : New Miner
CampSkee
CampSkee's Avatar
Nevermind I found the fix.
Unlock all recipes datapack was spamming it over and over
1
03/18/2024 3:29 pmhistory
Level 74 : Legendary Programmer
KawaMood
KawaMood's Avatar
Hi, I presume you're talking about the fact you constantly get a "New Recipe Unlocked" for the knowledge book on the top-right corner of the screen. This is due to another data pack you're using, that unnecessarily grant them all to all players cyclically.

This is the case of the famous "Unlock All Recipes" data pack from VanillaTweaks, for example. And I suppose that it is the one you're using right now... I already talked about this issue to its author, and said he would fix that, but didn't yet. It was two years ago.
So I finally made my own alternative. You can remove VanillaTweak's one and install this data pack instead: PK_Unlock_All_Recipes_V.1.0.0_for_MC_1.20+.zip

Note that I plan to upgrade Racks to V.3, making it use the same standards as my other V.3 data packs.
It would be only compatible with MC 1.20.2 and more, but it will also use another trigger that doesn't use the "recipe unlocked" event, but the crafted one directly. So it would indirectly fix this problem.
2
03/14/2024 12:24 am
Level 1 : New Explorer
Axl-Lg
Axl-Lg's Avatar
No tenía mucha fe en este datapack, pero una vez lo coloqué en mi server todos buscaban tener una en sus casas :)
1
03/06/2024 5:24 am
Level 22 : Expert Engineer
CherubicBoot785
CherubicBoot785's Avatar
Hello! I've been using your datapacks for years now and I definitely love them! recently I'm using this datapack on my modded world, but it seems like I can't display my modded weapon, so I've been wondering if there's a way for me to allow some modded weapon to be displayed on the racks? ty in advance! ^^
1
03/06/2024 8:44 am
Level 74 : Legendary Programmer
KawaMood
KawaMood's Avatar
Hi, not directly, it would require to edit the data pack.
If they use custom models, you would need to edit the position of item display entities to make them match the racks slots, this is quite complex, it involves quaternions calculation. But if they are just basic models like swords, pickaxes, etc. you can just try to add their references in the relative predicates, located in pk_racks/predicates/hold/<model_type>.json
Though I don't know if predicates accept modded namespaces.
1
03/07/2024 10:17 amhistory
Level 22 : Expert Engineer
CherubicBoot785
CherubicBoot785's Avatar
the tools I wanted to add uses basic models, but what exactly should I add in pk_racks/predicates/hold/<model_type>.json ? should I make new file with the tool name (pk_racks/predicates/hold/moddedItem.json) or should I add the modded tools inside one of the already available files just like below?

pk_racks/predicates/hold/spyglass.json:
{
"condition": "minecraft:entity_properties", "entity": "this", "predicate": { "equipment": { "mainhand": { "items": ["minecraft:spyglass","modded:customspyglass"] } } }}
1
03/07/2024 10:24 am
Level 74 : Legendary Programmer
KawaMood
KawaMood's Avatar
You must use available ones, and place your own condition as a new entry inside an any_of parent.
Most of them already have it, spyglass is not a great example since it is a single item check.
If you want more technical support, it would be easier to join the discord server so I can help you on it more directly.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome