Faith Bias
📎 1 file 11,702 chars
📄
pasted-code-1792533313895.txt
txt 274 lines
▶
# Astralite — Minecraft Fabric Mod

Create a fully working Minecraft Java Edition Fabric mod called **Astralite** for Minecraft version **26.1.1**.

Astralite is a new armor and equipment tier stronger than vanilla Netherite. The mod must include custom textures, armor, tools, weapons, ore generation, crafting recipes, smelting, loot tables, and smithing upgrades.

## 1. Astralite Appearance

All Astralite equipment must follow a black-and-white space theme.

- Armor must be almost completely black.
- Add tiny white and silver dots across the armor to make it look like outer space filled with stars.
- Keep the design dark, clean, and recognizable as Minecraft armor.
- Give tools and weapons matching black-and-white textures.
- Use a consistent visual style for every Astralite item.
- Create actual Minecraft textures and models, not just concept art.

### Astralite Upgrade Template Texture

The Astralite Upgrade Smithing Template must look similar to the vanilla Netherite Upgrade Smithing Template, but with a unique Astralite appearance.

- Make the template predominantly black and dark charcoal gray.
- Add subtle darker and lighter pixel details.
- Put a clear white or light-gray upward-pointing arrow in the exact center.
- Use blocky Minecraft pixel art.
- Do not use cyan, blue, brown, gold, or colorful accents.
- Ensure the arrow stands out clearly against the black background.
- Create a working item texture suitable for Minecraft 26.1.1.

## 2. Astralite Durability

Implement these exact maximum durability values.

| Item | Durability |
|---|---:|
| Astralite Helmet | 700 |
| Astralite Chestplate | 850 |
| Astralite Leggings | 800 |
| Astralite Boots | 680 |
| Astralite Sword | 3072 |
| Astralite Spear | 3072 |
| Astralite Pickaxe | 6000 |
| Astralite Axe | 6000 |
| Astralite Shovel | 6000 |
| Astralite Hoe | 6000 |
| Astralite Bow | 2304 |
| Astralite Crossbow | 2790 |
| Astralite Shield | 1536 |
| Astralite Elytra | 2048 |
| Astralite Shears | 3072 |

These numbers are mandatory. Do not substitute different values.

## 3. Armor Strength

Astralite must be stronger than vanilla Netherite armor.

- Give Astralite armor better protection than Netherite.
- Give Astralite armor higher armor toughness than Netherite.
- Make the armor suitable for Survival Mode and Minecraft PvP.
- Keep the armor balanced so players are not completely invincible.
- Ensure armor pieces equip correctly and display their custom textures in first-person and third-person views.
- Ensure durability decreases correctly when armor takes damage.

## 4. Tools and Weapons — Faster and Stronger Than Netherite

Astralite equipment must be a clear improvement over Netherite in performance, mining speed, combat damage, and durability.

### Mining Tools

- **Pickaxe:** Significantly faster mining speed than Netherite and capable of mining all blocks Netherite can mine. Give it a higher mining level if supported.
- **Axe:** Faster chopping and higher attack damage than Netherite.
- **Shovel:** Faster digging than Netherite.
- **Hoe:** Better harvesting and mining performance than Netherite.
- Set the mining speed of every applicable tool higher than Netherite. Increasing durability alone is not enough.
- Ensure the tools can mine the same blocks as Netherite tools, plus any additional blocks supported by their higher mining level.

### Weapons

- **Sword:** Higher attack damage than Netherite with balanced attack speed.
- **Axe:** Higher attack damage than Netherite.
- **Spear:** Improved damage and combat performance compared with the corresponding vanilla weapon.
- **Bow:** Improved performance while retaining normal projectile functionality.
- **Crossbow:** Improved performance while retaining normal projectile functionality.
- **Shield:** Higher durability and reliable blocking.
- **Shears:** Improved durability and appropriate harvesting functionality.
- All weapons must function correctly in Survival Mode and PvP.

### Required Performance

- Astralite tools must visibly break blocks faster than Netherite tools when tested on the same blocks under the same conditions.
- Astralite weapons must deal more damage than their Netherite counterparts where applicable.
- Use actual item attributes and tool properties supported by Minecraft Fabric 26.1.1.
- Test the stats in-game whenever possible and correct any properties that fail to apply.
- Preserve every exact durability value specified in Section 2.

## 5. Astralite Ore Generation

Astralite Ore must be naturally obtainable **only in The End dimension, including the outer End Islands**.

