Julián David Lara Marino

Y te iba a preguntar si me crea un mod de contructor pero as lo más realista posible

Kodari AI
KodariNov 6 at 5:03 am 1
BlockCraftPro
A realistic block-building simulation plugin for Minecraft that transforms the creative building experience into a physics-based construction sandbox. Players can place blocks with realistic weight, gravity, and structural integrity mechanics, requiring proper support and reinforcement for stable structures. The plugin introduces advanced building tools including precision placement modes, blueprint copying, and structural analysis that warns about unstable designs. It features a realistic material system where different block types have distinct properties like density, strength, and durability, affecting how buildings behave under stress. Players can access a construction tutorial system, earn builder XP for creating stable structures, and unlock specialized building techniques. The plugin also includes a physics engine that simulates realistic block interactions, collapse animations, and debris effects when structures fail, creating an immersive and educational construction experience.

¿Te refieres a una profesión de constructor —con materiales, herramientas, andamios y obras por etapas— o a un sistema de planos y construcción automática? Este proyecto es un plugin Java para servidores; puedo hacerlo realista con mecánicas como fraguado del cemento, desgaste de herramientas y requisitos de materiales.

Julián David Lara Marino

En y como se crea el semento xd

Kodari AI
KodariNov 6 at 5:03 am 1

Jajaja, para hacerlo realista, el cemento no saldría de mezclar arena y agua:

  1. Minás piedra caliza y conseguís arcilla.

  2. Las triturás y las cocinás en un horno de calcinación para obtener clínker.

  3. Molés el clínker con un poco de yeso y obtienes cemento en polvo.

  4. Lo mezclás con arena, grava y agua para hacer hormigón, que se endurece con el tiempo.

Así el plugin podría tener una cadena de producción y una espera para que la obra fragüe.

Julián David Lara Marino

En y crea cuando vamos agarrar un bloque o era mienta aga una animación realista y aga una animación realista de poniendo el segmento y el ladrillo

Kodari AI
KodariNov 6 at 5:05 am 1
  • Añadiré un plugin Java con animaciones visuales de recogida y colocación.

  • Haré que los bloques de cemento/hormigón y los ladrillos tengan efectos distintos.

  • Usaré el movimiento de la mano, partículas y sonidos para que se sienta más realista.

Añadí el plugin RealisticConstruction: al recoger bloques o herramientas, el jugador hace un movimiento de mano con sonido y partículas; al colocar hormigón/cemento o ladrillos, reproduce una secuencia de golpes con efectos específicos para cada material.

La animación es del lado del servidor: el bloque se coloca normalmente y luego se reproducen los efectos.

Julián David Lara Marino

Ya te dice mil veces para bedrock

Kodari AI
KodariNov 6 at 5:05 am 1

Tienes razón: este proyecto es un plugin Java, y Kodari no crea complementos (add-ons) para Minecraft Bedrock.

Julián David Lara Marino

Me vale el ling

Kodari AI
KodariNov 6 at 5:06 am 1

Si te refieres al link, Kodari no crea add-ons de Minecraft Bedrock, así que no hay un enlace para cambiar a ese tipo de proyecto.

Julián David Lara Marino

El lingg

Kodari AI
KodariNov 6 at 5:10 am 1

Kodari no crea complementos para Bedrock, así que no hay un link para cambiar a ese tipo de proyecto.

Julián David Lara Marino

Pues java

Kodari AI
KodariNov 6 at 5:10 am 1

Perfecto, Java entonces. El plugin que añadí es para servidores Minecraft Java y anima la recogida y colocación de bloques con movimiento de mano, partículas y sonidos; no es un complemento de Bedrock.

Julián David Lara Marino

Pero no veo el ling

Kodari AI
KodariNov 6 at 5:10 am 1

Aquí tienes el enlace para un plugin Java de servidor: Cambiar a plugin Java

Julián David Lara Marino

😑ese no es el enlase

Kodari AI
KodariNov 6 at 5:11 am 1

Ah, buscas el enlace para descargar el plugin, no para cambiar de proyecto. Compílalo desde ⋮ → Compile Project; cuando termine, toca Download para bajar el .jar.

Julián David Lara Marino

Dame una gia

Kodari AI
KodariNov 6 at 5:12 am 1

