Ricardogamer513

Puedes crear un mod que cambie el clima agregando lluvia ácida tormenta de granizo tormenta de arena tormenta de nieve y tormenta de calor junto a eso que también agregues tornados de categoría f1 f2 f3 f4 que cada uno lleve mayor daño que todo eso afecte al jugador y a los mods del juego y los enemigos y agrega armaduras completas que hagan inmune al daño de cada tormenta agrega también herramientas meteorológicas para detectar tornados sirenas de emergencia fuente de indicadores de vientos máquina para ver tormentas y tornados que los tornados rompan bloques y afecten al jugador y a los mods y enemigos del juego y agrega nubes que se vean con el tornado y partículas y comandos para activar o quitar tormentas y tornados y una carpeta o comando también para agregar tiempos de duración sin límite y configuracion del mod para neoforge 1.21.1

Kodari AI
KodariNov 10 at 12:05 am 5
ExtremeWeatherTornadoes
Adds extreme weather events including acid rain, hail, sandstorms, snowstorms, and heatwaves, plus F1-F4 tornadoes with escalating damage affecting players, mobs, and blocks. Includes full armor sets granting immunity to each storm type, meteorological tools for tornado detection, emergency sirens, wind indicators, and storm viewing machines. Features visible storm clouds, particle effects, commands to toggle weather and tornadoes, configurable unlimited durations, and comprehensive mod configuration for NeoForge 1.21.1.
  • Crearé los comandos y la configuración de duración.

  • Añadiré los efectos de tormenta y la simulación de tornados.

Creé una base con cinco tormentas, tornados F1–F4, partículas, daño y rotura de bloques. Los efectos se guardan por dimensión y su duración y daño son configurables.

  • /climaextremo tormenta acida|granizo|arena|nieve|calor [segundos]

  • /climaextremo tornado f1|f2|f3|f4 [segundos]

  • Usa 0 segundos para duración ilimitada y quitar para detener cada efecto.

Aún faltan las armaduras, herramientas meteorológicas, sirenas, indicadores y máquina de detección. Las tormentas actuales comparten una mecánica básica de daño y los tornados permanecen fijos; no son todavía una simulación meteorológica completa. No se ha verificado la compilación.

Ricardogamer513

Tornados por condiciones climáticas extremas

Ricardogamer513 Puedes un mod que cambie el clima agregando lluvia ácida tormenta de granizo tormenta de arena tormenta de nieve y tormenta de calor junto a eso que también agrega tornados de categoría f1 f2 f3 f4 que cada uno lleva mayor daño que todo eso afecta al jugador ya los mods del juego y los enemigos y agregas armaduras completas que hagan inmune al daño de cada tormenta agrega también herramientas meteorológicas para detectar tornados sirenas de emergencia fuente de indicadores de vientos máquina para ver tormentas y tornados que los rasgados rompen bloques y afecta al jugador ya los mods y enemigos del juego y agrega nubes que se ven con el tornado y partículas y comandos para activar o quitar tormentas y tornados y una carpeta o comando también para agregar tiempos de duración sin límite y configuración del mod para neoforge 1.21.1

Kodari AI
KodariNov 10 at 12:12 am 15
  • Ampliaré las tormentas y haré que los tornados puedan surgir de condiciones extremas.

  • Añadiré protección y equipos de vigilancia con formas de obtenerlos en supervivencia.

  • Mantendré los comandos y la configuración de duración, incluido el modo ilimitado.

Amplié el mod para NeoForge 1.21.1 con tormentas naturales, tornados F1–F4 móviles, efectos diferenciados y un detector portátil. Los tornados afectan a entidades vivas y pueden romper bloques según su categoría.

En supervivencia:

  • Fabrica cada pieza de la armadura meteorológica combinando su equivalente de hierro con redstone. El conjunto completo protege del daño directo de todas las tormentas y tornados.

  • Fabrica el detector con una brújula en el centro, redstone arriba y lingotes de hierro a los lados y debajo. Al usarlo, muestra la tormenta y la ubicación del tornado.

Los comandos existentes aceptan 0 segundos para duración ilimitada. La configuración también permite ajustar daños y probabilidades de aparición natural.

