Jump to content

Modder Support

This is the support section for those modding with Forge. Help with modding goes in here, however, please keep in mind that this is not a Java school. You are expected to have basic knowledge of Java before posting here.


Subforums

  1. Documentation   (428009 visits to this link)

  2. ForgeGradle

    Help and support setting up your IDE and building mods with Gradle.

    5.4k
    posts

47178 topics in this forum

    • 0 replies
    • 1.3k views
    • 4 replies
    • 9.1k views
    • 1 reply
    • 2k views
    • 0 replies
    • 1.3k views
    • 1 reply
    • 2.2k views
    • 4 replies
    • 2.4k views
    • 2 replies
    • 2.5k views
    • 2 replies
    • 2.4k views
    • 6 replies
    • 3.5k views
    • 8 replies
    • 5.4k views
    • 3 replies
    • 2.1k views
    • 7 replies
    • 5.3k views
  1. Problem with Eclipse Debug

    • 4 replies
    • 3.9k views
  2. 1.8 IWorldGenerator

    • 2 replies
    • 2.6k views
    • 7 replies
    • 7.1k views
    • 12 replies
    • 6.1k views
  3. Block Holding Liquid?

    • 14 replies
    • 23.9k views
    • 3 replies
    • 3.3k views
    • 2 replies
    • 2.5k views
    • 8 replies
    • 14.7k views
    • 0 replies
    • 2.1k views
    • 8 replies
    • 4.8k views
    • 0 replies
    • 2.1k views
  4. [1.7.10]Item Tooltip?

    • 4 replies
    • 9.8k views
    • 0 replies
    • 2.7k views


  • Posts

    • Ok, I removed the littletiles mod and the server was opened, my problem was solved, thank you very much again.
    • The code is written by a neural network, but no matter how much I try to do damage or fire effect, either everything stops working, or the particles stop pointing at creatures. package net.tndax.thaumcraft.item.custom; import net.minecraft.core.Holder; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.damagesource.DamageSource; import java.util.List; import net.minecraft.world.damagesource.DamageType; public class ProtectiveItem extends Item { public ProtectiveItem(Properties pProperties) { super(pProperties); } @Override public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) { if (level.isClientSide()) { new Thread(() -> { double radius = 2.0; // Радиус вращения double heightOffset = 1.5; // Высота вращения частиц относительно игрока int duration = 20000; // Продолжительность эффекта в миллисекундах int steps = 200; // Количество шагов в одном круге (увеличено для большей плотности частиц) long startTime = System.currentTimeMillis(); while (System.currentTimeMillis() - startTime < duration) { for (int step = 0; step < steps; step++) { try { Thread.sleep(5); // Время между шагами уменьшено для увеличения скорости } catch (InterruptedException e) { e.printStackTrace(); } double angle = 2 * Math.PI * step / steps; for (int i = 0; i < 5; i++) { // Добавляем несколько частиц с небольшими смещениями double offset = i * 0.1; double randomFactorX = Math.sin(Math.toRadians(step * 7 % 360 + offset)); double randomFactorY = Math.sin(Math.toRadians(step * 13 % 360 + offset)); double randomFactorZ = Math.sin(Math.toRadians(step * 17 % 360 + offset)); double x = player.getX() + radius * Math.cos(angle) * randomFactorX; double y = player.getY() + heightOffset + radius * Math.sin(angle) * randomFactorY; double z = player.getZ() + radius * Math.sin(angle) * randomFactorZ; level.addParticle(ParticleTypes.FLAME, x, y, z, 0, 0, 0); } // Проверяем наличие сущностей в радиусе 5 блоков List<Entity> nearbyEntities = level.getEntities(player, player.getBoundingBox().inflate(10), entity -> entity instanceof LivingEntity && entity != player); if (!nearbyEntities.isEmpty()) { Entity target = nearbyEntities.get(0); // Берём первую ближайшую сущность double targetX = target.getX(); double targetY = target.getY() + target.getEyeHeight(); double targetZ = target.getZ(); // Направляем частицы к цели for (int i = 0; i < 20; i++) { double t = i / 20.0; double particleX = player.getX() + t * (targetX - player.getX()); double particleY = player.getY() + heightOffset + t * (targetY - (player.getY() + heightOffset)); double particleZ = player.getZ() + t * (targetZ - player.getZ()); level.addParticle(ParticleTypes.FLAME, particleX, particleY, particleZ, 0, 0, 0); try { Thread.sleep(5); // Пауза между частицами } catch (InterruptedException e) { e.printStackTrace(); } } // Возвращаем частицы обратно к игроку for (int i = 0; i < 20; i++) { double t = i / 20.0; double particleX = targetX + t * (player.getX() - targetX); double particleY = targetY + t * (player.getY() + heightOffset - targetY); double particleZ = targetZ + t * (player.getZ() - targetZ); level.addParticle(ParticleTypes.FLAME, particleX, particleY, particleZ, 0, 0, 0); try { Thread.sleep(5); // Пауза между частицами } catch (InterruptedException e) { e.printStackTrace(); } } } } } }).start(); } return new InteractionResultHolder<>(InteractionResult.SUCCESS, player.getItemInHand(hand)); } }  
    • physicsmod is conflicting with embeddium - try other builds of both mods
    • Same issue without dungeons_gear?
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.