Guía para descargar e instalar el plugin

  1. En Kodari, pulsa Compile en la barra superior. Si estás en el móvil, toca ⋮ → Compile Project.

  2. En la ventana que aparece, pulsa Compile.

  3. Cuando termine, pulsa Download para descargar el archivo .jar.

  4. Sube ese .jar a la carpeta plugins de tu servidor Minecraft Java.

  5. Reinicia el servidor para cargar el plugin.

Esto es para un servidor Java, no para Minecraft Bedrock.

Julián David Lara Marino

Pero si no poness nada para comprar

Kodari AI
KodariNov 6 at 5:13 am 1

Tienes razón: el plugin solo tiene las animaciones; no añadí una tienda. Voy a revisar el comando y el registro actuales para agregar una tienda básica donde comprar bloques de construcción.

  1. Crearé /construccion tienda con una tienda en inventario.

  2. Añadiré materiales de obra comprables con esmeraldas.

  3. Protegeré la interfaz y agregaré una descripción del comando al plugin.

[Generation stopped]

Julián David Lara Marino

Dijo compilarr

Kodari AI
KodariNov 6 at 5:15 am 1

Sí, te dije que compilaras para descargarlo; eso no añade una tienda. Voy a completar la tienda del plugin: /construccion tienda, con materiales de obra que se compran con esmeraldas.

Sí, te dije compilar para descargarlo, pero antes no había nada que comprar. Ya añadí /construccion tienda: vende ladrillos, hormigón, cemento en polvo, arena, grava y arcilla a cambio de esmeraldas.

Compila el proyecto de nuevo para descargar la versión actualizada. Luego, en el servidor Java, usa /construccion tienda.

Julián David Lara Marino

Que no ay nada para compilar para descargalo

Kodari AI
KodariNov 6 at 5:15 am 1

El plugin ya tiene archivos fuente en este proyecto; no se compila con un comando dentro de Minecraft. En Kodari, pulsa Compile en la barra superior. Si estás en el móvil, toca ⋮ → Compile Project; después pulsa Compile en la ventana y Download cuando termine.

Kodari can make mistakes. Review important code before using.
Files
src
Code
2 258
src/main/java/com/kodari/construction/ConstructionAnimationPlugin.java
package com.kodari.construction;

import com.cryptomorin.xseries.XMaterial;
import com.cryptomorin.xseries.XSound;
import com.cryptomorin.xseries.particles.XParticle;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityPickupItemEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryDragEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.List;

