ClayCache

Quick rating

ClayCache

No reviews yet

vanilla friendly mod that turns Minecraft's Decorated Pots from static decorative blocks into fully functional, physics based containers.

QoL & Tweaks
Mod Loaders
Forge
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
Latest Version
claycache-1.0.0_for_1.20.1.jar
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID

Resources

External Links

Source Issues Wiki Discord

About

Description

Features

Dynamic Storage

Decorated Pots now feature a 9-slot inventory (using a familiar Dispenser-style UI). You can pipe items in with hoppers, store your valuables, and hear a cute pop sound when opening them.

Shulker-Style Tooltips

Safely pick up a pot and hover over it in your inventory to see exactly what's inside, The tooltip displays a beautifully color-coded list of its applied sherds and the items stored within, just like a Shulker Box.

The Perfect Multiplayer Crate

Because they are incredibly cheap to craft, hold 9 stacks of items, and can be safely transported, Decorated Pots make fantastic, immersive crates for player trading and economies in multiplayer servers.

Custom Crafting & Swappable Sherds

Craft an "Unfired Decorated Pot" out of clay balls (arranged like a cauldron), then smelt or blast it. Want to decorate it? Place a naked pot in the center of a crafting table. The Top, Bottom, Left, and Right slots correspond to the faces of the pot, letting you choose exactly which face gets which sherd. Note: To remove a sherd, you have to shatter the pot! Don't worry, you are always guaranteed to get your exact sherds and equivalent bricks back.

Physics & Gravity

Decorated Pots now obey gravity just like Sand and Anvils. If a pot falls from too high, it will dynamically shatter upon impact, spilling its contents and sherds everywhere. If it lands safely, it preserves all its inventory and sherd data.

Interactive Shattering

Breaking a pot with a sword, axe, or pickaxe will shatter it instantly (just like vanilla). Want to move it safely? Break it with an empty hand, a Silk Touch tool, or in Creative mode to pick it up intact with all its items still inside.

Projectile Piercing

Arrows, tridents, and other projectiles will punch right through pots, shattering them on impact. Projectiles lose a percentage of their velocity as they pierce through, meaning a single arrow can punch through a whole row of pots before finally stopping.

Crush & Stomp Mechanics

Falling anvils will crush pots dynamically mid-air. Even better, if you (the player) fall from a high enough distance and land on a pot, your weight will crush it beneath your feet.

Flower Pot recipe

You might notice a random recipe for an "Unfired Flower Pot" in your recipe book. Right now the recipe is replaced like the Decorated Pots, i have plans for them, let me know if you want to add to those plans!

How to Use

Make sure you have Forge installed. Drop the .jar file into your mods folder.

  1. Craft an Unfired Decorated Pot using 7 Clay Balls in a U-shape (like a cauldron) in a crafting table.
  2. Smelt or Blast it to harden it.
  3. Place it down, right-click to open its inventory, and store your items.
  4. Apply sherds to it in a crafting table, or just use it as a storage crate!
  5. Shoot it with an arrow, drop it off a cliff, or smash it with a sword to get your items back! (or just right-click it again).

Compatibility

  • Modded Projectiles: The mod includes a highly configurable fragileProjectiles list. Things like Snowballs, Eggs, or modded tomatoes will safely bounce off pots instead of shattering them.

  • Optimization Mods: The custom item models and rendering techniques are explicitly designed to be 100% compatible with rendering overhauls like Embeddium, Rubidium, and Sodium. No invisible faces or texture stretching.

  • Inventory Tweaks: The pot's UI uses standard Forge SlotItemHandler mechanics, meaning it plays perfectly with inventory sorting mods (like MouseTweaks or Inventory Sorter) without duplicating or deleting items.

  • JEI Compatibility: Because applying sherds to a pot uses a dynamic custom recipe, Just Enough Items (JEI) wouldn't normally know how to display it. ClayCache includes a custom JEI plugin that perfectly demonstrates how the recipe works. When viewing recipes for a Decorated Pot or any Pottery Sherd, JEI will display a 3x3 grid that dynamically cycles through every sherd loaded in your game (including modded ones!), with the output pot updating its NBT in real-time to match!


