X Da Silva

I wanted a mod that would give me Akaza's powers from Demon Slayer, where I'd have all his abilities like in the anime, stong resistence and regeneration, i can only from the sun light, when i reach 0 health my head fell in the ground and i stay 20 seconds stunned, after this my head regenerates and i can continue fighting, and access to the Infinite Castle dimension, which I can enter whenever i want and dont spawn mobs there, all this by ringing a bell

Kodari AI
KodariSep 27 at 5:23 pm 2
AkazaDemonSlayerMod
A Fabric mod for Minecraft 1.20.4 that grants the player Akaza's powers from Demon Slayer. Features include enhanced strength and regeneration, vulnerability to sunlight causing damage, a unique death mechanic where the head falls and the player is stunned for 20 seconds before regenerating, and access to the Infinite Castle dimension via a bell item. The Infinite Castle is a custom dimension with no mob spawning, accessible anytime by ringing the bell. The mod implements custom status effects, a head-fall mechanic with timed stun, and a new dimension with unique properties.
  1. Create the Fabric 1.20.4 project files and a custom no-mob castle biome/dimension.

  2. Add the bell, Akaza’s combat/sunlight effects, and the 20-second head-regeneration stun.

  3. Verify every Minecraft/Fabric API signature used before writing Java.

Created the Fabric 1.20.4 mod project with an Infinite Castle Bell that grants Akaza-style resistance and regeneration, sends the player to the mob-free dimension, and returns them to the Overworld when rung there. Akaza burns in exposed daylight; lethal damage drops a player-head item and stuns them for 20 seconds before restoring them to 20 health.

The dimension uses End terrain settings with a custom biome that has no mob spawns; it does not yet generate castle architecture. Build and runtime behavior were not tested.

X Da Silva

This mod make unable to create a world

Kodari AI
KodariSep 27 at 5:29 pm 1

I checked the project’s worldgen files and build configuration, but they don’t show a confirmed cause for world creation failing, so I haven’t made a speculative change.

Please share the exact error shown in-game and the relevant part of logs/latest.log (or the full crash report). Also mention whether Minecraft crashes, reports that the selected data packs failed to load, or leaves Create New World disabled.

X Da Silva

Motivo: mouseClicked event handler

Erro: java.lang.IllegalStateException: Failed to load registries due to above errors

Código de saída: -1

Kodari AI
KodariSep 27 at 5:32 pm 1
  1. Inspect the custom dimension/biome data files and registration code for registry-load errors.

  2. Verify the relevant 1.20.4 worldgen definitions, then make the smallest fix and validate the resource syntax.

Corrigi o arquivo da dimensão: ele apontava para minecraft:the_end, que não é um ID válido para as configurações do gerador. Agora usa minecraft:end, o ID correto no Minecraft 1.20.4.

Tente criar o mundo novamente. Se ainda falhar, envie o trecho de logs/latest.log que aparece antes de “Failed to load registries”.

X Da Silva

How i use the mod?

Kodari AI
KodariSep 27 at 5:36 pm 1
  1. Install Fabric Loader for Minecraft 1.20.4 and put both the mod JAR and Fabric API in your mods folder.

  2. Start a world and get the bell. If it isn’t in your Creative inventory, use: /give @s akaza:infinite_castle_bell

  3. Right-click the bell to travel to the Infinite Castle. Use it again there to return to the Overworld. Ringing it also grants Akaza’s combat effects.

  4. Stay out of direct sunlight or you’ll burn. If you take lethal damage, your head drops and you’re stunned for 20 seconds; then you regenerate and can fight again.

X Da Silva

I want to add more abilities, like strength, speed and thing from demon slayer oni's, and powers, like punch barrage, and the sun isnt killing me, the infinity castle is just the end, i want a new dimension

Kodari AI
KodariSep 27 at 5:43 pm 2
  1. Add Akaza-style combat abilities, including a punch-barrage action.

  2. Fix sunlight damage and verify its trigger conditions.

  3. Replace the End-like destination with a genuinely custom Infinite Castle dimension.

Updated the mod:

  • Ring the bell to gain Strength II, Speed II, Resistance III, and Regeneration II. These effects are effectively permanent.

  • Sneak + right-click the bell to unleash a punch barrage: six rapid damage pulses against nearby living entities.

  • Direct sunlight now deals lethal magic damage, so resistance and regeneration won’t cancel it out. The existing stun-and-regenerate mechanic still handles the resulting lethal damage.

  • The Infinite Castle now uses its own dimension type and a flat polished-blackstone floor instead of End terrain. Its biome has no mob spawns.

The dimension is distinct from the End, but it doesn’t generate castle buildings yet. I haven’t tested it in-game.

X Da Silva

Again Motivo: mouseClicked event handler

Erro: java.lang.IllegalStateException: Failed to load registries due to above errors

Código de saída: -1

Kodari AI
KodariSep 27 at 5:48 pm 1
  1. Diagnose the registry-loading failure in the current dimension and biome definitions.

  2. Verify any Minecraft/Fabric registry APIs involved before changing Java; apply the smallest correction.

Fixed the registry error in dimension_type/infinite_castle.json: Minecraft 1.20.4 expects the monster settings (piglin_safe, has_raids, and the two spawn-light fields) at the root, not inside a monster_settings object.

I haven’t tested world creation in-game. If it still fails, share the first registry error from logs/latest.log—the lines before “Failed to load registries.”

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
10 306
src/main/java/com/kodari/akaza/AkazaMod.java
package com.kodari.akaza;

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.entity.event.v1.ServerLivingEntityEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.fabricmc.fabric.api.event.player.UseItemCallback;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.Identifier;
import net.minecraft.util.TypedActionResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

