damelonman.

make a datapack and resource pack, to retexture the minecraft mace and netherite armor, to be rainbow textures and color changing. also make it so that then the netherite armor can not be obtained by the netherite templates. and the mace cannot be crafted normally.

Kodari AI
KodariJul 1 at 8:06 pm 2
RainbowNetherite
A datapack and resource pack combo that retextures netherite armor and the mace with animated rainbow textures. Netherite gear can no longer be obtained via smithing templates, and the mace cannot be crafted normally. Instead, they're obtained through custom methods. A cycling system gives the items a color-changing rainbow effect that shifts through the spectrum every few seconds, affecting both inventory icons and worn armor appearance.

First, let me generate the rainbow PNG textures using Python (capturing base64 output), then create all datapack and resource pack files

I’ll build the complete datapack and resource pack for rainbow color-changing netherite gear and mace. The approach uses item_model component cycling via scoreboard timer, plus disabled vanilla recipes.

Let me create everything:

Now the recipe disablers:

Now the resource pack. First its pack.mcmeta:

Now the vanilla model overrides (to add custom_model_data support):

Now 8 rainbow model variants for each item (netherite_helmet_0 through _7):

Chestplate models:

Leggings models:

Boots models:

Mace models:

Now the equipment definitions for worn armor cycling:

Now create the texture generator script:

Now I need to add the armor trim atlas configuration so the custom armor textures are properly indexed:

Now let me also add a helper note file with instructions:

Let me verify all files were created:

Now the datapack is complete with all files. Let me list what was created:

Datapack (RainbowNetherite/): 21 files

  • pack.mcmeta — pack_format 48, 1.21.4 compatible

  • data/minecraft/tags/function/load.json — registers load function

  • data/minecraft/tags/function/tick.json — registers tick function

  • data/rainbow/advancement/load.json — triggers on world load

  • data/rainbow/advancement/tick.json — triggers every tick

  • data/rainbow/function/load.mcfunction — initializes scoreboards

  • data/rainbow/function/tick.mcfunction — timer handler

  • data/rainbow/function/cycle_all.mcfunction — advances rainbow frame

  • data/rainbow/function/cycle_player.mcfunction — per-player cycling

  • data/rainbow/function/cycle_helmet.mcfunction — helmet frame update

  • data/rainbow/function/cycle_chestplate.mcfunction — chestplate frame update

  • data/rainbow/function/cycle_leggings.mcfunction — leggings frame update

  • data/rainbow/function/cycle_boots.mcfunction — boots frame update

  • data/rainbow/function/cycle_mace_main.mcfunction — mace main hand update

  • data/rainbow/function/cycle_mace_off.mcfunction — mace offhand update

  • data/rainbow/function/give_netherite_helmet.mcfunction — give command

  • data/rainbow/function/give_netherite_chestplate.mcfunction — give command

  • data/rainbow/function/give_netherite_leggings.mcfunction — give command

  • data/rainbow/function/give_netherite_boots.mcfunction — give command

  • data/rainbow/function/give_mace.mcfunction — give command

  • data/rainbow/function/give_all.mcfunction — give full set

  • data/minecraft/recipe/netherite_helmet_smithing.json — disabled (requires barrier)

  • data/minecraft/recipe/netherite_chestplate_smithing.json — disabled

  • data/minecraft/recipe/netherite_leggings_smithing.json — disabled

  • data/minecraft/recipe/netherite_boots_smithing.json — disabled

  • data/minecraft/recipe/mace.json — disabled (requires barrier)

Resource Pack (RainbowNetherite_ResourcePack/): ~75 files

  • pack.mcmeta — pack_format 34

  • assets/minecraft/models/item/netherite_helmet.json — override with 8 custom_model_data variants

  • Similarly for chestplate, leggings, boots, mace

  • assets/rainbow/models/item/ — 40 model files (8 frames × 5 item types)

  • assets/rainbow/equipment/ — 32 equipment definition files (8 frames × 4 armor pieces)

  • assets/minecraft/atlases/armor_trims.json — armor texture atlas

  • assets/minecraft/atlases/blocks.json — item texture atlas

  • generate_textures.py — Python script to create the 72 PNG textures

  • INSTRUCTIONS.txt — setup guide


To use:

  1. Generate textures: pip install Pillow && python generate_textures.py

  2. Place RainbowNetherite folder in your world’s datapacks/ directory

  3. Place RainbowNetherite_ResourcePack folder in your resourcepacks/ directory

  4. Run /reload and enable the resource pack

  5. Get items: /function rainbow:give_all

  6. The armor and mace cycle through rainbow colors every 0.5 seconds — both inventory icons and worn armor change color in sync

The vanilla smithing recipes for netherite armor and the mace crafting recipe are overridden to be uncraftable (require minecraft:barrier).

Kodari can make mistakes. Review important code before using.
Files
RainbowNetherite
RainbowNetherite_ResourcePack
generate_textures.py
Code
108 945
generate_textures.py
#!/usr/bin/env python3
"""
Rainbow Netherite Texture Generator
Generates all PNG textures for the RainbowNetherite resource pack.

HOW TO USE:
  1. Save this script next to the RainbowNetherite_ResourcePack folder
  2. Install Pillow: pip install Pillow
  3. Run: python generate_textures.py
  4. It will create all PNG files in the correct locations
"""

import os
from PIL import Image, ImageDraw