Technicals

This mod tackles some dynamic block-to-entity swapping, persistent NBT across state changes, and custom physics interactions. Here's a look under the hood:

The Inventory System (DecoratedPotInventoryProvider.java & ModCapabilities.java):

Instead of hardcoding a custom BlockEntity, the mod subscribes to Forge's AttachCapabilitiesEvent. When a vanilla DecoratedPotBlockEntity is placed, my own ICapabilityProvider is attached, exposing an IItemHandler (a 9-slot ItemStackHandler). This ensures 100% compatibility with vanilla hoppers, modded pipes, and automation systems.

Block-to-Entity Swapping (FallingDecoratedPotBlock.java & CustomFallingBlockEntity.java):

When a pot needs to fall, I can't just use vanilla's FallingBlockEntity because it drops BlockEntity NBT data. Instead, I intercept the fall, serialize the pot's capability data and sherd decorations into a CompoundTag, and inject it into a CustomFallingBlockEntity. When the entity lands safely, it re-places the vanilla pot block and deserializes the NBT back into it.

The Rendering Magic (CustomFallingBlockRenderer.java):

Rendering a falling block that has complex BlockEntity data (like 4 different pottery sherds) is kinda a hassle. The solution was keeping a "dummy" DecoratedPotBlockEntity inside the custom EntityRenderer. Every frame, we feed the falling entity's NBT data into this dummy pot, apply the correct Y-axis rotation math to match its blockstate facing direction, and pass it to the vanilla DecoratedPotRenderer.

Physics & Mixins (FallingBlockEntityMixin.java & WorldInteractionEvents.java):

  • Anvil Crushing: A Mixin into FallingBlockEntity#tick projects the Anvil's AABB downward along its DeltaMovement vector. If the math detects the anvil will intersect a pot during that exact tick, it shatters the pot dynamically before the anvil even registers a collision.
  • Arrow Piercing: When a projectile hits a pot, we cancel the impact event, reduce the projectile's velocity, and force a server-to-client impulse sync. Crucially, we predictively remove the pot on the client-side (level.removeBlock(pos, false)) to prevent the arrow from stuttering against a "ghost block" while waiting for the server's block-break packet.
  • The Loot Context Hack (ShatterCache.java & PotInventoryModifier.java): Forge's loot context occasionally loses BlockEntity capability data after a block is destroyed (especially during explosions). To guarantee items drop safely, we use a ConcurrentHashMap keyed by BlockPos.asLong() to temporarily cache the inventory NBT the moment the block breaks. A Global Loot Modifier (GLM) intercepts the drop generation, retrieves the NBT from the cache, and injects the items into the world. The cache is safely flushed at the end of every ServerTickEvent to prevent memory leaks.

Screenshots

Gallery

  • ezgif-52776cc7582fd923.gif
    ezgif-52776cc7582fd923.gif pot inventory
  • pottooltip.jpg
    pottooltip.jpg pottooltip.jpg
  • ezgif-589c33df3142acc8.gif
    ezgif-589c33df3142acc8.gif projectiles pierce through pots
  • ezgif-443cd447e64e98c9.gif
    ezgif-443cd447e64e98c9.gif pots shatter each other on impact, and so do you
  • Screenshot 2026-06-13 020731.jpg
    Screenshot 2026-06-13 020731.jpg Screenshot 2026-06-13 020731.jpg
  • Screenshot 2026-06-13 020921.jpg
    Screenshot 2026-06-13 020921.jpg Screenshot 2026-06-13 020921.jpg
  • Screenshot 2026-06-13 020921.jpg
    Screenshot 2026-06-13 020921.jpg Screenshot 2026-06-13 020921.jpg
  • ezgif-5936b8cc705cdae7.gif
    ezgif-5936b8cc705cdae7.gif snowball and egg no work
  • ezgif-520ca2952f5dc972.gif
    ezgif-520ca2952f5dc972.gif ezgif-520ca2952f5dc972.gif

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works