MIneQuest

--- 📎 Attached 1 file(s):

File: pasted-code-1790777204736.txt

txt
Судя по картинке, это **стальная печь (steel furnace)** из Factorio. Вот описание:

**Общая форма:** компактная почти квадратная машина, чуть выше, чем в ширину. Вид сверху под углом. Корпус из тёмного потёртого железа, с заклёпками и следами ржавчины.

**Спереди (низ):** прямоугольное светящееся отверстие топки. Внутри яркий оранжево-жёлтый огонь, по краям красноватый. Вокруг тёмная металлическая рамка с небольшим выступом.

**Сверху слева:** клубок труб. Есть горизонтальные и вертикальные трубы разной толщины, соединения с фланцами, небольшой клапан или вентиль и прямоугольный блок с решёткой. Трубы серо-стального цвета, местами с голубоватым оттенком.

**Справа:** высокая круглая дымовая труба. Внизу она шире, кверху сужается, на конце тёмное отверстие. На ней видны горизонтальные кольца и полосы. Из неё идёт лёгкий тонкий дымок.

**Слева:** тонкая вертикальная труба или бак вдоль корпуса.

**Палитра:** тёмно-серый и графитовый (`#2b2b2b`, `#4a4a4a`), стальной серый (`#7d8590`), ржавый коричневый (`#6b4a35`), огонь (`#ff9d1a`, `#ffd35a`).

**Промпт для ИИ (на английском):**
Factorio steel furnace as a Minecraft block model, industrial style. Compact near-square dark gunmetal iron body with rivets and slight rust. Front: rectangular glowing orange-yellow fire opening in a dark metal frame. Top-left: tangle of gray steel pipes with flanges, a small valve and a vented box. Right side: tall round chimney, wider at the base, tapering to the top with horizontal ring bands and a dark opening. Thin vertical pipe on the left side. Palette: dark grays, steel gray, rust brown, orange fire glow. Pixel art, 16x16 textures, no anti-aliasing, hard pixels.
code

Модель с трубой и трубами лучше делать в **Blockbench** из нескольких кубов: основной корпус, труба справа как узкий высокий куб, трубы слева как тонкие кубы. Обычные ИИ-генераторы такие модели нормально не делают. Если хочешь, помогу расписать размеры кубов для Blockbench.

1 image attached
Kodari AI
KodariSep 30 at 2:08 pm 1
SteelFurnaceCraft
A Minecraft plugin that adds a Factorio-inspired steel furnace block with custom 3D model, textures, and interactive smelting mechanics. Players can place the furnace, insert ores and fuel through a GUI, and collect smelted ingots. Features include a custom block model with chimney and pipes, animated fire glow, configurable smelting times and output ratios, and support for multiple ore types. The plugin provides crafting recipes for the furnace, a settings menu for balancing, and full localization support. Designed for industrial-themed servers seeking authentic Factorio-style automation and resource processing.
  1. Create a Paper plugin scaffold and /steelfurnace command.

  2. Build the furnace from tagged block-display parts, with spawn and nearby-remove actions.

Created the SteelFurnace plugin with a block-display model inspired by the image. Use /steelfurnace spawn while looking at a block to place it, or /steelfurnace remove to remove nearby furnace parts.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
3 167
src/main/java/com/kodari/steelfurnace/SteelFurnacePlugin.java
package com.kodari.steelfurnace;

import com.cryptomorin.xseries.XMaterial;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.BlockDisplay;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.util.Transformation;
import org.joml.Quaternionf;
import org.joml.Vector3f;

public final class SteelFurnacePlugin extends JavaPlugin implements CommandExecutor {
    private static final String FURNACE_TAG = "kodari_steel_furnace";