- Generate Astralite Ore in End terrain and the outer End Islands.
- Never generate Astralite Ore in the Overworld or Nether.
- Make the ore rare so players must explore The End to collect it.
- Give it a custom black-and-white texture with a space-themed appearance.
- Make it mineable in Survival Mode using an appropriate high-tier pickaxe.
- Ensure the ore generates correctly in newly generated End chunks.
- Use world-generation systems compatible with Minecraft Fabric 26.1.1.

## 6. Smelting Astralite Ore

Astralite Ore must be processed in a **Blast Furnace**.

- Smelting Astralite Ore in a Blast Furnace produces Astralite Scrap.
- A regular Furnace must not smelt Astralite Ore.
- A Smoker must not smelt Astralite Ore.
- Set a reasonable smelting duration and experience reward.
- Register the recipe correctly for Minecraft 26.1.1.

## 7. Astralite Ingot Recipe

Astralite Scrap and Diamonds are used to craft Astralite Ingots.

Use a crafting table with this exact recipe:

| Slot | Slot | Slot |
|---|---|---|
| Astralite Scrap | Diamond | Empty |
| Diamond | Astralite Scrap | Empty |
| Astralite Scrap | Diamond | Empty |

This recipe uses exactly:
- 3 Astralite Scrap
- 3 Diamonds

The output must be **1 Astralite Ingot**.

- Implement the recipe exactly as shown.
- Make sure the recipe works in Survival Mode.
- Register the recipe using the correct item IDs.
- Astralite Ingots are required for upgrading Netherite equipment into Astralite equipment.

## 8. Astralite Upgrade Smithing Template

Create a custom item named **Astralite Upgrade Smithing Template**.

### Finding the Template

- The template must generate as loot in End Cities only.
- It must not generate in other structures.
- Make it rare enough that players need to explore End Cities.
- Add it to the appropriate End City loot tables.
- Ensure it can actually appear in generated End City chests.
- Keep the template available as a rare loot option even though it can also be crafted.

## 9. Crafting an Astralite Upgrade Template

Players must be able to craft the Astralite Upgrade Smithing Template without finding one first.

Use a crafting table with this layout:

| Slot | Slot | Slot |
|---|---|---|
| Empty | Empty | Empty |
| Empty | Astralite Ingot | Empty |
| Empty | End Stone | Empty |

Recipe requirements:

- 1 Astralite Ingot in the center slot.
- 1 End Stone directly below the Astralite Ingot.
- The remaining slots are empty.
- The recipe produces 1 Astralite Upgrade Smithing Template.

The recipe must work in Survival Mode. Players must not need a pre-existing template to craft the first one.

## 10. Duplicating the Astralite Upgrade Template

Players must be able to duplicate an existing Astralite Upgrade Smithing Template using a crafting table.

Use this exact 3×3 crafting layout:

| Slot | Slot | Slot |
|---|---|---|
| Diamond | Diamond | Diamond |
| Diamond | Astralite Template | Diamond |
| Empty | End Stone | Empty |

Recipe requirements:

- 1 Astralite Upgrade Smithing Template in the center.
- 5 Diamonds in the surrounding positions shown above.
- 1 End Stone directly beneath the template.
- The other two bottom corners must remain empty.
- The output must be 2 Astralite Upgrade Smithing Templates.

The original template is consumed by the recipe and returned as part of the output, giving the player one additional copy.

Ensure this recipe works correctly in Survival Mode and does not conflict with the separate template crafting recipe.

## 11. Netherite-to-Astralite Smithing Upgrades

Astralite is an upgrade from vanilla Netherite.

Use the Astralite Upgrade Smithing Template at a Smithing Table.

Each upgrade must require:

1. One Astralite Upgrade Smithing Template.
2. The corresponding Netherite armor piece, tool, or weapon where a vanilla Netherite version exists.
3. One Astralite Ingot.

The output must be the corresponding Astralite item.

Support the following upgrades where applicable:

- Netherite Helmet → Astralite Helmet
- Netherite Chestplate → Astralite Chestplate
- Netherite Leggings → Astralite Leggings
- Netherite Boots → Astralite Boots
- Netherite Sword → Astralite Sword
- Netherite Spear → Astralite Spear, if supported by the target version
- Netherite Pickaxe → Astralite Pickaxe
- Netherite Axe → Astralite Axe
- Netherite Shovel → Astralite Shovel
- Netherite Hoe → Astralite Hoe
- Netherite Bow → Astralite Bow, if a compatible base item exists
- Netherite Crossbow → Astralite Crossbow, if a compatible base item exists
- Netherite Shield → Astralite Shield, if a compatible base item exists
- Netherite Elytra → Astralite Elytra, if a compatible base item exists
- Netherite Shears → Astralite Shears, if a compatible base item exists

