Розыгрыш Premium и Уникальной юзергруппы на форуме! Перейти

Визуальная часть Storage esp druh hack 1.21.4

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
25 Окт 2024
Сообщения
22
Реакции
0
Выберите загрузчик игры
  1. Fabric
ну вроде норм да никому ненадо но пусть будет

кодик:
Expand Collapse Copy
package nyvera.xyz.modules.impl.render;

import nyvera.xyz.api.events.impl.EventRender3D;
import nyvera.xyz.modules.api.Category;
import nyvera.xyz.modules.api.Module;
import nyvera.xyz.modules.settings.impl.BooleanSetting;
import nyvera.xyz.modules.settings.impl.NumberSetting;
import nyvera.xyz.utils.render.Render3D;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.block.entity.*;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.world.chunk.WorldChunk;

import java.awt.*;

public class StorageESP extends Module {

    private final BooleanSetting chests = new BooleanSetting("Chests", true);
    private final BooleanSetting enderChests = new BooleanSetting("Ender Chests", true);
    private final BooleanSetting shulkers = new BooleanSetting("Shulkers", true);
    private final BooleanSetting barrels = new BooleanSetting("Barrels", true);
    private final BooleanSetting hoppers = new BooleanSetting("Hoppers", false);
    private final BooleanSetting furnaces = new BooleanSetting("Furnaces", false);
    private final BooleanSetting fill = new BooleanSetting("Fill", true);
    private final BooleanSetting outline = new BooleanSetting("Outline", true);
    private final NumberSetting fillAlpha = new NumberSetting("Fill Alpha", 50f, 0f, 255f, 5f, () -> fill.getValue());

    public StorageESP() {
        super("StorageESP", Category.Render);
    }

    @EventHandler
    public void onRender3D(EventRender3D.Game e) {
        if (fullNullCheck()) return;

        int renderDistance = mc.options.getViewDistance().getValue();
        ChunkPos playerChunk = mc.player.getChunkPos();

        for (int cx = playerChunk.x - renderDistance; cx <= playerChunk.x + renderDistance; cx++) {
            for (int cz = playerChunk.z - renderDistance; cz <= playerChunk.z + renderDistance; cz++) {
                WorldChunk chunk = mc.world.getChunk(cx, cz);
                if (chunk == null) continue;

                for (BlockPos pos : chunk.getBlockEntityPositions()) {
                    BlockEntity be = chunk.getBlockEntity(pos);
                    if (be == null) continue;

                    Color color = getColor(be);
                    if (color == null) continue;

                    Box box = new Box(pos);
                    Color fillColor = new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha.getValue().intValue());

                    Render3D.renderCube(e.getMatrixStack(), box, fill.getValue(), fillColor, outline.getValue(), color);
                }
            }
        }
    }

    private Color getColor(BlockEntity be) {
        if (be instanceof ChestBlockEntity && chests.getValue()) return new Color(255, 200, 0);
        if (be instanceof EnderChestBlockEntity && enderChests.getValue()) return new Color(200, 0, 255);
        if (be instanceof ShulkerBoxBlockEntity && shulkers.getValue()) return new Color(255, 100, 150);
        if (be instanceof BarrelBlockEntity && barrels.getValue()) return new Color(180, 130, 80);
        if (be instanceof HopperBlockEntity && hoppers.getValue()) return new Color(100, 100, 100);
        if ((be instanceof FurnaceBlockEntity || be instanceof BlastFurnaceBlockEntity || be instanceof SmokerBlockEntity) && furnaces.getValue()) return new Color(150, 150, 150);
        return null;
    }
}
ss:
1767158122602.png
 
Назад
Сверху Снизу