Faltan por implementar las sirenas, los indicadores de viento y la máquina estacionaria para observar tormentas; por ahora hay un único traje protector para todos los fenómenos, no uno distinto por tormenta. No he verificado la compilación.

Ricardogamer513

Continúa creando el resto de cosas que faltan

Kodari AI
KodariNov 10 at 12:18 am 10
  1. Añadiré sirenas, indicadores de viento y una estación meteorológica fabricables.

  2. Completaré la protección específica para cada tipo de tormenta.

Añadí tres equipos fabricables:

  • Sirena: suena cuando hay un tornado a 128 bloques o menos, mientras el bloque esté cargado. Se fabrica con hierro, redstone y un bloque musical.

  • Indicador de viento: al interactuar, muestra una estimación del viento. Se fabrica con hierro, una brújula y una pluma.

  • Estación meteorológica: al interactuar, muestra la tormenta y la posición del tornado. Se fabrica con hierro, cristal, redstone y el detector meteorológico.

La estación muestra información por mensaje, no en una pantalla gráfica. Siguen faltando las armaduras específicas para cada tormenta; por ahora continúa disponible el conjunto universal existente. No he verificado la compilación.

Ricardogamer513

Crear las armaduras faltantes y revisa que todo sea compatible porfavor y gracias

Kodari AI
KodariNov 10 at 12:26 am 27
  1. Añadiré cinco conjuntos, cada uno con protección frente a su tormenta correspondiente.

  2. Revisaré su integración y la compatibilidad del código y los recursos con NeoForge 1.21.1.

Añadí cinco conjuntos completos: lluvia ácida, granizo, arena, nieve y calor. Cada conjunto completo protege del daño y los efectos de su tormenta; el traje meteorológico universal sigue protegiendo también del daño directo de los tornados.

En supervivencia, fabrica cada pieza poniendo el ingrediente encima de la pieza de hierro correspondiente:

  • Lluvia ácida: bola de slime.

  • Granizo: hielo.

  • Arena: arena.

  • Nieve: bola de nieve.

  • Calor: crema de magma.

Revisé las versiones, el formato de recetas y las firmas principales de NeoForge 1.21.1, pero no he podido verificar la compilación ni probar el mod en juego. Por falta de créditos para generar todas las texturas, algunas piezas usan iconos de hierro; al equiparlas, todos los conjuntos se ven como armadura de hierro.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
96 605
src/main/java/com/kodari/tiempoextremo/TiempoExtremo.java
package com.kodari.tiempoextremo;

import com.mojang.brigadier.arguments.IntegerArgumentType;
import java.util.HashSet;
import java.util.Set;
import net.minecraft.commands.Commands;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.core.BlockPos;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.level.GameRules;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.config.ModConfig;
import net.neoforged.neoforge.common.ModConfigSpec;
import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.event.RegisterCommandsEvent;
import net.neoforged.neoforge.event.tick.ServerTickEvent;

@Mod("tiempo_extremo")
public final class TiempoExtremo {
    private static final ModConfigSpec.IntValue DEFAULT_SECONDS;
    private static final ModConfigSpec.IntValue STORM_DAMAGE;
    private static final ModConfigSpec.IntValue TORNADO_DAMAGE;
    private static final ModConfigSpec.IntValue NATURAL_CHANCE;
    private static final ModConfigSpec.IntValue TORNADO_CHANCE;
    private static final ModConfigSpec SPEC;

    static {
        ModConfigSpec.Builder builder = new ModConfigSpec.Builder();
        DEFAULT_SECONDS = builder.defineInRange("duracion_segundos", 300, 0, 1000000);
        STORM_DAMAGE = builder.defineInRange("dano_tormenta", 2, 0, 100);
        TORNADO_DAMAGE = builder.defineInRange("dano_tornado_por_categoria", 2, 0, 100);
        NATURAL_CHANCE = builder.defineInRange("probabilidad_tormenta_natural_por_1200_ticks", 12, 0, 100);
        TORNADO_CHANCE = builder.defineInRange("probabilidad_tornado_por_1200_ticks", 8, 0, 100);
        SPEC = builder.build();
    }