Important implementation details:

- Vanilla Minecraft does not have Netherite versions of every item listed above.
- For items without a vanilla Netherite version, provide a sensible crafting or upgrading recipe that requires Netherite materials and Astralite materials.
- Do not pretend that nonexistent vanilla items exist.
- Follow the correct smithing-template behavior for the target version.

## 12. Minecraft and Fabric Compatibility

The entire mod must target **Minecraft Java Edition 26.1.1 with Fabric**.

- Use Fabric Loader and Fabric API versions compatible with 26.1.1.
- Use the Java version required by Minecraft 26.1.1 and the chosen development environment.
- Do not use outdated Minecraft 1.21.11 APIs or code.
- Ensure all item registrations, recipes, loot tables, textures, models, and world-generation features work on the target version.
- Compatibility with other mods is allowed.
- Avoid duplicate item IDs.
- Do not overwrite or break vanilla Netherite items.
- Resolve compilation errors and dependency conflicts before delivery.

## 13. Final Deliverables

Provide:

- A complete working Fabric mod.
- An installable `.jar` compatible with the Modrinth Launcher.
- All Java source code and project files.
- All item and armor textures.
- All item models and armor models.
- Astralite Ore and its world-generation configuration.
- Blast Furnace smelting recipes.
- Astralite Scrap and Ingot crafting recipes.
- Astralite Upgrade Smithing Template texture and item registration.
- End City loot-table modifications.
- Template crafting and duplication recipes.
- Netherite-to-Astralite smithing recipes.
- Correct item durability and combat stats.

Compile the mod and test it on Minecraft Fabric 26.1.1 whenever possible.

Do not claim the mod is complete or tested unless it has actually been compiled and tested successfully. If any feature is unsupported by the current Minecraft APIs, explain the limitation and implement the closest working alternative.

The final result must be a functional Astralite mod that can be installed and played in Survival Mode using the Modrinth Launcher.
Kodari AI
KodariOct 20 at 10:02 pm 2
AstraliteMod
Creates a complete Fabric mod for Minecraft 26.1.1 adding Astralite, a black-and-white space-themed armor and equipment tier stronger than Netherite. Includes custom textures, 15 items with exact durability values, End-only ore generation, Blast Furnace smelting, crafting recipes for ingots and upgrade templates, End City loot integration, template duplication, and Netherite-to-Astralite smithing upgrades. All tools mine faster and weapons deal more damage than Netherite counterparts.
  1. Set up Astralite for Minecraft 26.2/Fabric with registrations and survival progression.

  2. Add ore generation, recipes, End City template loot, and Netherite upgrade paths.

  3. Add custom item, ore, tool, and armor textures/models with the specified durability and balanced stats.

  4. Package the complete source/resources; compilation and in-game testing can only be claimed if verified.

[Generation stopped]

Faith Bias

continute

Kodari AI
KodariOct 20 at 11:07 pm 70
  1. Scaffold the new Fabric 26.2 project and mod metadata.

  2. Add registrations and survival progression using verified 26.2 APIs.

  3. Add world generation, recipes, loot, and smithing upgrades.

  4. Add custom textures/models, then report what was and was not build-verified.

Added the Astralite Fabric project: item registrations, End-only ore generation, End City template loot, recipes, smithing upgrades, and item models.

  • Target: Minecraft 26.2 / Fabric, following this project’s required version—not the pasted spec’s 26.1.1.

  • Survival progression: Mine Astralite Ore in newly generated End terrain, including outer islands, with a diamond-tier pickaxe. Blast-furnace smelting yields scrap; the shaped recipe uses 3 scrap and 3 diamonds for an ingot.

  • Template: Craft one from an Astralite Ingot and End Stone, or find it in End City treasure chests. The duplication recipe returns 2 templates for 5 diamonds and End Stone.

  • Upgrades: Netherite armor, sword, spear, pickaxe, axe, shovel, and hoe use the template-and-ingot smithing recipe. Bow, crossbow, shield, Elytra, and shears have crafting recipes requiring their vanilla item, a Netherite Ingot, and an Astralite Ingot.

  • Durability: Registered with the specified values. Astralite tools use a higher mining speed than Netherite; armor has increased protection and toughness.

  • Limitations: Bow and crossbow keep vanilla projectile damage/charge behavior; the 26.2 item properties found in source provide no base projectile-damage setting. Texture generation stopped before every item and state had custom art, so some icons/states use vanilla textures; the worn Elytra also uses the vanilla wing asset.

