public class XRay extends Module {
private final ArrayList<BlockPos> ores = new ArrayList<>();
@EventHandler
public void onPacket(PacketEvent e) {
if (e.getPacket() instanceof SMultiBlockChangePacket packet) {
packet.func_244310_a((blockPos, blockState) -> {
if (blockState.getBlock().equals(Blocks.ANCIENT_DEBRIS)) {
ores.add(new BlockPos(blockPos.getVec()));
}
});
}
}
@EventHandler
public void onRender3D(Render3DLastEvent e) {
for (BlockPos pos : ores) {
if (mc.world.getBlockState(pos).getBlock().equals(Blocks.ANCIENT_DEBRIS)) {
// Рендер блока
} else {
ores.remove(pos);
break;
}
}
}
}