Snow с регулировкой скорости падения | 2 видами логики падения | подарочек от меня (SXDpandora) 3.1

Начинающий
Статус
Оффлайн
Регистрация
1 Дек 2020
Сообщения
65
Реакции[?]
1
Поинты[?]
1K
слиш давай еще подарок от сердца слей чето прикольно еше
скоро что то ещё напишу если прям красиво солью, шляпы не одобряют, блокаутлайн тоже :cry: щас буду снова грузить
 
Забаненный
Статус
Оффлайн
Регистрация
29 Апр 2023
Сообщения
997
Реакции[?]
16
Поинты[?]
22K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
ну так зачем вам сурсы на 2.5гб?
сливай,пригодятся
скоро что то ещё напишу если прям красиво солью, шляпы не одобряют, блокаутлайн тоже :cry: щас буду снова грузить
можешь мне в личные написать, отправить ссылку на исходник,если не одобряют
 
Забаненный
Статус
Оффлайн
Регистрация
10 Май 2023
Сообщения
804
Реакции[?]
9
Поинты[?]
3K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сказал человек который кроме базы Экспениса ничего в шарах своих не видел
я пытался сделать свою базу, забил хуй ибо мне проще юзать экспу 3.1 потому что утилки у нее удобнее и настроенее , не вижу особого смысла писать свои базы когда можно юзнуть другие
слиш давай еще подарок от сердца слей чето прикольно еше
(незаметно запастил в свой крутой мун лайт клиент, а бля ты же не кодер ты подсос создателя, забыл)
 
Начинающий
Статус
Оффлайн
Регистрация
25 Фев 2024
Сообщения
517
Реакции[?]
0
Поинты[?]
0
зачем?
сказал мега селф кодер гамболоф (незаметно запастил в свой гумбулуф клиент)

выглядит если честно хуево, а сама идея классная

"югейм клиент" насмешил
скрины куста -
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
23 Июн 2023
Сообщения
399
Реакции[?]
2
Поинты[?]
0
Код:
package dF.Wirent.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import dF.Wirent.events.EventDisplay;
import dF.Wirent.functions.api.Category;
import dF.Wirent.functions.api.Function;
import dF.Wirent.functions.api.FunctionRegister;
import dF.Wirent.functions.settings.impl.ModeSetting;
import dF.Wirent.functions.settings.impl.SliderSetting;
import dF.Wirent.utils.client.IMinecraft;
import dF.Wirent.utils.math.MathUtil;
import dF.Wirent.utils.projections.ProjectionUtil;
import dF.Wirent.utils.render.ColorUtils;
import dF.Wirent.utils.render.font.Fonts;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.AxisAlignedBB;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;

import static net.minecraft.client.renderer.WorldRenderer.frustum;

@FunctionRegister(name = "Snow", type = Category.Render)
public class Snow extends Function {
    // Добавляем новый ModeSetting для выбора логики падения
    private final ModeSetting fallModeSetting = new ModeSetting("Режим", "Простой", "Простой", "Отскоки");
    private final ModeSetting setting = new ModeSetting("Вид", "Звёздочки", "Сердечки", "Молния", "Эмодзи", "Снежинки");
    public static final SliderSetting speedSetting = new SliderSetting("Скорость", 0, 0, 0.1f, 0.01f);

    private final List<Particle> particles = new ArrayList<>();

    public Snow() {
        addSettings(fallModeSetting, setting, speedSetting);
    }

    @Override
    protected float[] rotations(PlayerEntity var1) {
        return new float[0];
    }