    public TiempoExtremo(IEventBus bus, ModContainer container) {
        container.registerConfig(ModConfig.Type.COMMON, SPEC);
        ModItems.register(bus);
        WeatherMachines.register(bus);
        NeoForge.EVENT_BUS.addListener(TiempoExtremo::commands);
        NeoForge.EVENT_BUS.addListener(TiempoExtremo::tick);
    }

    private static long end(ServerLevel level, int seconds) {
        return seconds == 0 ? -1 : level.getGameTime() + (long) seconds * 20;
    }

    private static int storm(CommandSourceStack source, String name, int seconds) {
        StormData data = StormData.get(source.getLevel());
        data.storm = name;
        data.stormEnd = end(source.getLevel(), seconds);
        data.setDirty();
        source.sendSuccess(() -> Component.literal("Tormenta: " + name + (seconds == 0 ? " (ilimitada)" : " (" + seconds + " s)")), true);
        return 1;
    }

    private static int tornado(CommandSourceStack source, int category, int seconds) {
        StormData data = StormData.get(source.getLevel());
        Vec3 pos = source.getPosition();
        data.x = pos.x;
        data.y = pos.y;
        data.z = pos.z;
        data.tornado = category;
        data.tornadoEnd = end(source.getLevel(), seconds);
        data.setDirty();
        source.sendSuccess(() -> Component.literal("Tornado F" + category + (seconds == 0 ? " (ilimitado)" : " (" + seconds + " s)")), true);
        return 1;
    }

    private static void commands(RegisterCommandsEvent event) {
        var root = Commands.literal("climaextremo").requires(source -> source.hasPermission(2));
        var storms = Commands.literal("tormenta");
        for (String name : new String[]{"acida", "granizo", "arena", "nieve", "calor"}) {
            storms.then(Commands.literal(name)
                .executes(ctx -> storm(ctx.getSource(), name, DEFAULT_SECONDS.get()))
                .then(Commands.argument("segundos", IntegerArgumentType.integer(0, 1000000))
                    .executes(ctx -> storm(ctx.getSource(), name, IntegerArgumentType.getInteger(ctx, "segundos")))));
        }
        storms.then(Commands.literal("quitar").executes(ctx -> storm(ctx.getSource(), "none", 0)));
        var tornadoes = Commands.literal("tornado");
        for (int i = 1; i <= 4; i++) {
            final int category = i;
            tornadoes.then(Commands.literal("f" + i)
                .executes(ctx -> tornado(ctx.getSource(), category, DEFAULT_SECONDS.get()))
                .then(Commands.argument("segundos", IntegerArgumentType.integer(0, 1000000))
                    .executes(ctx -> tornado(ctx.getSource(), category, IntegerArgumentType.getInteger(ctx, "segundos")))));
        }
        tornadoes.then(Commands.literal("quitar").executes(ctx -> tornado(ctx.getSource(), 0, 0)));
        root.then(storms).then(tornadoes);
        event.getDispatcher().register(root);
    }

