misha77498

Make a craft of coal pickaxe, where instead wood and etc. Uses coal, pickaxe looks like any pickaxe but with coal thing, and when you punch stone then gets 3 stages of coaling, 1 stage:stone have dark particles around it. 2 stage:coal ore. 3 stage:coal block, and after drops 15-30 coal, all tooks 45 minutes of real time

Kodari AI
KodariJun 24 at 2:21 pm 18
CoalPickaxeMod
A Fabric 1.20.4 mod adding the Coal Pickaxe — crafted with coal and sticks. When used to punch stone, it initiates a real-time coaling process: Stage 1 (0–15 min) spawns dark smoke particles around the block, Stage 2 (15–30 min) transforms it into coal ore, Stage 3 (30–45 min) converts it to a coal block, which then shatters and drops 15–30 coal. Multiple blocks can be coaled simultaneously.

Plan:

  1. build.gradle / settings.gradle / gradle.properties — build setup

  2. fabric.mod.json — mod metadata

  3. CoalPickaxeMod.java — initializer + item registration

  4. CoalPickaxeItem.java — item with coal ToolMaterial

  5. CoalBlockManager.java — stage tracking, tick handler, particles

  6. Resources: recipe, item model, lang



Here’s what was built:

Recipe — 3 coal across the top + 2 sticks down the middle (standard pickaxe shape, coal instead of material).

Coaling Process — triggered by left-clicking (attacking) any stone-type block while holding the Coal Pickaxe:

Time
Stage
Effect
0–15 min
1
Dark
LARGE_SMOKE
particles pulse around the block every second
15–30 min
2
Block replaces itself with Coal Ore
30–45 min
3
Block replaces itself with Coal Block
45 min
✓
Block shatters, drops
15–30 individual coal items

Safety — if the block is broken or moved before the process completes, the entry is silently discarded. Multiple blocks can be coaled simultaneously. You’ll need to add a coal_pickaxe.png texture to assets/coalmod/textures/item/ to replace the missing-texture placeholder.

misha77498

The compilation failed with this error:

code
Compilation failed with 6 error(s):

ERROR in src/main/java/com/coalmod/CoalPickaxeItem.java at line 4: cannot find symbol
import net.minecraft.item.Ingredient;
                         ^
  symbol: class Ingredient
  location: package net.minecraft.item

ERROR in src/main/java/com/coalmod/CoalPickaxeItem.java at line 39: cannot find symbol
        public Ingredient getRepairIngredient() {
               ^
  symbol: class Ingredient

ERROR in src/main/java/com/coalmod/CoalPickaxeItem.java at line 40: cannot find symbol
            return Ingredient.ofItems(Items.COAL);
                   ^
  symbol: variable Ingredient

ERROR in   src/main/java/com/coalmod/CoalPickaxeItem.java at line 4: cannot find symbol
  import net.minecraft.item.Ingredient;
                           ^
  symbol: class Ingredient
  location: package net.minecraft.item

ERROR in   src/main/java/com/coalmod/CoalPickaxeItem.java at line 39: cannot find symbol
          public Ingredient getRepairIngredient() {
                 ^
  symbol: class Ingredient

ERROR in   src/main/java/com/coalmod/CoalPickaxeItem.java at line 40: cannot find symbol
              return Ingredient.ofItems(Items.COAL);
                     ^
  symbol: variable Ingredient


=== COMPILATION ERROR ANALYSIS ===

MISSING CLASSES:
  - Ingredient
ACTION: Create these classes or check imports

FILES TO INVESTIGATE:
  - src/main/java/com/coalmod/CoalPickaxeItem.java
  -   src/main/java/com/coalmod/CoalPickaxeItem.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariJun 24 at 2:22 pm 2

Ingredient lives in net.minecraft.recipe, not net.minecraft.item in 1.20.4. Fixed.

misha77498

Rebuild

Kodari AI
KodariJun 24 at 2:23 pm 4

Everything looks correct. The Ingredient import was already fixed to net.minecraft.recipe.Ingredient. Let me check the remaining resource files and verify there are no other issues:

All files are correct and consistent. The Ingredient import fix is already in place (net.minecraft.recipe.Ingredient). The project structure is complete — trigger a rebuild from your IDE or with ./gradlew build and it should compile cleanly.

misha77498

Add buton of build again

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
10 343
src/main/java/com/coalmod/CoalPickaxeMod.java
package com.coalmod;

import net.fabricmc.api.ModInitializer;
import net.minecraft.item.Item;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;

public class CoalPickaxeMod implements ModInitializer {

    public static final String MOD_ID = "coalmod";

    public static final CoalPickaxeItem COAL_PICKAXE = new CoalPickaxeItem(new Item.Settings());

    @Override
    public void onInitialize() {
        Registry.register(Registries.ITEM, new Identifier(MOD_ID, "coal_pickaxe"), COAL_PICKAXE);
        CoalBlockManager.register();
    }
}