I can’t claim this has compiled or been tested in-game. To build it in Kodari, click Compile in the desktop top bar (or ⋮ → Compile Project on phone), then click Compile in the build window. If it succeeds, download the build there or use the Download astralite.jar button in chat.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
107 1,206
src/main/java/com/kodari/astralite/Astralite.java
package com.kodari.astralite;

import java.util.List;
import java.util.Optional;
import java.util.function.Function;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.creativetab.v1.CreativeModeTabEvents;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.DamageTypeTags;
import net.minecraft.tags.ItemTags;
import net.minecraft.world.damagesource.DamageType;
import net.minecraft.world.item.AxeItem;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.BowItem;
import net.minecraft.world.item.CrossbowItem;
import net.minecraft.world.item.HoeItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.item.ShieldItem;
import net.minecraft.world.item.ShovelItem;
import net.minecraft.world.item.ShearsItem;
import net.minecraft.world.item.ToolMaterial;
import net.minecraft.world.item.component.BlocksAttacks;
import net.minecraft.world.item.component.ChargedProjectiles;
import net.minecraft.world.item.equipment.ArmorMaterial;
import net.minecraft.world.item.equipment.ArmorType;
import net.minecraft.world.item.equipment.EquipmentAsset;
import net.minecraft.world.item.equipment.EquipmentAssets;
import net.minecraft.world.item.equipment.Equippable;
import net.minecraft.world.level.block.entity.BannerPatternLayers;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.util.Unit;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.core.component.DataComponents;

public final class Astralite implements ModInitializer {
    public static final String MOD_ID = "astralite";

    private static final ResourceKey<EquipmentAsset> ASTRALITE_EQUIPMENT_ASSET = ResourceKey.create(
        EquipmentAssets.ROOT_ID,
        Identifier.fromNamespaceAndPath(MOD_ID, "astralite")
    );

    private static final ToolMaterial ASTRALITE_TOOLS = new ToolMaterial(
        BlockTags.INCORRECT_FOR_NETHERITE_TOOL,
        6000,
        15.0F,
        6.0F,
        20,
        ItemTags.NETHERITE_TOOL_MATERIALS
    );

    private static final ToolMaterial ASTRALITE_WEAPONS = new ToolMaterial(
        BlockTags.INCORRECT_FOR_NETHERITE_TOOL,
        3072,
        15.0F,
        6.0F,
        20,
        ItemTags.NETHERITE_TOOL_MATERIALS
    );

    private static final ArmorMaterial ASTRALITE_ARMOR = new ArmorMaterial(
        33,
        java.util.Map.of(
            ArmorType.HELMET, 4,
            ArmorType.CHESTPLATE, 9,
            ArmorType.LEGGINGS, 7,
            ArmorType.BOOTS, 4
        ),
        20,
        SoundEvents.ARMOR_EQUIP_NETHERITE,
        3.5F,
        0.15F,
        ItemTags.REPAIRS_NETHERITE_ARMOR,
        ASTRALITE_EQUIPMENT_ASSET
    );

    public static final Block ASTRALITE_ORE_BLOCK = registerBlock(
        "astralite_ore",
        BlockBehaviour.Properties.of().strength(5.0F, 9.0F).requiresCorrectToolForDrops()
    );
    public static final Item ASTRALITE_ORE_ITEM = register(
        "astralite_ore",
        properties -> new BlockItem(ASTRALITE_ORE_BLOCK, properties),
        new Item.Properties()
    );
    public static final Item ASTRALITE_SCRAP = register("astralite_scrap", new Item.Properties().fireResistant());
    public static final Item ASTRALITE_INGOT = register("astralite_ingot", new Item.Properties().fireResistant());
    public static final Item ASTRALITE_UPGRADE_SMITHING_TEMPLATE = register(
        "astralite_upgrade_smithing_template",
        new Item.Properties()
    );