public class AkazaMod implements ModInitializer {
    private static final String MOD_ID = "akaza";
    private static final RegistryKey<World> INFINITE_CASTLE_KEY = RegistryKey.of(
            RegistryKeys.WORLD,
            new Identifier(MOD_ID, "infinite_castle")
    );
    private static final Set<UUID> AKAZA_PLAYERS = new HashSet<>();
    private static final Map<UUID, Integer> STUN_TICKS = new HashMap<>();
    private static final Map<UUID, Integer> BARRAGE_TICKS = new HashMap<>();

    public static final Item INFINITE_CASTLE_BELL = Registry.register(
            Registries.ITEM,
            new Identifier(MOD_ID, "infinite_castle_bell"),
            new Item(new Item.Settings())
    );

    @Override
    public void onInitialize() {
        UseItemCallback.EVENT.register((player, world, hand) -> {
            ItemStack stack = player.getStackInHand(hand);
            if (!stack.isOf(INFINITE_CASTLE_BELL)) {
                return TypedActionResult.pass(stack);
            }

            if (player instanceof ServerPlayerEntity serverPlayer) {
                if (AKAZA_PLAYERS.add(serverPlayer.getUuid())) {
                    serverPlayer.addStatusEffect(new StatusEffectInstance(
                            StatusEffects.RESISTANCE, Integer.MAX_VALUE, 2, true, false, false
                    ));
                    serverPlayer.addStatusEffect(new StatusEffectInstance(
                            StatusEffects.REGENERATION, Integer.MAX_VALUE, 1, true, false, false
                    ));
                    serverPlayer.addStatusEffect(new StatusEffectInstance(
                            StatusEffects.STRENGTH, Integer.MAX_VALUE, 1, true, false, false
                    ));
                    serverPlayer.addStatusEffect(new StatusEffectInstance(
                            StatusEffects.SPEED, Integer.MAX_VALUE, 1, true, false, false
                    ));
                }

                if (player.isSneaking()) {
                    BARRAGE_TICKS.put(serverPlayer.getUuid(), 12);
                    return TypedActionResult.success(stack);
                }

                MinecraftServer server = serverPlayer.getServerWorld().getServer();
                if (serverPlayer.getServerWorld().getRegistryKey().equals(INFINITE_CASTLE_KEY)) {
                    ServerWorld overworld = server.getOverworld();
                    BlockPos spawn = overworld.getSpawnPos();
                    serverPlayer.teleport(
                            overworld,
                            spawn.getX() + 0.5,
                            spawn.getY() + 1.0,
                            spawn.getZ() + 0.5,
                            serverPlayer.getYaw(),
                            serverPlayer.getPitch()
                    );
                } else {
                    ServerWorld castle = server.getWorld(INFINITE_CASTLE_KEY);
                    if (castle == null) {
                        return TypedActionResult.fail(stack);
                    }

                    serverPlayer.teleport(castle, 0.5, 80.0, 0.5, serverPlayer.getYaw(), serverPlayer.getPitch());
                }
            }

            return TypedActionResult.success(stack);
        });

        ServerLivingEntityEvents.ALLOW_DEATH.register((entity, damageSource, damageAmount) -> {
            if (!(entity instanceof ServerPlayerEntity player) || !AKAZA_PLAYERS.contains(player.getUuid())) {
                return true;
            }

            UUID playerId = player.getUuid();
            player.setHealth(1.0F);
            if (!STUN_TICKS.containsKey(playerId)) {
                player.dropItem(new ItemStack(Items.PLAYER_HEAD), true);
                STUN_TICKS.put(playerId, 20 * 20);
            }
            return false;
        });

        ServerTickEvents.END_SERVER_TICK.register(this::tickPlayers);
    }

    private void tickPlayers(MinecraftServer server) {
        for (ServerPlayerEntity player : server.getPlayerManager().getPlayerList()) {
            UUID playerId = player.getUuid();
            Integer remainingStun = STUN_TICKS.get(playerId);
            if (remainingStun != null) {
                player.setVelocity(0.0, 0.0, 0.0);
                player.addStatusEffect(new StatusEffectInstance(StatusEffects.SLOWNESS, 2, 10, true, false, false));
                player.addStatusEffect(new StatusEffectInstance(StatusEffects.WEAKNESS, 2, 4, true, false, false));
                if (remainingStun <= 1) {
                    STUN_TICKS.remove(playerId);
                    player.setHealth(20.0F);
                } else {
                    STUN_TICKS.put(playerId, remainingStun - 1);
                }
                continue;
            }

            Integer remainingBarrage = BARRAGE_TICKS.get(playerId);
            if (remainingBarrage != null) {
                if (remainingBarrage % 2 == 0) {
                    for (LivingEntity target : player.getWorld().getEntitiesByClass(
                            LivingEntity.class,
                            player.getBoundingBox().expand(3.0),
                            LivingEntity::isAlive
                    )) {
                        if (target != player) {
                            target.damage(player.getDamageSources().playerAttack(player), 2.0F);
                        }
                    }
                }
                if (remainingBarrage <= 1) {
                    BARRAGE_TICKS.remove(playerId);
                } else {
                    BARRAGE_TICKS.put(playerId, remainingBarrage - 1);
                }
            }

            if (AKAZA_PLAYERS.contains(playerId)) {
                ServerWorld world = player.getServerWorld();
                if (world.isDay() && world.isSkyVisible(player.getBlockPos()) && world.getTime() % 20L == 0L) {
                    player.setOnFireFor(2);
                    player.damage(player.getDamageSources().magic(), 100.0F);
                }
            }
        }
    }
}