    private boolean isInView(Vector3d pos) {
        frustum.setCameraPosition(
                IMinecraft.mc.getRenderManager().info.getProjectedView().x,
                IMinecraft.mc.getRenderManager().info.getProjectedView().y,
                IMinecraft.mc.getRenderManager().info.getProjectedView().z
        );
        return frustum.isBoundingBoxInFrustum(new AxisAlignedBB(pos.add(-0.2, -0.2, -0.2), pos.add(0.2, 0.2, 0.2)));
    }

    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.player == null || mc.world == null || e.getType() != EventDisplay.Type.PRE) {
            return;
        }

        particles.add(new Particle());

        Iterator<Particle> iterator = particles.iterator();
        while (iterator.hasNext()) {
            Particle p = iterator.next();

            if (System.currentTimeMillis() - p.time > 5000) {
                iterator.remove();
                continue;
            }

            if (mc.player.getPositionVec().distanceTo(p.pos) > 30) {
                iterator.remove();
                continue;
            }

            if (isInView(p.pos)) {
                if (!mc.player.canEntityBeSeen(p.pos)) {
                    iterator.remove();
                    continue;
                }
                p.update();
                Vector2f pos = ProjectionUtil.project(p.pos.x, p.pos.y, p.pos.z);

                float size = 1 - ((System.currentTimeMillis() - p.time) / 5000f);

                int color = ColorUtils.setAlpha(HUD.getColor(particles.indexOf(p), 1), (int) ((155 * p.alpha) * size));
                float scaleFactor = 15 * size;

                switch (setting.get()) {
                    case "Сердечки" ->
                            Fonts.test521488.drawText(e.getMatrixStack(), "C", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Пенисы" ->
                            Fonts.test521488.drawText(e.getMatrixStack(), "B", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Звёздочки" ->
                            Fonts.test521488.drawText(e.getMatrixStack(), "A", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Эмодзи" ->
                            Fonts.test521488.drawText(e.getMatrixStack(), "D", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Снежинки" ->
                            Fonts.damage.drawText(e.getMatrixStack(), "A", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Молния" ->
                            Fonts.damage.drawText(e.getMatrixStack(), "B", pos.x - 3.0f * size, pos.y - 3.0f * size, ColorUtils.setAlpha(HUD.getColor(this.particles.indexOf(p), 1.0f), (int) (200.0f * p.alpha * size)), 15.0f * size, 0.05f);
                }
            } else {
                iterator.remove();
            }
        }
    }

    private class Particle {
        private Vector3d pos;
        private final long time;
        private float alpha;
        private Vector3d velocity;
        private long collisionTime = -1L;

        public Particle() {
            pos = mc.player.getPositionVec().add(
                    ThreadLocalRandom.current().nextDouble(-20, 20),
                    ThreadLocalRandom.current().nextDouble(-5, 20),
                    ThreadLocalRandom.current().nextDouble(-20, 20)
            );
            time = System.currentTimeMillis();
            double speed = (double) speedSetting.get();
            velocity = new Vector3d(0, -speed, 0);
        }

        public void update() {
            if (fallModeSetting.get().equals("Простой")) {
                updateSimple();
            } else if (fallModeSetting.get().equals("Отскоки")) {
                updateWithBounce();
            }
        }

        private void updateSimple() {
            alpha = MathUtil.fast(alpha, 1, 10);
            pos = pos.add(velocity);
            if (pos.y < mc.player.getPositionVec().y - 5) {
                pos = mc.player.getPositionVec().add(
                        ThreadLocalRandom.current().nextDouble(-20, 20),
                        ThreadLocalRandom.current().nextDouble(10, 20),
                        ThreadLocalRandom.current().nextDouble(-20, 20)
                );
            }
        }

        private void updateWithBounce() {
            if (this.collisionTime != -1L) {
                long timeSinceCollision = System.currentTimeMillis() - this.collisionTime;
                this.alpha = Math.max(0.0f, 1.0f - (float) timeSinceCollision / 3000.0f);
            }

            this.velocity = this.velocity.add(0.0, -8.0E-4, 0.0);
            Vector3d newPos = this.pos.add(this.velocity);
            BlockPos particlePos = new BlockPos(newPos);
            BlockState blockState = mc.world.getBlockState(particlePos);
            if (!blockState.isAir()) {
                if (this.collisionTime == -1L) {
                    this.collisionTime = System.currentTimeMillis();
                }
                if (!mc.world.getBlockState(new BlockPos(this.pos.x + this.velocity.x, this.pos.y, this.pos.z)).isAir()) {
                    this.velocity = new Vector3d(0.0, this.velocity.y, this.velocity.z);
                }
                if (!mc.world.getBlockState(new BlockPos(this.pos.x, this.pos.y + this.velocity.y, this.pos.z)).isAir()) {
                    this.velocity = new Vector3d(this.velocity.x, -this.velocity.y * 0.8, this.velocity.z);
                }
                if (!mc.world.getBlockState(new BlockPos(this.pos.x, this.pos.y, this.pos.z + this.velocity.z)).isAir()) {
                    this.velocity = new Vector3d(this.velocity.x, this.velocity.y, 0.0);
                }
                this.pos = this.pos.add(this.velocity);
            } else {
                this.pos = newPos;
            }
        }
    }
}
Пожалуйста, авторизуйтесь для просмотра ссылки.
этот броу уже готов к Нью эа
 
Забаненный
Статус
Оффлайн
Регистрация
10 Май 2023
Сообщения
804
Реакции[?]
9
Поинты[?]
3K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Начинающий
Статус
Оффлайн
Регистрация
14 Окт 2024
Сообщения
53
Реакции[?]
0
Поинты[?]
0
Код:
package dF.Wirent.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import dF.Wirent.events.EventDisplay;
import dF.Wirent.functions.api.Category;
import dF.Wirent.functions.api.Function;
import dF.Wirent.functions.api.FunctionRegister;
import dF.Wirent.functions.settings.impl.ModeSetting;
import dF.Wirent.functions.settings.impl.SliderSetting;
import dF.Wirent.utils.client.IMinecraft;
import dF.Wirent.utils.math.MathUtil;
import dF.Wirent.utils.projections.ProjectionUtil;
import dF.Wirent.utils.render.ColorUtils;
import dF.Wirent.utils.render.font.Fonts;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.AxisAlignedBB;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;

import static net.minecraft.client.renderer.WorldRenderer.frustum;

@FunctionRegister(name = "Snow", type = Category.Render)
public class Snow extends Function {
    // Добавляем новый ModeSetting для выбора логики падения
    private final ModeSetting fallModeSetting = new ModeSetting("Режим", "Простой", "Простой", "Отскоки");
    private final ModeSetting setting = new ModeSetting("Вид", "Звёздочки", "Сердечки", "Молния", "Эмодзи", "Снежинки");
    public static final SliderSetting speedSetting = new SliderSetting("Скорость", 0, 0, 0.1f, 0.01f);

    private final List<Particle> particles = new ArrayList<>();

    public Snow() {
        addSettings(fallModeSetting, setting, speedSetting);
    }

    @Override
    protected float[] rotations(PlayerEntity var1) {
        return new float[0];
    }

    private boolean isInView(Vector3d pos) {
        frustum.setCameraPosition(
                IMinecraft.mc.getRenderManager().info.getProjectedView().x,
                IMinecraft.mc.getRenderManager().info.getProjectedView().y,
                IMinecraft.mc.getRenderManager().info.getProjectedView().z
        );
        return frustum.isBoundingBoxInFrustum(new AxisAlignedBB(pos.add(-0.2, -0.2, -0.2), pos.add(0.2, 0.2, 0.2)));
    }

    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.player == null || mc.world == null || e.getType() != EventDisplay.Type.PRE) {
            return;
        }

        particles.add(new Particle());

        Iterator<Particle> iterator = particles.iterator();
        while (iterator.hasNext()) {
            Particle p = iterator.next();

            if (System.currentTimeMillis() - p.time > 5000) {
                iterator.remove();
                continue;
            }

            if (mc.player.getPositionVec().distanceTo(p.pos) > 30) {
                iterator.remove();
                continue;
            }

            if (isInView(p.pos)) {
                if (!mc.player.canEntityBeSeen(p.pos)) {
                    iterator.remove();
                    continue;
                }
                p.update();
                Vector2f pos = ProjectionUtil.project(p.pos.x, p.pos.y, p.pos.z);

                float size = 1 - ((System.currentTimeMillis() - p.time) / 5000f);

                int color = ColorUtils.setAlpha(HUD.getColor(particles.indexOf(p), 1), (int) ((155 * p.alpha) * size));
                float scaleFactor = 15 * size;

                switch (setting.get()) {
                    case "Сердечки" ->
                            Fonts.test521488.drawText(e.getMatrixStack(), "C", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Пенисы" ->
                            Fonts.test521488.drawText(e.getMatrixStack(), "B", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Звёздочки" ->
                            Fonts.test521488.drawText(e.getMatrixStack(), "A", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Эмодзи" ->
                            Fonts.test521488.drawText(e.getMatrixStack(), "D", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Снежинки" ->
                            Fonts.damage.drawText(e.getMatrixStack(), "A", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Молния" ->
                            Fonts.damage.drawText(e.getMatrixStack(), "B", pos.x - 3.0f * size, pos.y - 3.0f * size, ColorUtils.setAlpha(HUD.getColor(this.particles.indexOf(p), 1.0f), (int) (200.0f * p.alpha * size)), 15.0f * size, 0.05f);
                }
            } else {
                iterator.remove();
            }
        }
    }

    private class Particle {
        private Vector3d pos;
        private final long time;
        private float alpha;
        private Vector3d velocity;
        private long collisionTime = -1L;

        public Particle() {
            pos = mc.player.getPositionVec().add(
                    ThreadLocalRandom.current().nextDouble(-20, 20),
                    ThreadLocalRandom.current().nextDouble(-5, 20),
                    ThreadLocalRandom.current().nextDouble(-20, 20)
            );
            time = System.currentTimeMillis();
            double speed = (double) speedSetting.get();
            velocity = new Vector3d(0, -speed, 0);
        }

        public void update() {
            if (fallModeSetting.get().equals("Простой")) {
                updateSimple();
            } else if (fallModeSetting.get().equals("Отскоки")) {
                updateWithBounce();
            }
        }

        private void updateSimple() {
            alpha = MathUtil.fast(alpha, 1, 10);
            pos = pos.add(velocity);
            if (pos.y < mc.player.getPositionVec().y - 5) {
                pos = mc.player.getPositionVec().add(
                        ThreadLocalRandom.current().nextDouble(-20, 20),
                        ThreadLocalRandom.current().nextDouble(10, 20),
                        ThreadLocalRandom.current().nextDouble(-20, 20)
                );
            }
        }

        private void updateWithBounce() {
            if (this.collisionTime != -1L) {
                long timeSinceCollision = System.currentTimeMillis() - this.collisionTime;
                this.alpha = Math.max(0.0f, 1.0f - (float) timeSinceCollision / 3000.0f);
            }

            this.velocity = this.velocity.add(0.0, -8.0E-4, 0.0);
            Vector3d newPos = this.pos.add(this.velocity);
            BlockPos particlePos = new BlockPos(newPos);
            BlockState blockState = mc.world.getBlockState(particlePos);
            if (!blockState.isAir()) {
                if (this.collisionTime == -1L) {
                    this.collisionTime = System.currentTimeMillis();
                }
                if (!mc.world.getBlockState(new BlockPos(this.pos.x + this.velocity.x, this.pos.y, this.pos.z)).isAir()) {
                    this.velocity = new Vector3d(0.0, this.velocity.y, this.velocity.z);
                }
                if (!mc.world.getBlockState(new BlockPos(this.pos.x, this.pos.y + this.velocity.y, this.pos.z)).isAir()) {
                    this.velocity = new Vector3d(this.velocity.x, -this.velocity.y * 0.8, this.velocity.z);
                }
                if (!mc.world.getBlockState(new BlockPos(this.pos.x, this.pos.y, this.pos.z + this.velocity.z)).isAir()) {
                    this.velocity = new Vector3d(this.velocity.x, this.velocity.y, 0.0);
                }
                this.pos = this.pos.add(this.velocity);
            } else {
                this.pos = newPos;
            }
        }
    }
}
Пожалуйста, авторизуйтесь для просмотра ссылки.
скинь шрифт пж
 
Забаненный
Статус
Оффлайн
Регистрация
23 Ноя 2024
Сообщения
116
Реакции[?]
1
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
package dF.Wirent.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import dF.Wirent.events.EventDisplay;
import dF.Wirent.functions.api.Category;
import dF.Wirent.functions.api.Function;
import dF.Wirent.functions.api.FunctionRegister;
import dF.Wirent.functions.settings.impl.ModeSetting;
import dF.Wirent.functions.settings.impl.SliderSetting;
import dF.Wirent.utils.client.IMinecraft;
import dF.Wirent.utils.math.MathUtil;
import dF.Wirent.utils.projections.ProjectionUtil;
import dF.Wirent.utils.render.ColorUtils;
import dF.Wirent.utils.render.font.Fonts;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.AxisAlignedBB;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;

import static net.minecraft.client.renderer.WorldRenderer.frustum;

@FunctionRegister(name = "Snow", type = Category.Render)
public class Snow extends Function {
    // Добавляем новый ModeSetting для выбора логики падения
    private final ModeSetting fallModeSetting = new ModeSetting("Режим", "Простой", "Простой", "Отскоки");
    private final ModeSetting setting = new ModeSetting("Вид", "Звёздочки", "Сердечки", "Молния", "Эмодзи", "Снежинки");
    public static final SliderSetting speedSetting = new SliderSetting("Скорость", 0, 0, 0.1f, 0.01f);

    private final List<Particle> particles = new ArrayList<>();

    public Snow() {
        addSettings(fallModeSetting, setting, speedSetting);
    }

    @Override
    protected float[] rotations(PlayerEntity var1) {
        return new float[0];
    }

    private boolean isInView(Vector3d pos) {
        frustum.setCameraPosition(
                IMinecraft.mc.getRenderManager().info.getProjectedView().x,
                IMinecraft.mc.getRenderManager().info.getProjectedView().y,
                IMinecraft.mc.getRenderManager().info.getProjectedView().z
        );
        return frustum.isBoundingBoxInFrustum(new AxisAlignedBB(pos.add(-0.2, -0.2, -0.2), pos.add(0.2, 0.2, 0.2)));
    }

    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.player == null || mc.world == null || e.getType() != EventDisplay.Type.PRE) {
            return;
        }

        particles.add(new Particle());

        Iterator<Particle> iterator = particles.iterator();
        while (iterator.hasNext()) {
            Particle p = iterator.next();

            if (System.currentTimeMillis() - p.time > 5000) {
                iterator.remove();
                continue;
            }

            if (mc.player.getPositionVec().distanceTo(p.pos) > 30) {
                iterator.remove();
                continue;
            }

            if (isInView(p.pos)) {
                if (!mc.player.canEntityBeSeen(p.pos)) {
                    iterator.remove();
                    continue;
                }
                p.update();
                Vector2f pos = ProjectionUtil.project(p.pos.x, p.pos.y, p.pos.z);

                float size = 1 - ((System.currentTimeMillis() - p.time) / 5000f);

                int color = ColorUtils.setAlpha(HUD.getColor(particles.indexOf(p), 1), (int) ((155 * p.alpha) * size));
                float scaleFactor = 15 * size;

                switch (setting.get()) {
                    case "Сердечки" ->
                            Fonts.test521488.drawText(e.getMatrixStack(), "C", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Пенисы" ->
                            Fonts.test521488.drawText(e.getMatrixStack(), "B", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Звёздочки" ->
                            Fonts.test521488.drawText(e.getMatrixStack(), "A", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Эмодзи" ->
                            Fonts.test521488.drawText(e.getMatrixStack(), "D", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Снежинки" ->
                            Fonts.damage.drawText(e.getMatrixStack(), "A", pos.x - 3 * size, pos.y - 3 * size, color, scaleFactor, 0.05f);
                    case "Молния" ->
                            Fonts.damage.drawText(e.getMatrixStack(), "B", pos.x - 3.0f * size, pos.y - 3.0f * size, ColorUtils.setAlpha(HUD.getColor(this.particles.indexOf(p), 1.0f), (int) (200.0f * p.alpha * size)), 15.0f * size, 0.05f);
                }
            } else {
                iterator.remove();
            }
        }
    }

    private class Particle {
        private Vector3d pos;
        private final long time;
        private float alpha;
        private Vector3d velocity;
        private long collisionTime = -1L;

        public Particle() {
            pos = mc.player.getPositionVec().add(
                    ThreadLocalRandom.current().nextDouble(-20, 20),
                    ThreadLocalRandom.current().nextDouble(-5, 20),
                    ThreadLocalRandom.current().nextDouble(-20, 20)
            );
            time = System.currentTimeMillis();
            double speed = (double) speedSetting.get();
            velocity = new Vector3d(0, -speed, 0);
        }

        public void update() {
            if (fallModeSetting.get().equals("Простой")) {
                updateSimple();
            } else if (fallModeSetting.get().equals("Отскоки")) {
                updateWithBounce();
            }
        }

        private void updateSimple() {
            alpha = MathUtil.fast(alpha, 1, 10);
            pos = pos.add(velocity);
            if (pos.y < mc.player.getPositionVec().y - 5) {
                pos = mc.player.getPositionVec().add(
                        ThreadLocalRandom.current().nextDouble(-20, 20),
                        ThreadLocalRandom.current().nextDouble(10, 20),
                        ThreadLocalRandom.current().nextDouble(-20, 20)
                );
            }
        }

        private void updateWithBounce() {
            if (this.collisionTime != -1L) {
                long timeSinceCollision = System.currentTimeMillis() - this.collisionTime;
                this.alpha = Math.max(0.0f, 1.0f - (float) timeSinceCollision / 3000.0f);
            }

            this.velocity = this.velocity.add(0.0, -8.0E-4, 0.0);
            Vector3d newPos = this.pos.add(this.velocity);
            BlockPos particlePos = new BlockPos(newPos);
            BlockState blockState = mc.world.getBlockState(particlePos);
            if (!blockState.isAir()) {
                if (this.collisionTime == -1L) {
                    this.collisionTime = System.currentTimeMillis();
                }
                if (!mc.world.getBlockState(new BlockPos(this.pos.x + this.velocity.x, this.pos.y, this.pos.z)).isAir()) {
                    this.velocity = new Vector3d(0.0, this.velocity.y, this.velocity.z);
                }
                if (!mc.world.getBlockState(new BlockPos(this.pos.x, this.pos.y + this.velocity.y, this.pos.z)).isAir()) {
                    this.velocity = new Vector3d(this.velocity.x, -this.velocity.y * 0.8, this.velocity.z);
                }
                if (!mc.world.getBlockState(new BlockPos(this.pos.x, this.pos.y, this.pos.z + this.velocity.z)).isAir()) {
                    this.velocity = new Vector3d(this.velocity.x, this.velocity.y, 0.0);
                }
                this.pos = this.pos.add(this.velocity);
            } else {
                this.pos = newPos;
            }
        }
    }
}
Пожалуйста, авторизуйтесь для просмотра ссылки.
кому это нахуй сдалось, когда новый год прошел, зима скоро закончится. по сути же это функция тупо делает зимний вайб по моему мнению
 
Сверху Снизу