    @Override
    public void onEnable() {
        getCommand("steelfurnace").setExecutor(this);
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player player)) {
            sender.sendMessage(ChatColor.RED + "This command can only be used in-game.");
            return true;
        }

        String action = args.length == 0 ? "spawn" : args[0].toLowerCase();
        if (action.equals("spawn")) {
            Block target = player.getTargetBlockExact(8);
            if (target == null) {
                player.sendMessage(ChatColor.RED + "Look at a block within 8 blocks to place the furnace.");
                return true;
            }
            spawnFurnace(target);
            player.sendMessage(ChatColor.GREEN + "Steel furnace created.");
            return true;
        }

        if (action.equals("remove")) {
            int removed = removeNearbyFurnaces(player);
            player.sendMessage(ChatColor.GREEN + "Removed " + removed + " steel furnace part(s).");
            return true;
        }

        player.sendMessage(ChatColor.YELLOW + "Usage: /steelfurnace <spawn|remove>");
        return true;
    }

    private void spawnFurnace(Block target) {
        World world = target.getWorld();
        Location origin = target.getLocation().add(0.5, 1, 0.5);

        cube(world, origin, "DEEPSLATE_BRICKS", -0.52, 0.02, -0.38, 1.04, 0.13, 0.76);
        cube(world, origin, "GRAY_CONCRETE", -0.47, 0.15, -0.33, 0.94, 0.62, 0.66);
        cube(world, origin, "DEEPSLATE_TILES", -0.49, 0.70, -0.35, 0.98, 0.13, 0.70);

        cube(world, origin, "LIGHT_GRAY_CONCRETE", -0.49, 0.18, -0.38, 0.08, 0.55, 0.06);
        cube(world, origin, "LIGHT_GRAY_CONCRETE", 0.41, 0.18, -0.38, 0.08, 0.55, 0.06);
        cube(world, origin, "IRON_BLOCK", -0.29, 0.17, -0.405, 0.58, 0.37, 0.07);
        cube(world, origin, "BLACKSTONE", -0.23, 0.23, -0.44, 0.46, 0.25, 0.04);
        cube(world, origin, "GLOWSTONE", -0.19, 0.27, -0.465, 0.38, 0.17, 0.025);
        cube(world, origin, "ORANGE_CONCRETE", -0.17, 0.29, -0.49, 0.34, 0.12, 0.025);
        cube(world, origin, "YELLOW_CONCRETE", -0.12, 0.30, -0.515, 0.24, 0.07, 0.02);
        cube(world, origin, "YELLOW_CONCRETE", -0.07, 0.28, -0.54, 0.08, 0.11, 0.02);

        cube(world, origin, "IRON_BLOCK", -0.50, 0.08, -0.29, 0.07, 0.67, 0.10);
        cube(world, origin, "IRON_BLOCK", 0.43, 0.08, -0.29, 0.07, 0.67, 0.10);
        cube(world, origin, "BROWN_CONCRETE", -0.49, 0.16, 0.28, 0.08, 0.47, 0.08);
        cube(world, origin, "COPPER_BLOCK", -0.43, 0.22, 0.33, 0.035, 0.035, 0.035);

        buildTopPipes(world, origin);
        buildChimney(world, origin);
    }

    private void buildTopPipes(World world, Location origin) {
        cube(world, origin, "LIGHT_GRAY_CONCRETE", -0.36, 0.82, -0.22, 0.10, 0.33, 0.10);
        cube(world, origin, "POLISHED_ANDESITE", -0.38, 1.10, -0.23, 0.44, 0.09, 0.09);
        cube(world, origin, "IRON_BLOCK", -0.05, 0.82, -0.19, 0.09, 0.29, 0.09);
        cube(world, origin, "LIGHT_GRAY_CONCRETE", -0.02, 1.02, -0.20, 0.28, 0.08, 0.08);
        cube(world, origin, "IRON_BLOCK", 0.17, 0.82, -0.22, 0.09, 0.22, 0.09);
        cube(world, origin, "IRON_BARS", -0.31, 0.81, 0.04, 0.22, 0.18, 0.17);
        cube(world, origin, "LIGHT_GRAY_CONCRETE", -0.32, 0.99, 0.07, 0.24, 0.05, 0.11);
        cube(world, origin, "GOLD_BLOCK", -0.24, 0.90, -0.04, 0.06, 0.06, 0.06);
        cube(world, origin, "IRON_BLOCK", -0.21, 0.91, -0.09, 0.12, 0.035, 0.035);
        cube(world, origin, "POLISHED_ANDESITE", -0.32, 0.77, -0.12, 0.10, 0.08, 0.10);
    }

    private void buildChimney(World world, Location origin) {
        cube(world, origin, "DEEPSLATE_BRICKS", 0.23, 0.80, 0.10, 0.30, 0.20, 0.30);
        cube(world, origin, "GRAY_CONCRETE", 0.27, 0.99, 0.14, 0.22, 0.53, 0.22);
        cube(world, origin, "LIGHT_GRAY_CONCRETE", 0.25, 1.07, 0.12, 0.26, 0.055, 0.26);
        cube(world, origin, "LIGHT_GRAY_CONCRETE", 0.25, 1.32, 0.12, 0.26, 0.055, 0.26);
        cube(world, origin, "IRON_BLOCK", 0.25, 1.51, 0.12, 0.26, 0.09, 0.26);
        cube(world, origin, "BLACKSTONE", 0.29, 1.60, 0.16, 0.18, 0.035, 0.18);
        cube(world, origin, "LIGHT_GRAY_CONCRETE", 0.49, 0.86, 0.16, 0.08, 0.26, 0.08);
        cube(world, origin, "IRON_BLOCK", 0.51, 1.09, 0.17, 0.055, 0.06, 0.055);
    }

    private void cube(World world, Location origin, String materialName,
                      double x, double y, double z, double width, double height, double depth) {
        Location location = origin.clone().add(x, y, z);
        BlockDisplay display = world.spawn(location, BlockDisplay.class);
        display.setBlock(XMaterial.matchXMaterial(materialName)
                .map(XMaterial::parseMaterial)
                .orElseThrow(() -> new IllegalArgumentException("Unknown material: " + materialName))
                .createBlockData());
        display.setTransformation(new Transformation(
                new Vector3f(),
                new Quaternionf(),
                new Vector3f((float) width, (float) height, (float) depth),
                new Quaternionf()));
        display.setInvulnerable(true);
        display.addScoreboardTag(FURNACE_TAG);
    }

    private int removeNearbyFurnaces(Player player) {
        int removed = 0;
        for (Entity entity : player.getWorld().getNearbyEntities(player.getLocation(), 24, 24, 24)) {
            if (entity.getScoreboardTags().contains(FURNACE_TAG)) {
                entity.remove();
                removed++;
            }
        }
        return removed;
    }
}