    private static void tick(ServerTickEvent.Post event) {
        for (ServerLevel level : event.getServer().getAllLevels()) {
            StormData data = StormData.get(level);
            long time = level.getGameTime();
            if (!data.storm.equals("none") && data.stormEnd >= 0 && time >= data.stormEnd) {
                data.storm = "none";
                data.setDirty();
            }
            if (data.tornado > 0 && data.tornadoEnd >= 0 && time >= data.tornadoEnd) {
                data.tornado = 0;
                data.setDirty();
            }
            if (time % 1200 == 0 && !level.players().isEmpty()) {
                var player = level.players().get(level.random.nextInt(level.players().size()));
                if (data.storm.equals("none") && level.isRaining() && level.random.nextInt(100) < NATURAL_CHANCE.get()) {
                    float temperature = level.getBiome(player.blockPosition()).value().getBaseTemperature();
                    String[] choices = temperature < 0.3f ? new String[]{"nieve", "granizo"}
                        : temperature > 1.0f ? new String[]{"arena", "calor", "acida"}
                        : new String[]{"acida", "granizo"};
                    data.storm = choices[level.random.nextInt(choices.length)];
                    data.stormEnd = end(level, DEFAULT_SECONDS.get());
                    data.setDirty();
                }
                if (!data.storm.equals("none") && data.tornado == 0 && level.random.nextInt(100) < TORNADO_CHANCE.get()) {
                    data.tornado = 1 + level.random.nextInt(4);
                    data.x = player.getX() + 32 + level.random.nextInt(32);
                    data.z = player.getZ() + 32 + level.random.nextInt(32);
                    data.y = player.getY();
                    data.tornadoEnd = end(level, DEFAULT_SECONDS.get());
                    data.setDirty();
                }
            }
            if (!data.storm.equals("none") && time % 40 == 0) {
                Set<Entity> affected = new HashSet<>();
                for (var player : level.players()) {
                    AABB area = new AABB(player.getX() - 48, player.getY() - 32, player.getZ() - 48,
                        player.getX() + 48, player.getY() + 32, player.getZ() + 48);
                    for (Entity entity : level.getEntities((Entity) null, area, e -> e instanceof LivingEntity)) {
                        if (affected.add(entity) && entity instanceof LivingEntity living && !ModItems.protectedFromStorm(living, data.storm) && level.canSeeSky(entity.blockPosition())) {
                            entity.hurt(entity.damageSources().generic(), STORM_DAMAGE.get());
                            switch (data.storm) {
                                case "acida" -> living.addEffect(new MobEffectInstance(MobEffects.POISON, 60, 0));
                                case "nieve", "granizo", "arena" -> living.addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SLOWDOWN, 60, 0));
                                case "calor" -> living.addEffect(new MobEffectInstance(MobEffects.WEAKNESS, 60, 0));
                            }
                        }
                    }
                    level.sendParticles(data.storm.equals("nieve") || data.storm.equals("granizo") ? ParticleTypes.SNOWFLAKE : data.storm.equals("acida") ? ParticleTypes.RAIN : data.storm.equals("calor") ? ParticleTypes.FLAME : ParticleTypes.ASH,
                        player.getX(), player.getY() + 8, player.getZ(), 50, 12, 3, 12, 0.02);
                }
            }
            if (data.tornado == 0) continue;
            if (time % 20 == 0) {
                data.x += Math.cos(time * 0.001) * 0.4;
                data.z += Math.sin(time * 0.001) * 0.4;
                data.setDirty();
            }
            double radius = 5 + data.tornado * 3;
            if (time % 5 == 0) {
                for (int height = 0; height < 30; height += 2) {
                    double angle = time * 0.16 + height * 0.65;
                    double width = 1 + height * 0.25;
                    level.sendParticles(ParticleTypes.CLOUD, data.x + Math.cos(angle) * width, data.y + height,
                        data.z + Math.sin(angle) * width, 3, 0.5, 0.5, 0.5, 0.01);
                }
                level.sendParticles(ParticleTypes.CLOUD, data.x, data.y + 31, data.z, 20, 7, 2, 7, 0.01);
                AABB area = new AABB(data.x - radius, data.y - 4, data.z - radius, data.x + radius, data.y + 32, data.z + radius);
                for (Entity entity : level.getEntities((Entity) null, area, e -> e instanceof LivingEntity)) {
                    double dx = data.x - entity.getX(), dz = data.z - entity.getZ();
                    double distance = Math.max(1, Math.sqrt(dx * dx + dz * dz));
                    entity.push((dx - dz) / distance * 0.12, 0.12 + data.tornado * 0.03, (dz + dx) / distance * 0.12);
                    if (time % 40 == 0 && entity instanceof LivingEntity living && !ModItems.protectedFromWeather(living)) entity.hurt(entity.damageSources().generic(), TORNADO_DAMAGE.get() * data.tornado);
                }
            }
            if (time % 10 == 0 && level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
                for (int i = 0; i < data.tornado; i++) {
                    BlockPos pos = BlockPos.containing(data.x + (Math.random() - 0.5) * radius * 2,
                        data.y + (Math.random() - 0.5) * 6, data.z + (Math.random() - 0.5) * radius * 2);
                    float hardness = level.getBlockState(pos).getDestroySpeed(level, pos);
                    if (hardness >= 0 && hardness <= data.tornado * 0.75f) level.destroyBlock(pos, true, null, 512);
                }
            }
        }
    }
}