tjark427

make a mod where a disaster randomly spawns like tornado that has big smoke flying around going up like a normal tornado let tornado grab blocks and players and mobs make a second disaster that meteor fall from sky and exploding

Kodari AI
KodariMay 12 at 11:17 pm 9,922 (v2)

I’ll create a natural disasters mod with tornadoes and meteors.

NaturalDisasters
A dynamic disaster mod that spawns random catastrophic events in your world. Features powerful tornadoes with realistic smoke effects that pull blocks, players, and mobs into a swirling vortex, and devastating meteors that fall from the sky with explosive impacts. Each disaster creates unique environmental destruction and challenges for survival gameplay.

Created Natural Disasters mod with tornadoes that spawn spiraling smoke effects, pull entities and break blocks, plus meteors that fall with fire trails and create explosive impacts on the ground.

tjark427

The compilation failed with this error:

code
FAILURE: Build failed with an exception.

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

Kodari AI
KodariMay 12 at 11:19 pm 10,370 (v2)

I’ll read the existing files to diagnose the build failure.

The build is failing because of missing Gradle wrapper files and the icon reference. I’ll fix this by creating all necessary files and removing the missing icon reference.

Fixed the build issues by:

  1. Removed the missing icon reference from fabric.mod.json

  2. Added Gradle wrapper files (gradlew, gradlew.bat, gradle-wrapper.properties)

The mod should now compile successfully. It features tornadoes with spiraling smoke particles that pull entities upward and break blocks, plus meteors that fall with fire trails and explode on impact.

tjark427

FAILURE: Build failed with an exception.

Kodari AI
KodariMay 12 at 11:20 pm 17,695 (v2)

I see the issue - in Minecraft 1.20.4, the initDataTracker method uses just DataTracker parameter, not DataTracker.Builder. Let me fix the entity classes:

Fixed the compilation errors:

  1. Changed initDataTracker(DataTracker.Builder builder) to initDataTracker() (no parameters in 1.20.4)

  2. Fixed explosion type from World.ExplosionSourceType.MOB to Explosion.DestructionType.DESTROY

  3. Removed unused imports

The mod should now compile successfully and spawn:

  • Tornadoes with spiraling smoke/cloud particles that pull entities upward and randomly break blocks

  • Meteors that fall with fire/smoke trails and explode on impact

Kodari can make mistakes. Review important code before using.
Files
gradle
src
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle
Code
13 896
src/main/java/com/disasters/NaturalDisasters.java
package com.disasters;

import com.disasters.entity.DisasterEntities;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class NaturalDisasters implements ModInitializer {
    public static final String MOD_ID = "naturaldisasters";
    public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

    @Override
    public void onInitialize() {
        LOGGER.info("Natural Disasters initializing...");
        
        DisasterEntities.register();
        
        ServerTickEvents.END_SERVER_TICK.register(server -> {
            DisasterManager.tick(server);
        });
        
        LOGGER.info("Natural Disasters initialized!");
    }
}