wolki1

Create a new Minecraft item. Appearance: block. Please make a mod for Minecraft Forge 1.20.1 featuring fog walls from Dark Souls that can be placed, and attach the summon command to them.. Behavior: you can pass from it and when is happens is use command summon(...)

Kodari AI
KodariOct 18 at 10:58 am 1
FogWallSummon
Adds a placeable Dark Souls-inspired fog wall block to Minecraft Forge 1.20.1. The block appears as a dense, animated fog barrier that players can walk through. When a player passes through the fog wall, the plugin automatically executes a configurable summon command, spawning a boss or entity on the other side. The block supports placement in any orientation and integrates seamlessly with the game's block system. Includes custom block model, texture, and interaction detection logic that triggers the summon command only once per pass-through, with a cooldown to prevent spam. Perfect for creating boss arena entrances or challenge gates in custom adventures.

I’ll create a Forge 1.20.1 mod with a pass-through fog gate block and a configurable summon command that runs when a player crosses it.

Created the Forge 1.20.1 Souls Fog Gate mod. The translucent, pass-through block is available in the Functional Blocks creative tab; crossing it runs a summon command at the gate, with a short per-player cooldown.

The default command summons a brief smoke effect. Change summonCommand in config/soulsfoggate-common.toml to use a different command; relative coordinates (~ ~ ~) are centered on the gate.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
14 280
src/main/java/com/kodari/soulsfoggate/FogGateMod.java
package com.kodari.soulsfoggate;

import com.kodari.soulsfoggate.registry.FogGateBlocks;
import com.kodari.soulsfoggate.registry.FogGateItems;
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.event.BuildCreativeModeTabContentsEvent;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

@Mod(FogGateMod.MOD_ID)
public class FogGateMod {
    public static final String MOD_ID = "soulsfoggate";
    private static final ForgeConfigSpec.Builder CONFIG_BUILDER = new ForgeConfigSpec.Builder();
    public static final ForgeConfigSpec.ConfigValue<String> SUMMON_COMMAND = CONFIG_BUILDER
            .comment("Command run as an operator when a player passes through a fog gate. Relative coordinates are centered on the gate.")
            .define("summonCommand", "summon minecraft:area_effect_cloud ~ ~ ~ {Duration:20,Radius:0.1f,Particle:\"minecraft:large_smoke\"}");
    private static final ForgeConfigSpec COMMON_CONFIG = CONFIG_BUILDER.build();

    public FogGateMod() {
        IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
        FogGateBlocks.BLOCKS.register(modEventBus);
        FogGateItems.ITEMS.register(modEventBus);
        modEventBus.addListener(this::addCreativeTabItem);
        ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, COMMON_CONFIG);
    }

    private void addCreativeTabItem(BuildCreativeModeTabContentsEvent event) {
        if (event.getTabKey() == CreativeModeTabs.FUNCTIONAL_BLOCKS) {
            event.accept(FogGateItems.FOG_GATE.get());
        }
    }
}