public final class ConstructionAnimationPlugin extends JavaPlugin implements Listener {
    private static final String SHOP_TITLE = ChatColor.DARK_GREEN + "Tienda de construccion";
    private static final List<ShopOffer> SHOP_OFFERS = List.of(
            new ShopOffer(10, "BRICKS", 16, 2, "Ladrillos"),
            new ShopOffer(11, "STONE_BRICKS", 16, 2, "Ladrillos de piedra"),
            new ShopOffer(12, "WHITE_CONCRETE", 16, 3, "Hormigon"),
            new ShopOffer(13, "WHITE_CONCRETE_POWDER", 16, 2, "Cemento en polvo"),
            new ShopOffer(14, "SAND", 16, 1, "Arena"),
            new ShopOffer(15, "GRAVEL", 16, 1, "Grava"),
            new ShopOffer(16, "CLAY", 16, 2, "Arcilla")
    );

    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(this, this);
        getCommand("construccion").setExecutor(this);
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player player)) {
            sender.sendMessage("Este comando solo puede usarlo un jugador.");
            return true;
        }
        if (args.length == 1 && args[0].equalsIgnoreCase("tienda")) {
            openShop(player);
            return true;
        }
        player.sendMessage(ChatColor.YELLOW + "Usa /construccion tienda");
        return true;
    }

    @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
    public void onItemPickup(EntityPickupItemEvent event) {
        if (!(event.getEntity() instanceof Player player)) {
            return;
        }

        String itemName = XMaterial.matchXMaterial(event.getItem().getItemStack().getType()).name();
        if (!event.getItem().getItemStack().getType().isBlock() && !isTool(itemName)) {
            return;
        }

        player.swingMainHand();
        playSound(player, "ENTITY_ITEM_PICKUP", "ITEM_PICKUP");
        Location handLocation = player.getLocation().add(0, 1, 0);
        XParticle.of("CLOUD").ifPresent(particle -> player.getWorld().spawnParticle(
                particle.get(), handLocation, 4, 0.12, 0.12, 0.12, 0.01));
    }

    @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
    public void onBlockPlace(BlockPlaceEvent event) {
        String materialName = XMaterial.matchXMaterial(event.getBlockPlaced().getType()).name();
        boolean cement = isCement(materialName);
        boolean brick = materialName.contains("BRICK");
        if (!cement && !brick) {
            return;
        }

        Player player = event.getPlayer();
        Block block = event.getBlockPlaced();
        for (int stage = 0; stage < 4; stage++) {
            int animationStage = stage;
            getServer().getScheduler().runTaskLater(this, () -> animatePlacement(player, block, cement, animationStage), stage * 5L);
        }
    }

    @EventHandler
    public void onShopClick(InventoryClickEvent event) {
        if (!SHOP_TITLE.equals(event.getView().getTitle())) {
            return;
        }
        event.setCancelled(true);
        if (!(event.getWhoClicked() instanceof Player player)
                || event.getClickedInventory() != event.getView().getTopInventory()) {
            return;
        }

        SHOP_OFFERS.stream()
                .filter(offer -> offer.slot() == event.getSlot())
                .findFirst()
                .ifPresent(offer -> purchase(player, offer));
    }

    @EventHandler
    public void onShopDrag(InventoryDragEvent event) {
        if (SHOP_TITLE.equals(event.getView().getTitle())) {
            event.setCancelled(true);
        }
    }

    private void openShop(Player player) {
        Inventory inventory = getServer().createInventory(null, 27, SHOP_TITLE);
        for (ShopOffer offer : SHOP_OFFERS) {
            ItemStack item = XMaterial.matchXMaterial(offer.material())
                    .map(XMaterial::parseItem)
                    .orElse(null);
            if (item == null) {
                continue;
            }
            item.setAmount(offer.amount());
            ItemMeta meta = item.getItemMeta();
            meta.setDisplayName(ChatColor.GREEN + offer.displayName());
            meta.setLore(List.of(
                    ChatColor.GRAY + "Recibes: " + offer.amount(),
                    ChatColor.YELLOW + "Precio: " + offer.price() + " esmeralda(s)"
            ));
            item.setItemMeta(meta);
            inventory.setItem(offer.slot(), item);
        }
        player.openInventory(inventory);
    }

    private void purchase(Player player, ShopOffer offer) {
        ItemStack item = XMaterial.matchXMaterial(offer.material())
                .map(XMaterial::parseItem)
                .orElse(null);
        if (item == null) {
            player.sendMessage(ChatColor.RED + "Ese material no esta disponible en esta version.");
            return;
        }
        item.setAmount(offer.amount());
        if (!canFit(player, item)) {
            player.sendMessage(ChatColor.RED + "Haz espacio en tu inventario antes de comprar.");
            return;
        }

        XMaterial emerald = XMaterial.matchXMaterial("EMERALD").orElse(null);
        if (emerald == null || countItems(player, emerald.parseMaterial()) < offer.price()) {
            player.sendMessage(ChatColor.RED + "No tienes suficientes esmeraldas.");
            return;
        }
        removeItems(player, emerald.parseMaterial(), offer.price());
        player.getInventory().addItem(item);
        player.sendMessage(ChatColor.GREEN + "Compraste " + offer.amount() + " " + offer.displayName() + ".");
    }

    private boolean canFit(Player player, ItemStack item) {
        int remaining = item.getAmount();
        for (ItemStack contents : player.getInventory().getStorageContents()) {
            if (contents == null) {
                remaining -= item.getMaxStackSize();
            } else if (contents.isSimilar(item)) {
                remaining -= Math.max(0, contents.getMaxStackSize() - contents.getAmount());
            }
            if (remaining <= 0) {
                return true;
            }
        }
        return remaining <= 0;
    }

    private int countItems(Player player, org.bukkit.Material material) {
        int count = 0;
        for (ItemStack item : player.getInventory().getStorageContents()) {
            if (item != null && item.getType() == material) {
                count += item.getAmount();
            }
        }
        return count;
    }

    private void removeItems(Player player, org.bukkit.Material material, int amount) {
        int remaining = amount;
        ItemStack[] contents = player.getInventory().getStorageContents();
        for (int slot = 0; slot < contents.length && remaining > 0; slot++) {
            ItemStack item = contents[slot];
            if (item == null || item.getType() != material) {
                continue;
            }
            int removed = Math.min(remaining, item.getAmount());
            remaining -= removed;
            if (removed == item.getAmount()) {
                contents[slot] = null;
            } else {