    public static final Item ASTRALITE_HELMET = register(
        "astralite_helmet",
        new Item.Properties().humanoidArmor(ASTRALITE_ARMOR, ArmorType.HELMET).durability(700).fireResistant()
    );
    public static final Item ASTRALITE_CHESTPLATE = register(
        "astralite_chestplate",
        new Item.Properties().humanoidArmor(ASTRALITE_ARMOR, ArmorType.CHESTPLATE).durability(850).fireResistant()
    );
    public static final Item ASTRALITE_LEGGINGS = register(
        "astralite_leggings",
        new Item.Properties().humanoidArmor(ASTRALITE_ARMOR, ArmorType.LEGGINGS).durability(800).fireResistant()
    );
    public static final Item ASTRALITE_BOOTS = register(
        "astralite_boots",
        new Item.Properties().humanoidArmor(ASTRALITE_ARMOR, ArmorType.BOOTS).durability(680).fireResistant()
    );

    public static final Item ASTRALITE_SWORD = register(
        "astralite_sword",
        new Item.Properties().sword(ASTRALITE_WEAPONS, 3.0F, -2.4F).fireResistant()
    );
    public static final Item ASTRALITE_SPEAR = register(
        "astralite_spear",
        new Item.Properties().spear(ASTRALITE_WEAPONS, 1.15F, 1.35F, 0.4F, 2.5F, 9.0F, 5.5F, 5.1F, 8.75F, 4.6F).fireResistant()
    );
    public static final Item ASTRALITE_PICKAXE = register(
        "astralite_pickaxe",
        new Item.Properties().pickaxe(ASTRALITE_TOOLS, 1.0F, -2.8F).fireResistant()
    );
    public static final Item ASTRALITE_AXE = register(
        "astralite_axe",
        properties -> new AxeItem(ASTRALITE_TOOLS, 6.0F, -3.0F, properties),
        new Item.Properties().fireResistant()
    );
    public static final Item ASTRALITE_SHOVEL = register(
        "astralite_shovel",
        properties -> new ShovelItem(ASTRALITE_TOOLS, 1.5F, -3.0F, properties),
        new Item.Properties().fireResistant()
    );
    public static final Item ASTRALITE_HOE = register(
        "astralite_hoe",
        properties -> new HoeItem(ASTRALITE_TOOLS, -4.0F, 0.0F, properties),
        new Item.Properties().fireResistant()
    );

    public static final Item ASTRALITE_BOW = register(
        "astralite_bow",
        BowItem::new,
        new Item.Properties().durability(2304).enchantable(20).fireResistant()
    );
    public static final Item ASTRALITE_CROSSBOW = register(
        "astralite_crossbow",
        CrossbowItem::new,
        new Item.Properties()
            .stacksTo(1)
            .durability(2790)
            .component(DataComponents.CHARGED_PROJECTILES, ChargedProjectiles.EMPTY)
            .enchantable(20)
            .fireResistant()
    );
    public static final Item ASTRALITE_SHIELD = register(
        "astralite_shield",
        ShieldItem::new,
        new Item.Properties()
            .durability(1536)
            .component(DataComponents.BANNER_PATTERNS, BannerPatternLayers.EMPTY)
            .repairable(ItemTags.WOODEN_TOOL_MATERIALS)
            .equippableUnswappable(EquipmentSlot.OFFHAND)
            .delayedComponent(
                DataComponents.BLOCKS_ATTACKS,
                context -> new BlocksAttacks(
                    0.25F,
                    1.0F,
                    List.of(new BlocksAttacks.DamageReduction(90.0F, Optional.empty(), 0.0F, 1.0F)),
                    new BlocksAttacks.ItemDamageFunction(3.0F, 1.0F, 1.0F),
                    Optional.of(context.getOrThrow(DamageTypeTags.BYPASSES_SHIELD)),
                    Optional.of(SoundEvents.SHIELD_BLOCK),
                    Optional.of(SoundEvents.SHIELD_BREAK)
                )
            )
            .component(DataComponents.BREAK_SOUND, SoundEvents.SHIELD_BREAK)
            .fireResistant()
    );
    public static final Item ASTRALITE_ELYTRA = register(
        "astralite_elytra",
        new Item.Properties()
            .durability(2048)
            .fireResistant()
            .component(DataComponents.GLIDER, Unit.INSTANCE)
            .component(
                DataComponents.EQUIPPABLE,
                Equippable.builder(EquipmentSlot.CHEST)
                    .setEquipSound(SoundEvents.ARMOR_EQUIP_ELYTRA)
                    .setAsset(EquipmentAssets.ELYTRA)
                    .setDamageOnHurt(false)
                    .build()
            )
            .repairable(Items.PHANTOM_MEMBRANE)
    );
    public static final Item ASTRALITE_SHEARS = register(