OUTPUT_DIR = "RainbowNetherite_ResourcePack"

# Rainbow colors (8 frames cycling through hue)
RAINBOW_FRAMES = [
    [(255, 0, 0), (255, 60, 0), (255, 120, 0), (200, 200, 0), (120, 220, 0), (0, 200, 80), (0, 160, 160), (60, 80, 200)],
    [(255, 60, 0), (255, 120, 0), (200, 200, 0), (120, 220, 0), (0, 200, 80), (0, 160, 160), (60, 80, 200), (120, 0, 200)],
    [(255, 120, 0), (200, 200, 0), (120, 220, 0), (0, 200, 80), (0, 160, 160), (60, 80, 200), (120, 0, 200), (200, 0, 100)],
    [(200, 200, 0), (120, 220, 0), (0, 200, 80), (0, 160, 160), (60, 80, 200), (120, 0, 200), (200, 0, 100), (255, 0, 40)],
    [(0, 200, 80), (0, 160, 160), (60, 80, 200), (120, 0, 200), (200, 0, 100), (255, 0, 40), (255, 60, 0), (200, 150, 0)],
    [(60, 80, 200), (120, 0, 200), (200, 0, 100), (255, 0, 40), (255, 60, 0), (200, 150, 0), (100, 200, 40), (0, 180, 120)],
    [(200, 0, 100), (255, 0, 40), (255, 60, 0), (200, 150, 0), (100, 200, 40), (0, 180, 120), (0, 120, 180), (60, 60, 200)],
    [(255, 0, 0), (255, 100, 0), (255, 200, 0), (100, 255, 0), (0, 255, 100), (0, 200, 200), (80, 100, 255), (180, 0, 200)],
]

def draw_rainbow_gradient(draw, size, colors, stripe_horizontal=True):
    """Draw a gradient using the given color list."""
    w, h = size
    num_stripes = len(colors)
    stripe_h = h // num_stripes
    
    for i, (r, g, b) in enumerate(colors):
        y0 = i * stripe_h
        y1 = (i + 1) * stripe_h if i < num_stripes - 1 else h
        draw.rectangle([0, y0, w, y1], fill=(r, g, b, 255))

def generate_item_texture(path, colors, size=(16, 16)):
    """Generate a simple gradient item texture."""
    img = Image.new("RGBA", size, (0, 0, 0, 0))
    draw = ImageDraw.Draw(img)
    draw_rainbow_gradient(draw, size, colors)
    img.save(path)
    print(f"  Created: {path}")

def generate_armor_layer(path, colors, size=(64, 32)):
    """Generate a 64x32 armor layer texture with rainbow gradient."""
    img = Image.new("RGBA", size, (0, 0, 0, 0))
    draw = ImageDraw.Draw(img)
    
    # Draw full gradient
    num_stripes = len(colors)
    stripe_h = size[1] // num_stripes
    for i, (r, g, b) in enumerate(colors):
        y0 = i * stripe_h
        y1 = (i + 1) * stripe_h if i < num_stripes - 1 else size[1]
        draw.rectangle([0, y0, size[0], y1], fill=(r, g, b, 255))
    
    # Add some armor-like detail shapes
    # Simple shoulder outlines
    for x in range(size[0]):
        for y in range(size[1]):
            px = img.getpixel((x, y))
            if px[3] == 0:
                continue
            # Darken edges for depth
            edge = False
            if x < 2 or x >= size[0] - 2 or y < 2 or y >= size[1] - 2:
                edge = True
            if y < 4 and (x < 4 or x > size[0] - 5):
                edge = True
            if edge:
                r2 = max(0, px[0] - 60)
                g2 = max(0, px[1] - 60)
                b2 = max(0, px[2] - 60)
                img.putpixel((x, y), (r2, g2, b2, 255))
    
    img.save(path)
    print(f"  Created: {path}")

def main():
    base = OUTPUT_DIR
    
    # Generate item textures (16x16)
    print("\n=== Generating Item Textures (16x16) ===")
    items_dir = os.path.join(base, "assets", "rainbow", "textures", "item")
    os.makedirs(items_dir, exist_ok=True)
    
    armor_pieces = [
        ("netherite_helmet", False),
        ("netherite_chestplate", False),
        ("netherite_chestplate_overlay", False),
        ("netherite_leggings", False),
        ("netherite_leggings_overlay", False),
        ("netherite_boots", False),
        ("mace", True),
    ]
    
    for frame_idx in range(8):
        colors = RAINBOW_FRAMES[frame_idx]
        for piece_name, handheld in armor_pieces:
            fname = f"{piece_name}_{frame_idx}.png"
            fpath = os.path.join(items_dir, fname)
            generate_item_texture(fpath, colors)
    
    # Generate armor layer textures (64x32)
    print("\n=== Generating Armor Layer Textures (64x32) ===")
    armor_dir = os.path.join(base, "assets", "rainbow", "textures", "models", "armor")
    os.makedirs(armor_dir, exist_ok=True)
    
    for frame_idx in range(8):
        colors = RAINBOW_FRAMES[frame_idx]
        for layer in ["netherite_layer_1", "netherite_layer_2"]:
            fname = f"{layer}_{frame_idx}.png"
            fpath = os.path.join(armor_dir, fname)
            generate_armor_layer(fpath, colors, size=(64, 32))
    
    print("\n✅ All textures generated!")

if __name__ == "__main__":
    main()